blaze icon indicating copy to clipboard operation
blaze copied to clipboard

Explore an HTTP object model

Open bryce-anderson opened this issue 7 years ago • 2 comments

Right now there is little shared between the HTTP/1.x and HTTP/2 dispatch models since the greatest common denominator is ByteBuffer. We might be able to consolidate some stuff by turning the http2 StreamMessage into something more usable from HTTP/1.x (and renaming it since it's child types are DataFrame and HeadersFrame, so maybe it should be StreamFrame...). This would also make things more shareable with http4s proper since it would only need to transform a stream of StreamFrames into its own model and could share any dispatch semantics validation code with blaze.

bryce-anderson avatar Feb 13 '18 16:02 bryce-anderson

More sharing would be good. Being able to avoid copying bytes is also good. There is now a ByteBuffer based chunk in fs2-core. We should take care not to lose that in any abstractions, because that has been a big win for performance historically.

rossabaker avatar Feb 14 '18 00:02 rossabaker

I looked into this a bit, and it may make more sense after #159. Right now the parsers and compressed into a single stage in large part to manage concurrency since there are no concurrency guarantees between stages.

bryce-anderson avatar Feb 14 '18 03:02 bryce-anderson