37 lines
2 KiB
ReStructuredText
37 lines
2 KiB
ReStructuredText
.. _deployment-scenarios:
|
||
|
||
Use-case and Deployment Scenarios
|
||
=================================
|
||
|
||
**How and in which use-case and deployment scenarios can I use Akka?**
|
||
|
||
Akka can be used in two different ways:
|
||
|
||
* As a library: used as a regular JAR on the classpath and/or in a web app, to be put into ‘WEB-INF/lib’
|
||
* As a microkernel: stand-alone microkernel, embedding a servlet container along with many other services.
|
||
|
||
Using Akka as library
|
||
---------------------
|
||
|
||
This is most likely what you want if you are building Web applications.
|
||
There are several ways you can use Akka in Library mode by adding more and more modules to the stack.
|
||
|
||
Actors as services
|
||
^^^^^^^^^^^^^^^^^^
|
||
|
||
The simplest way you can use Akka is to use the actors as services in your Web application. All that’s needed to do that is to put the Akka charts as well as its dependency jars into ‘WEB-INF/lib’. You also need to put the ‘akka.conf’ config file in the ‘$AKKA_HOME/config’ directory.
|
||
Now you can create your Actors as regular services referenced from your Web application. You should also be able to use the Remoting service, e.g. be able to make certain Actors remote on other hosts. Please note that remoting service does not speak HTTP over port 80, but a custom protocol over the port is specified in ‘akka.conf’.
|
||
|
||
Using Akka as a stand alone microkernel
|
||
---------------------------------------
|
||
|
||
Akka can also be run as a stand-alone microkernel. It implements a full enterprise stack:
|
||
|
||
Use BivySack for packaging your application
|
||
-------------------------------------------
|
||
|
||
"BivySack" For Akka - SBT plugin which creates a full akka microkernel deployment for your project.
|
||
|
||
Quick and dirty SBT Plugin for creating Akka Microkernel deployments of your SBT Project. This creates a proper "akka deploy" setup with all of your dependencies and configuration files loaded, with a bootable version of your project that you can run cleanly.
|
||
|
||
Read more about it here `<http://github.com/bwmcadams/sbt-akka-bivy>`_.
|