Reputation: 130
In a JEE application there is a need to get rid of numerous JMS queues that support workflow execution. A workflow typically consists of multiple sequential tasks. Tasks may contain external system calls and other business logic. Task processors are implemented as MDB. When a task processor receives a message from the input queue it performs the business logic, enriches the input message and puts it to the input queue of the next task processor in the workflows chain. If a task processor failes to perform the task depending on settings the input message is rolled back in the queue for delayed execution or is put in the error queue. Now, instead of the JMS queues a database should be used. Tasks should be persisted as rows in a database table including task status (delayed, in progress, failed and so on), destination (name/alias of the processor which should execute the task) and of course business data.
I already started to implement this requirement using JCA. My inbound connector scans a DB table for tasks and then calls the apropriate endpoints (MDBs that implement a business interface).
Are there other ways to satisfy the requirements? Maybe somebody know a lightweight open source framework for such scenarios? Please do not mention BPM frameworks.
Upvotes: 0
Views: 486
Reputation: 2312
I assume that you want to get rid of JMS because managing a lot of messages in a lot of queues is not as "lightweight" as you want... and your code base is growing!
And while your JMS solution has fulfilled them, there are many more non-functional requirements to consider for new solutions: scalability, reliability, etc. All in all, those are tough requirements to fulfill... with any technology.
Maybe you can consider different areas where "lightweight" is most important to you:
There are numerous solutions in this area, but none of them is a one-stop out-of-the-box solution for all problems. Some are batch oriented (like Spring Batch or Java Batch), others are message oriented (like Akka or Hystrix). Comparing them is a science in its own right. There are so many forces for or agains them, you won't get a perfect answer here, even if you would provide a lot of detail, like peak number of jobs, number of steps, number of external system calls, etc. I've seen it again and again: If you exactly know the business workflows, the technology can be replaced more easily... so that's a prerequisite.
Then I'd advise you to play around with different solutions (if you have the time), or stay where you are... it's probably not the worst of all possible solutions. Don't... and I really mean it: Don't implement yet another "lightweight" thing, which you can bet, won't be very "lightweight" much sooner than you can imagine.
One last thing: I share your feelings about traditional BPM frameworks, namely BPEL and friends. But there are lightweight and open-source frameworks like Camunda BPM that are worth to take a look at.
Upvotes: 1