Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Camel in web apps

 
andrew ennamorato
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Camel seems like a great fit for RESTful web apps/apis. The ability to take a request, hand it off, then provide status later ("did my request make it thru the backend processing yet?") is something. I've found a little hard to do in Mule, however.

How does Camel handle something like that - a sync (or async) routing thru a few transformations or services, yet still replying or responding via the initial HTTP entry point?

In general, how much coverage of Camel & web apps (in wars, with Jetty, etc) does the book provide?
 
Claus Ibsen
author
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Camel supports both synchronous and asynchronous messaging.
http://camel.apache.org/asynchronous-routing-engine.html

For example the Camel Jetty component will leverage the continuations feature from Jetty to be able to deliver back a response on the initial HTTP entry point.
Chapter 10 in the Camel book explains this is much more details and has an example it covers to go along.

The CXF-RS and Restlet component is planned to support this as well, when we upgrade to CXF 2.3 and Restlet 2.0 in those components.

Chapter 13 covers 4 scenarios for deploying Camel in
- standalone
- web application in Apache Tomcat as example server (Spring is covered as well)
- J2EE with JBoss as example server
- OSGi with Apache Karaf as example server

But we try not to limit deployment with Camel. So you can deploy Camel in any container you like whether its IBM WebSphere, WebLogic, Glassfish, Google App Engine, Java WebStart etc., Apache ServiceMix 3.x / 4.x, etc.

 
andrew ennamorato
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Claus,

Sounds great. Will try and pick up the book soon - we have plenty of uses for something like Camel and this will be a great way to start.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic