[Recommendations]: Migrating one Big Java Application to Akka

43 views
Skip to first unread message

Harit Himanshu

unread,
May 21, 2015, 7:07:00 PM5/21/15
to akka...@googlegroups.com
Hello there!

I have been reading a lot about akka lately (with one weekend playing). The ability to supervise and recover from crash is exactly what I need for my current project.

About current project
  1. It is written in Java.
  2. It is deployed on client’s machine.
  3. This has one project that does many things - processing log files, responds to web request, run scheduled jobs amongst other things.
  4. This project uses executors when possible to spawn threads as needed to parallelize the effort.

Why I think it is better candidate for akka
  1. As deployed on client’s box it’s not trivial to know if its is up and running. Supervisor hierarchy would help the project to recover from errors if possible, or else inform us (in some way, messaging, email)
  2. Better Monitoring, with different monitoring actors, better hierarchies and separation of concerns
  3. Log Processing with akka-streams and back-pressure (I realized a recent customer issue could have been avoided if we had akka-streams in place)
  4. Help thinking in actors and staying away from synchronize and locks.

Recommendation Needed
  1. There are many parts where I believe that re-writing in akka would be useful and better but its better to take baby steps at a time as we are still learning.
  2. Also, we (team of 2 are planning to pick Scala) plan to create a scaffolding around current project.
    1. The scaffolding is Parent/ApplicationActor which calls our current project
    2. We plan to achieve to this one level of abstraction so as to get flexibility for doing more things with Scala and Akka

I am looking our for advices/criticism/suggestions from all of you to make sure I that either this plan is worthless or I have enough ideas to make an informed decision.

Please enlighten!
Thank you
+ Harit Himanshu

Konrad Malawski

unread,
May 31, 2015, 5:17:59 PM5/31/15
to Akka User List
Hi Harit,
Allow me to respond in-line to sentences where I have something to say:

  1. As deployed on client’s box it’s not trivial to know if its is up and running. Supervisor hierarchy would help the project to recover from errors if possible, or else inform us (in some way, messaging, email)
Exactly, handling errors gracefully is something supervision is excellent for. 
  1. Better Monitoring, with different monitoring actors, better hierarchies and separation of concerns
  2. Log Processing with akka-streams and back-pressure (I realized a recent customer issue could have been avoided if we had akka-streams in place)
Great that you found a use-case "in the wild"! We actually often saw clients not applying back-pressure in their systems
leading to overload and stability problems, so Akka Streams are a direct answer addressing this need. We think that 
more and more developers will come to realise that back-pressure is a crucial tool to have at your disposal and "built in".
 
Recommendation Needed
  1. There are many parts where I believe that re-writing in akka would be useful and better but its better to take baby steps at a time as we are still learning.
Sounds like a good plan, big-boom changes are rarely successful in my experience. 
Progressing as one learns the tools and experimenting what works in your domain and what not is crucial for a nice end result I think.

  1. Also, we (team of 2 are planning to pick Scala) plan to create a scaffolding around current project.
    1. The scaffolding is Parent/ApplicationActor which calls our current project
    2. We plan to achieve to this one level of abstraction so as to get flexibility for doing more things with Scala and Akka

Sounds good, please be aware that Akka Persistence in 2.3 is experimental, and there will be changes (we are making them right now) which make it a fully supported module in 2.4 which is currently in its milestones phase. 

--
Cheers,
Konrad 'ktoso' Malawski

Harit Himanshu

unread,
May 31, 2015, 5:49:09 PM5/31/15
to akka...@googlegroups.com
Thanks a lot Konrad. That gives me some confidence in that my plan looks sane :-)
I went ahead and started ramping up on Scala and Akka and try to model my first problem.   

I asked that problem in "Is it a good way to initialize Actor?". Your advice was really helpful and I started on approach where I made some progress and stuck because of some other issue. I tried to search a lot in documentation but could not understand the behavior, so I asked another question here

Will look forward to replies to understand what is going on.

Thanks a lot again
+ Harit Himanshu 

--
>>>>>>>>>> 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 a topic in the Google Groups "Akka User List" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/akka-user/bxOeflkzArs/unsubscribe.
To unsubscribe from this group and all its topics, send an email to akka-user+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages