Hi together,
I have some questions regarding the proper use of Http().serverLayer:
We want to build a streaming pipeline, which accepts ByteStrings -> parses
them as HTTP Requests -> sends them to a server
-> receives the HTTP response -> and renders that as a ByteString.
you could say a Reverse-Proxy on top of a ByteString Source instead of a
TCP Socket.
Comments, thoughts from anyone with a bit of in depth knowledge would be
appreciated
so far we tried to deduce from the Akka Http code and it seems to be ok to
do it but a bit more certainty would be nice (-:
Thanks in advance
Best Michael
Questions are:
- can I use Http.serverLayer for that
- will it scale to many "Connections" (== Source[ByteString])
- is Akka TCP Socket -> ByteString -> serverLayer -> HttpRequest the same
as directly binding a Akka Http Server to a port or are there important
differences?
- can I use Akka Http to build a reverse proxy or are there any caches,
optimizations, ...
that would make trouble if I parse / render a potentially large set of
different HttpMessages
(instead of always rendering the limited set of messages of my server)
- am I right that Http().serverLayer will also be around in the next
releases (I think its public API) ?
Illustration:
*"Normal" Reverse-Proxy:*
+--------------+ +-------------+
| | | |
HttpRequest -> | manipulate, | -> HttpRequest -> | | ->
TCP
| forward, | |
| \
| inject | | HTTP Client
| Target System
| credentials, | |
| /
HttpResponse <- | ... | <- HttpResponse <- | | <-
TCP
| | | |
+--------------+ +-------------+
*What we want to achieve:*
+-------------+
+--------------+ +-------------+
| | |
| | |
ByteString -> | | -> HttpRequest -> | manipulate, | ->
HttpRequest -> | | -> TCP
| | | forward,
| | | \
| serverLayer | | inject
| | HTTP Client | Target System
| | | credentials,
| | | /
ByteString <- | | <- HttpResponse <- | ... | <-
HttpResponse <- | | <- TCP
| | |
| | |
+-------------+
+--------------+ +-------------+
Additional Questions:
- the documentation states, that
"Parsing and rendering of HTTP data structures is heavily optimized and
for most types there’s currently no public
API provided to parse (or render to) Strings or byte arrays."
=> are there plans to provide such an API in the future?
Thanks in advance
Best Michael
--
>>>>>>>>>> Read the docs: http://akka.io/docs/
>>>>>>>>>> Check the FAQ:
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.