On Fri, Jul 22, 2016 at 5:15 AM, Lap Ming Lee <[email protected]> wrote:
> Since the http server is an Akka Stream source, I was wondering if it > would be possible to handle all the routing inside an actor instead. The short answer is "yes" -- you can do the routing anywhere you like. ( Querki <https://github.com/jducoeur/Querki> is probably the ultimate example of this, with multiple layers of complex routing, so that my Autowire requests get handled by appropriate Actors scattered all around the cluster.) Personally, I don't like the RESTful approach shown in the Autowire example -- I find it silly to deconstruct the Request, turn it into REST format, send it that way, and then turn it back into a Request on the receiving end as you're doing. Querki just pickles the entire Request, sends it to a single apiRequest() entry point on the server, which then unpickles it and forwards it on. But regardless -- yeah, you can do the Request routing anywhere you like. In Querki it's not only sent to an Actor to handle, the receiving Actor typically isn't even on the same node that originally received the Request... -- >>>>>>>>>> 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 https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.
