On 31/10/14 14:33, Akka Team wrote:
Hi Francois,
On Thu, Oct 30, 2014 at 11:36 PM, Francois <fan...@gmail.com
<mailto:fan...@gmail.com>> 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.
This is one option. You can also embed an ActorSystem in other
applications and you might be able to expose a Future based API to its
external collaborators. In this case Akka would not communicate
"over-the-wire" but in JVM.
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.
Akka does not need any special thing to boot. You can just create an
ActorSystem instance and it starts. You can even explicitly pass in a
Config object if you want to fully control how it gets its initial
configuration.
OK, thanks.
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
appreciated).
That is a very outdated link since it refers to Akka 1.3.1 which is
very old now. Some of the current frameworks for HTTP related work are:
- Play (playframework.com <http://playframework.com>) which can be
used as a REST endpoint, but generally geared towards Web development
- Spray (spray.io <http://spray.io>) which is built on top of Akka
and integrates easily with Akka. Best used for REST endpoints
- Akka Http which is Spray ported to the new Akka Streams
infrastructure. This is currently pre-experimental and the docs are
sketchy right now. Also we change the API very aggressively in every
2-3 weeks
That....
I thought it could be linked to
http://doc.akka.io/docs/akka/2.3.6/scala/typed-actors.html.
Typed actors are no longer recommended, we will eventually phase them
out.
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 !
As a very first step you should read the documentation
(http://doc.akka.io/docs/akka/2.3.6/scala.html?_ga=1.228976988.1520294582.1409309043)
especially the Introduction, General and Actors sections.
There is also a list of books that can be helpful:
http://doc.akka.io/docs/akka/2.3.6/additional/books.html
(although some of them might be about earlier Akka versions, but 2.2
and 2.3 are sufficiently similar)
-Endre
... and that let me think that I may have given a bad idea of what I was
looking for, or my understanding of Akka. I'm sorry, it happens quite
frequently - say I'm English level (that's better for my ego than saying
I'm not able to articulate three ideas in an email).
So, before anything else, thanks for the answers and the time you spent
writting them.
For some more context: I know Akka, and even if I don't use it on a
daily basis, I did several little project with it. I follow its
ecosystem, and I even gave talk on it (see for example
http://fr.slideshare.net/normation/nrm-scala-ioscalaetzeromqv10).
I'm not looking for general answers here, but more for feedback and/or
precise material about how other people already did what I'm thinking to
do so that I can understand preciselly the constraints and the validity
of the general approach.
I'm pretty sure I'm not the only one in the situation of adding some
touch of Akka in an existing Java/Scala web application, I also suspect
that the more direct approach is to build new part of the application in
Akka and make it communicate to legacy throught some kind of API (REST,
or like in my talk thanks to some other event framework like 0mq), but I
need to understand how an in app integration can be done because that
last scenario seems to better fit the way we build and distribute to
user Rudder.
So, does anybody know of (public/scrutainable) examples of integration
of akka in a legacy web application not previously thought for actors?
Especially example where the akka bootstraping and where actors are used
for a logical, small subpart of the application, ideally some kind of
database access layer ?
(i search but didn't found anything really relevant or terribly
outdated, and that's the reason for these emails).
Thansk !
--
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.