I am supposed to design and implement a distributed solution for a client.
I look at Akka and the Actor's model and immediately fall in love :-) But
can this love last?
Here is the brief description of the application, say MyApp:
MyApp reads and immediately acks requests from HTTPS client(s): HTTP POST
--> 201 created.
Each request has a unique tracsaction ID and contains multiple sub-requests
MyApp extracts sub-requests from a request
MyApp posts each sub-request on a JMS queue for external backend system
External system consumes and processes each sub-request and post
sub-response on another JMS queue or topic
MyApp consumes sub-responses and correlates them by transaction ID into a
single response
Send the response back to client
MyApp is going to be deployed on 4 or more nodes to support geo-redundancy.
I am thinking of Akka cluster and trying to come up with a design but still
have difficulties:
1) Request*Reader*Actor: read and ack requests
Question: client should be able to connect to any node. Do I need 4 of
this, one per node, or a clustered actor is ok, or there's a better way?
2) RequestReaderActor on receiving a request message:
2a) Sends the request to Request*Handler*Actor: split the request into
multiple sub-requests and put them on JMS queue
Question: Should I instead make RequestReaderActor a router to spawn a set
of RequestHandlerActors to handle potentially large load?
2b) Creates a ResponseAggregatorActor to wait with timeout and
correlate sub-responses from external system
3) SubResponseReaderActor: a JMS client to consume sub-responses from
external system
Question: similar to 1), do I need 4 of this, one per node?
Question: on receiving sub-response, how do I tell this actor to forward
the sub-response to the matching (by request ID) ResponseAggregatorActor?
4) What is the cost of creating actors on the fly? In general, when should
I prefer dynamic actors vs pre-created ones?
Thanks in advance for your comments, which certainly guide me to a better
design.
Khoa
--
>>>>>>>>>> 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.