Hi Isaac, Technically, running the services within a single process should reduce required number of virtual processors (cores). However, this might also lead to a rise in processing speed.
For example, if using one process per service requires about 2.0Ghz Quad core processing power, running the very same services using a single thread per service might require about 3.0Ghz Dual core processing power. Using multi threading to run the microservices within a single process is a great idea and will help simplify the process of running the platform. However, I don't think this might be the best approach to optimize the required processing power. The most effective way to run the platform I can think of would be to ditch demo server and run the services within docker containers. In addition to that, using containers gives you the flexibility of working with each individual service in a sort of "plug and play" manner as well. Just my thoughts :) On Mon, Jan 28, 2019 at 8:54 PM Myrle Krantz <[email protected]> wrote: > Sorry Isaac, > > can't help you here. I had an entirely different idea in mind for how to > do this, and yours looks more promising, actually. But I can't tell you > why it's not working. > > Best Regards, > Myrle > > On Sun, Jan 27, 2019 at 12:46 AM Isaac Kamga <[email protected]> > wrote: > > > Happy weekend fineracters, > > > > Hope this email finds you in good health. > > > > In an effort to facilitate local development of Fineract CN, I picked up > > the One-process deployment issue [1] which when resolved can enable > > developers to run the platform in a single process. > > > > Some research led me to the possibility of running each microservice in a > > it's own ClassLoader while ensuring that the ServiceRunner uses a single > > JVM to run in a single process. After having tried to adapt the method in > > [2] where several Spring Boot apps are launched in the same process to > our > > Service-starter and demo-server, I encountered this error [3]. The code > of > > the workdone so far is on the *oneprocess* branch of my fork of > > service-starter[4] and demo-server [5]. > > > > @Myrle Krantz <[email protected]> Is there a way to have the "java -jar > > xyz-service-boot-0.1.0-BUILD-SNAPSHOT.jar" command run a single Thread as > > opposed to running in the process assigned by ProcessBuilder() ? > > > > @Markus Geiss <[email protected]> , is it possible that what could help in > > this case is using an entire Pool of threads to get this executed ? > Asking > > as you developed the fineract-cn-async [6] library and I observed that > upon > > running demo-server, when the processors on my machine get exhausted, the > > logs indicate that a separate thread (not main) shows up to run any > > available service like Notifications and Groups. > > > > Any help from the community would be much appreciated. > > > > At Your Service, > > Isaac Kamga. > > > > [1] https://issues.apache.org/jira/browse/FINCN-25 > > [2] > > > https://github.com/rameez4ever/springboot-demo/tree/master/springboot-multi-service-launcher > > > > [3] https://pastebin.com/qBDW52Y5 > > [4] > https://github.com/Izakey/fineract-cn-service-starter/tree/oneprocess > > [5] https://github.com/Izakey/fineract-cn-demo-server/tree/oneprocess > > [6] https://github.com/apache/fineract-cn-async > > >
