I personally feel it's better to isolate your new and legacy application 
into two separate JVMs and connect them using REST and pub/sub endpoints. 
Of course this could be a deal breaker if you cannot afford the overhead of 
the REST endpoints. Spray (which is based on Akka) is the ideal choice for 
this IMO. 

This will not only allow you to do parallel development (once REST 
endpoints are defined) but also you can start to move functionality from 
the legacy system to the new system incrementally. This will also ensure 
that you can isolate bugs, failure and performance issues independently and 
measure and demonstrate the value of introducing a new technology into your 
existing system. 

One of the best things about the Akka/Spray/Play is that they are 
container-less and can be used as a library into a system. 

I applied this system approach to migrate a system that was written in 
Java/Storm/Jetty to Scala/Akka/Spray/Play incrementally with great success. 

HTH
-Soumya





On Thursday, October 30, 2014 6:39:36 PM UTC-4, fanf wrote:
>
> Hello everybody, 
>
> I want to add Akka to an existing scala web application (not play), and 
> I'm wondering how it could be best achieve. The goal for now is not to 
> build a fully distributed and fault tolerant system, but to introduce 
> Akka at some point in the application and let its use grow, allowing to 
> set clear bound in that application and define subsystems. 
>
> A nice and solution would be to  have a new application in Akka side by 
> side with the legacy one, providing new services or REST endpoint or 
> something. 
> But I prefer to not investigate that solution for now and try to 
> understand how Akka can be incorporated into an existing app. I'm 
> particulary intersted into knowing how 1/ Akka boot in that case and 2/ 
> how to deals with the bound between actors and legacy code. 
>
> For 1/, http://doc.akka.io/docs/akka/1.3.1/scala/http.html seems to be 
> the correct resources. Is there other example or documentation on the 
> subject ? (I didn't find many other intersting one, any help would be 
> appreciated). 
>
> For 2/, let me start by saying that I have two places where I want to 
> use akka at first: some kind of batch processes, which are more or less 
> standalone (and so, not very interesting), and "repository", or at least 
> the proxy code between backend data storage base and the remaining code. 
> So, at one point, I imagine having an actor at the place of the existing 
> repository service, accepting messages in place of method calls. But I 
> don't see how to do that. 
>
> I thought it could be linked to 
> http://doc.akka.io/docs/akka/2.3.6/scala/typed-actors.html. Is it 
> correct ? If so, is there any ressources demoing a more complexe 
> integration ? Because I'm not sure how I implement my actor subsystem 
> from the typed actor boundaries with the legacy app. 
>
> Thanks for any help or pointer to ressources ! 
>
> -- 
> Francois ARMAND 
> http://rudder-project.org 
> http://www.normation.com 
>
>

-- 
>>>>>>>>>>      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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to