Forgot to mention the deployment phase, we have an Archiva server where we 
deploy all jars and using Maven app-assembler plugin we generate shell 
files that are friendly with supervisord, init.d system-v scripts style 
(proper PID, etc)
Each micro-service is just a Java main with proper SIGTERM or SIGINT 
handling so each service can shutdown properly (this important for Akka 
cluster)

Example of app-assembler pom, running "mvn package" on each server will 
generate executables for each micro-service,
my scripts of course do more things, it moves the stuff out of target 
folder to a well know location:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0";
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/xsd/maven-4.0.0.xsd";>

   <modelVersion>4.0.0</modelVersion>
   <artifactId>admin-runner</artifactId>
   <packaging>pom</packaging>

   <dependencies>
      <dependency>
         <groupId>com.yourcompany</groupId>
         <artifactId>admin</artifactId>
         <version>1.0</version>
      </dependency>
   </dependencies>

   <build>
      <plugins>
         <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>appassembler-maven-plugin</artifactId>
            <executions>
               <execution>
                  <phase>package</phase>
                  <goals>
                     <goal>assemble</goal>
                  </goals>
                  <configuration>
                     <repositoryLayout>flat</repositoryLayout>
                     <programs>
                        <program>
                           <id>admin</id>
                          
 <mainClass>com.yourcompany.admin.AdminMain</mainClass>
                           <platforms>
                              <platform>unix</platform>
                           </platforms>
                           <jvmSettings>
                              <initialMemorySize>256m</initialMemorySize>
                              <maxMemorySize>256m</maxMemorySize>
                              <extraArguments>
                                 <extraArgument>-server</extraArgument>
                                 <extraArgument>-XX:+UseG1GC</extraArgument>
                                
 <extraArgument>-XX:+ParallelRefProcEnabled</extraArgument>
                              </extraArguments>
                           </jvmSettings>
                        </program>
                     </programs>
                  </configuration>
               </execution>
            </executions>
         </plugin>
      </plugins>
   </build>
</project>



On Sunday, February 26, 2017 at 12:42:22 PM UTC, Guido Medina wrote:
>
> Hi Klaus,
>
> I have another example for you, I have an application in production 
> running among 15 JVMs, it is in Java 8 + Akka cluster (2.4.latest),
> The project itself is a Maven project with modules, the following are 
> important aspects of my design:
>
>    - each module has a different role and is assumed it runs on its own 
>    JVM.
>    - there is a common.jar that is shared among all modules for message 
>    classes and utilities.
>    - each module has a supervisor actor and each supervisor has a set of 
>    workers (think of it as programmatically RoundRobinRouter created from a 
>    list of actors which can be remote) which is shared among all other 
>    supervisors allowing each JVM to locate a worker of a type regardless of 
>    its location.
>    - each worker type does a different thing so from a module perspective 
>    it only needs to locate the worker for a specific type and delegate/send 
>    the message to it, such worker can be local or remote (akka location 
>    transparency in action)
>    - but the most important aspect is that each supervisor is registered 
>    to the cluster events in order to exchange its cache with the new connect 
>    node/role/supervisor or get rid of a cache if a node leaves the cluster.
>
> And finally, this is a FX trading system (financial industry) which has 
> some low latency requirement, it has been running now in production for 
> over a year.
> Hope this example helps,
>
> Guido.
>
> On Monday, February 20, 2017 at 10:09:18 AM UTC, klaus.wie...@gmail.com 
> wrote:
>>
>> Okay,
>>
>> so I did my homework myself. I rewrote the 'lightbend's transformation 
>> example from akka-sample-cluster-scala' to
>> have separated codebases (JARS) for each role and one for the common 
>> messages. It is running not only in different JVMs but also on different 
>> cluster nodes (machines).
>>
>> If anybody is interested, please give me an e-mail (address in header) 
>> and I'll publish it in my blog. 
>>
>> Have fun!
>>
>> Klaus
>>
>> PS: Thanks again to Rafal and Tal
>>
>> On Friday, February 17, 2017 at 11:38:10 AM UTC+1, klaus.wie...@gmail.com 
>> wrote:
>>>
>>>
>>>
>>> On Thursday, February 16, 2017 at 4:40:10 PM UTC+1, Rafał Krzewski wrote:
>>>>
>>>>
>>>> I'm sorry but this is getting into "please do my homework for me" 
>>>> territory, so I must respectfully decline. 
>>>>
>>>> Cheers,
>>>> Rafał
>>>>
>>>
>>> You make me feel like a schoolboy - after all these years a 
>>> heart-warming experience.
>>>
>>> Thank you for all your help!
>>> Klaus 
>>>
>>

-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to