I think we misunderstood each other somehow.
I understood your goal is to have "one route" that somehow directly routes
requests to representative actors (somehow it sounded to me like you have
deep hierarchies you want to expose like that).
In that sense the "route" would be driven by the structure of your actor
tree in a 1:1 way.
This I'm not sure is very good as it binds your API structure directly to
the actor tree.
If we're talking about something like:
path("users" / name) { name =>
actors(name) ! something
}
that's totally fine. I'd just be cautious of not adding too much magic and
creating the route magically from the actor tree structure, as in:
path(part / part2 / part3) { (p1, p2, p3) =>
actorSelection(p1 ...) ! ...
}
This starts to feel like "exposing your tree" (and also could lead to
people exploiting this by passing weird things in `part`.
--
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>
On 12 November 2016 at 12:47:28, Roland Kuhn ([email protected]) wrote:
I'm not sure I agree with Konrad here: what is wrong with using an HTTP
route to expose an actor as service endpoint? This does not imply that the
actual implementation needs to be structured accordingly, the backend is
completely independent a priori. The role of the composable route snippet
is data transport (marshalling, protocol handling) and the actor endpoint
orchestrates the collaboration of backend services.
Regards, Roland
Sent from my iPhone
On 12 Nov 2016, at 12:10, Alvaro Santuy <[email protected]> wrote:
:-(
Ok, so I guesss the "correct" pattern is to always use a "Service Layer"
(non-Akka, so not an actor) between the actors and the REST exposition. Am
I correct?
On Thursday, November 10, 2016 at 4:28:10 PM UTC+1, Alvaro Santuy wrote:
>
> Hello everybody.
>
> Is there any project out there capable to easily build REST routes to Akka
> Actors? I would like to map REST resources to Akka Actors and messages
> other than manually encode the routes in Akka HTTP...
>
> Thank you.
>
--
>>>>>>>>>> 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.
--
>>>>>>>>>> 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.
--
>>>>>>>>>> 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.