Subject: Re: [boost] [review][beast] Review of Beast starts today : July 1 - July 10
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2017-07-01 19:01:16
On Sat, Jul 1, 2017 at 11:08 AM, Niall Douglas via Boost
> Beast WebSocket belongs in another, separate library. That library could
> bring in ASIO as a dependency.
Beast is provided as a coherent package of components that work well
together, with integrated tests and documentation. It is presented as
a single library.
> 1. Message containers
> 2. Stream reading
> 3. Stream writing
> 4. Serialisation
> 5. Parsing
> You have told me no reason why any of these needs a hard dependency on
> any networking implementation, or awareness of any specific networking
> design pattern.
Beast's message containers, serialization, and parsing do not depend
on any specific networking interface.
I do not know of a way to write an algorithm which works with an
unspecified stream concept, so I had to choose which concepts I wanted
to work with. I chose these Boost.Asio concepts because they are the
closest thing to becoming a standard:
Perhaps you can demonstrate how a network algorithm may be written
which works with an unspecified stream concept? How about a simple,
synchronous function that writes a string, I'll start you off with a
void write(Stream& stream, std::string_view string);
Please implement this function for us and demonstrate how it works
with Boost.Asio, Networking-TS, POSIX sockets, WinSock, UDT, or libUV
> **HTTP has nothing to do with networking**.
Beast offers algorithms to serialize and parse HTTP messages on
Boost.Asio streams. If you think that is not part of "HTTP" that's
fine, the label is unimportant. What is important is that Beast offers
> It therefore seems to me that reading ought to be calculated views of
> underlying byte data, and writing ought to be compositing a sequence of
> byte spans to gather into a send.
Correct. You have described the operations performed by
beast::http::serializer and beast::http::basic_parser, which do not
require any networking interface.
> WG21 has much superior vocabulary types for doing buffer sequences
> than ASIO's which are needlessly complex, over engineered, and over wraught
Please specify the WG21 vocabulary types you are referring to.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk