Hello, I have this use case and I would be curious if Akka is good solution for it and how to do it correctly. I tried just hello world in Akka..
We have application on single server with consumes event of users' events from message queue; generates user analytics from them; saves user analytics into database and serves recommendations based on these user analytics via rest api. There are several 10k user events per second and 10k recommendation calls per second. Usually when user is online he generates a lot of events. We do not store user analytics immediately but we cache them and flush changes to db every minute. If there is a request for recommendation we firstly check cache before the database. <https://lh6.googleusercontent.com/-kNTQ0OVDl1o/U_0M_EGQTmI/AAAAAAAADag/wkCMl8k7XHc/s1600/Untitled%2Bdrawing.png> Requests for recommendations can come from different data centres in different continents. It is important that recommendation is always fresh, not stale, even if it would take longer to return recommendation. Most of the time one user will be server from one datacenter but it may also happen that it will be server from two data centres in his same session on web. We have perf problems now, especially when user is on different continent because all users are still server from the single application. And we would like to be able to scale this up 100x. We would like to also achieve that when we are upgrading this applications we can do it in parts but it will be still running, e.g. we upgrade US application but EU and Asian application will serve recommendations in this time even for US users until US node is UP. 1. Is it good use case for Akka? 2. What is the best way to do it? 3. Can it be achieved like this? It will be one akka cluster over all regions - with tree nodes US, EU, Asia. Actors consumers - consumes events from message queue send it to cluster and message will be routed to node for this user. If there is no actor for this user it will create one in node based on user ip address Actors recommenders - rest api for recommendations done Spray. DNS will be set up that way that it will always end up by the nearest node. Will find use analytics actors on this node and send back analytics. When actor for this user will be on different node e.g. user was before in EU but not moved to US. It will create actor on this node (US) and send message to former node (EU) to return latest analytics and shut down actor there. Actors user analytics - for event from consumers update analytics in case of event from consumer actor; for events from recommenders return recommendations based on analytics; if there was some change send message to db writer actors every minute Actors db writers - pool of db writers -- >>>>>>>>>> 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.
