Using Quasar with Axon

I’m about to start a CQRS project with Axon, and I’m considering using a library called Quasar (http://docs.paralleluniverse.co/quasar/) to manage the web service connections for the application. Quasar is an implementation of lightweight (non-OS) threads on the JVM as suspendable continuations called “fibers” using a Java agent to do bytecode instrumentation. I don’t know much about the underlying concurrency model of Axon’s command bus, so I’m not sure if there’s some reason the two won’t work well together. I anticipate that most of the commands posted to the bus will originate from these “fiber” threads that Quasar provides.

Would posting commands from within these non-standard “fiber” threads potentially interfere with Axon’s asynchronous handling architecture?

Sometimes concurrency issues are hard to test for predictably, so I figured I’d ask here first.

Thanks!

Hi,

the only thing that I can think of where Axon and Quasar could conflict, is when using Thread Locals and (Reentrant) Locks. However, if Quasar provides a good abstract of code “Thread” versus OS “Thread”, that shouldn’t be a problem.

Note that the Command/EventBus is only async if you use one of the Async implementations. The “Simple…” implementations process everything in the calling thread.

Cheers,

Allard