On Thu, Mar 24, 2016 at 5:24 PM, Krzysztof Sobkowiak < krzys.sobkow...@gmail.com> wrote:
> I think, the way to Camel 3 should also include the renovation of the Core > (if really necessary) or even rewriting and > making it more asynchronous, e.g. using rx.java (the later can be > eventually part of Camel 4 roadmap if too dangerous > for Camel 3). > What a coincidence! This thought crossed my mind today. Indeed the core of Camel has become too complicated in terms of how the moving parts stick together. A long time ago I had serious concerns about how deep the stack traces have become, with Channels, Interceptors, helpers, and what not, and I proposed an iterative, horizontally-expanding, pipeline-based model for the core routing rather than a vertically-expanding, deep stack traces model. This also relates to the concurrency model. Camel revolves around the idea that more threads == more performance. Our processing actually hijacks/piggy-backs the threads of the 3rd party library of the component (Netty, Jetty, Spring JMS, etc. threads), and this is not good. One just needs to look around: reactive programming, coroutines, event loops, generators, goroutines (in Go), etc. to realise we're kinda obsolete by now. The async routing engine was a step in the right direction, but most components don't even support it. Now that we know the reactive programming model is here to stay and it wasn't a fad, I feel we should definitely go in that direction. We should look at Akka, RxJava and the Reactive Streams [3] spec. In an ideal world, we would reimplement the core of Camel based on the principles of Reactive Programming and/or Actors. That's assuming we want to stay on the JVM (:D), because the use case of Camel ties it pretty well with the concurrency constructs of Go. [1] http://akka.io/ [2] https://github.com/ReactiveX/RxJava [3] http://www.reactive-streams.org/ *Raúl Kripalani* PMC & Committer @ Apache Ignite, Apache Camel | Integration, Big Data and Messaging Engineer http://about.me/raulkripalani | http://www.linkedin.com/in/raulkripalani Blog: raul.io | twitter: @raulvk <https://twitter.com/raulvk>