Running Camunda BPMN Spring boot using Netty instead of Tomcat - spring-boot

I am using Camunda Spring boot starter library for running my Camunda BPMN engine and also done some custom Java implementation. I am planning to run the project using Netty instead of Tomcat servlet. Please help me for running the Java spring boot application with Netty (Reactive way). Thanks in advance for your help.

You did not elaborate why you want to do this. Speculating about your requirements, I would recommend to look into Camunda Cloud (possibly self-managed https://docs.camunda.io/docs/self-managed/overview/). It uses a different process engine (and Netty) under the hood, which has a complete different modern architecture (no relational DB, CQRS style) and is designed as a cloud native distributed system for highest volumes.

Related

Is Spring Boot just for Microservices ? can i use Spring Boot for Monolithic architecture?

Is Spring Boot just for Microservices or can I use Spring Boot for Monolithic architecture?
Spring Boot in itself has nothing to do with microservices. It's a Spring module which simply makes the configuration of your app easier. As such, it absolutely can be used in a monolithic app.
From the official docs:
Spring Boot makes it easy to create stand-alone, production-grade Spring based Applications that you can "just run".
We take an opinionated view of the Spring platform and third-party libraries so you can get started with minimum fuss. Most Spring Boot applications need very little Spring configuration.
Features
Create stand-alone Spring applications
Embed Tomcat, Jetty or Undertow directly (no need to deploy WAR files)
Provide opinionated 'starter' dependencies to simplify your build configuration
Automatically configure Spring and 3rd party libraries whenever possible
Provide production-ready features such as metrics, health checks and externalized configuration
Absolutely no code generation and no requirement for XML configuration

Will Spring Boot support WAR deployment of Spring Webflux applications in the future?

I know that Spring Boot, in contrast to Spring Framework, does not support WAR deployment for Spring WebFlux applications. My question is simple: will it ever in the future?
My use case is this: we have a lot of customers that still live in the traditional "we deploy everything on application server X" world. So although we would like to push standalone JARs, they are not ready (yet). We heavily use Spring Boot, and would really like to continue to do so, so abandoning that is not an option.
We are building reactive applications and would like to use Spring WebFlux for that, but we still need to deploy to application servers, so that is not an option. In the meantime we avoid Spring WebFlux and simply use Controllers, which works, but is not as elegant. Hence my question.
There are no plans to support Spring WebFlux with war deployments. However, you can use reactive return types, Reactor's Mono and Flux and those from RxJava, with Spring MVC packaged and deployed as war. That will allow you to build an entire reactive pipeline as you would with WebFlux, but deployed to an application server. It doesn't give you all of the benefits of full-blown reactive (no event loop-based concurrency, for example), but it can be a good middle ground for those in your situation.

Is it ok to connect two camunda instances to the same database?

We are developing a spring boot application(generated with jhipster, with oauth) and we want to use camunda.
The camunda spring boot starter(with the process engine only) worked, however the we had problems with the other two starters(rest, web) in our current setup(although they work with a simple project like in the camunda examples).
We actually prefer using the embedded process engine like this, however, we would like the operational advantages of the camunda webapps.
The preferred solution we thought about was to connect to the same database another process engine(camunda standalone or springboot app with camunda web starter). This seems to be working in our tests.
The other solution would be to use camunda standalone and communicate via rest api, and subscribe to topics for service tasks.
Do you see any problems with the preferred solution?
Yes, it's perfectly fine running two engines against same database. Just make sure to set camunda.bpm.job-execution.enabled=false in the other instance(if you don't want it to pick up and execute jobs)

How do I deploy BPMN process to process engine with Camunda Spring Boot

I have built a Camunda BPM with Spring Boot as a Standalone Process Engine, it will be waiting some requests for starting process from other web applications
now, my co-works have design a few processes in BPMN Tools, I think I should use the REST API deploy these BPMN to Standalone Process Engine, how can I do? or other solution which allows uploading BPMN files to Standalone Process Engine?
Is there any example?
We want to use Camunda BPM in our Application, so we have to solve some problems
Thank you
When you are using Spring Boot as an application container, do you really need to deploy processes at runtime? It seems to me that the common scenario in this case would be "bundle the processes and the application and deploy on startup". If you need to change or add processes, just stop, repackage and start your Camunda Spring Boot application. To do this, the SpringProcessEngineConfiguration allows setting deploymentResources.
If you really need to change processes at runtime, make sure you add the REST API to your Spring Boot bundle and follow https://docs.camunda.org/manual/7.3/api-references/rest/#deployment-post-deployment.
We also have created a Camunda community extension that makes dealing with Camunda and Spring Boot a lot simpler: https://github.com/camunda/camunda-bpm-spring-boot-starter

With Spring do you still need a java application server and when?

looks to me you need tomcat or some other servlet engine for the web part.
what about data access part using hibernate and jms? Thanks.
No, you don't need an application server, you can see Spring as a proprietary, modular application server implementation / adapter. But you still need an a servlet container.
Data access part: you can use hibernate and some standalone connection pool
jms: Spring is not a JMS provider, but it nicely integrates POJOs with any JMS provider
Spring also has comprehensive transactions support
Finally you have jmx and aop support built-in and easy integration with bean validation, jpa, web services, rmi, jci, task scheduling, caching...
As you can see you can either use certified application server and Java EE stack or built on top of Tomcat and pick Spring modules you need. Sometimes Spring uses standard Java EE APIs (like JPA), more often it builts its own.

Resources