Apache Camel - Backbone of IT infrastructure? - apache-camel

I have a bunch of web services. These services are written in different languages and expose a REST api. A front end web site accesses these services. The requests are proxied through a nginx server which does load balancing and connection management. This has been rock solid and very performant.
I'm contemplating replacing nginx with Apache Camel to take advantage of its powerful mediation and integration patterns. I have a few questions since I'm completely new to the Java ecosystem.
How performant is Apache Camel? Would the req/sec of a jetty end point be comparable to nginx?
Spring looks confusing. Can a standalone Camel application be deployed to something like AWS Elastic Beanstalk? If I want allow Camel to process more requests/sec, do I just add another Camel server in tandem?
Are there any pitfalls to using Apache Camel as the backbone to my entire IT infrastructure?

You have not mentioned what the major motivation is for changing the current architecture. Here are my comments:
How performant is Apache Camel? Would the req/sec of a jetty end point
be comparable to nginx?
I doubt if you will get the same req/sec performance from camel jetty as you do with nginx. Please dont take my word and try a load yourself with both the setup. I feel the message/exchange handling by camel will incur some cost that is missing form nginx. But both have different uses.
If I want allow Camel to process more requests/sec, do I just add
another Camel server in tandem.
This question is confusing. I assume your requests passed through one nginx. If you add multiple camel servers you need the sender to be available of the multiple camel servers or use some routing or load balancing mechanism in front of it that is aware of multiple camel instances.
Are there any pitfalls to using Apache Camel as the backbone to my
entire IT infrastructure?
This depends on what your problems are and how much of it is resolved by camel. Camel is an integration framework that supports multiple protocols. I see you only have web services which is supported by camel. But your current infrastructure already supports it.

Related

Sleuth in Apache camel

Hi I am new to Apache Camel, but in my application our team implemented this in so many places. Now we are migrating existing came implemented application to Micro services, here we are not finding any option to implement Spring cloud Sleuth with existing camel implemented service, any solution?
There's nothing there out of the box. You would have to create such a tracing implementation yourself.

Lightweight messaging on GAE

Does you have any experience with messaging on GAE? Is there a messaging framework that can successfully run on GAE? I know that Apache Camel provides some kind of components that can run on GAE but is it really usable? What about Spring Integration? Or any other tips?
Thank you.
You have some stuff (task queues) built into GAE for messaging. Start with that.
The problem with running stand alone integration soltuions (Camel, Spring Integration, ActiveMQ..) on GAE is that they need to open tcp listeners and start threads, which is not really an option in GAE. At least not the standard java way.
You can run Camel to some point if you want to leverage the Camel DSL and such things. But all of Camel will not work. Camel does not include a messaging solution either.
The other option is likely to use some external messaging source, such as a RabbitMQ or ActiveMQ hosted somewhere else. Like EC2 or some cloud service.

Difference between Apache CXF Jetty endpoint and embedded Jetty container

I started building a web application and made it runnable with an embedded Jetty server. I then decided to try out Apache CXF (which I have never used before) to provide either a SOAP/XML or a REST/JSON interface (haven't decided which yet). Now I am slightly confused by the various posts / docs I have read.
I understand that CXF actually provides (using Jetty internally) its own endpoints that can be published. Is that correct? But it looks like it can also be bundled and deployed into existing web containers (eg Tomcat, and therefore I assume also Jetty) - is this also correct?
If both of these are correct, what are the pros / cons / gotchas of using the CXF Jetty endpoints out-of-the-box as opposed to using a separate container (especially if the separate container is also embedded Jetty)?
It really depends on your application and deployment strategy. Jetty is a lightweight, embedded application server that you can use to run your own web-server. If you choose Apache Tomcat or JBoss or any other application server your application will be likely packaged as a WAR and deployed. The difference is , in Jetty your application controls the container whereas with others its the other way around. Regardless of the choice of application server , CXF endpoints are designed to work with any container supporting JAX-RS or JAX-WS specifications.
Note: You don't need Jetty if you are going to deploy it on Tomcat or other containers.

Web services on Jboss ESB

I am looking for a bit of clarity around JBoss ESB and JBoss WS. I have been asked to build an ESB solution using web services (SOAP/http(s)).
What advantages does using ESB over JBoss WS give me, and how does it fit with the client request - e.g. does the client call the endpoint on the ESB, which is then forward to the Web Service?
Any points would be appreciated.
The main advantage is loose coupling of the service and the client. The ESB service could be a proxy to the Web Service. If the Web Service implementation or contract changes, different versions could be exposed on the ESB. The ESB also provides other "mediation" stuff like object transformations and routing.. that way the Web Service can just do it's job, and the ESB service can be used to expose the WS as desired to consumers.
And yes, the client would call the ESB endpoint. I had similiar questions on a project several months back, and found this article to be very useful: http://community.jboss.org/wiki/SOA-P43SimpleWebServiceProxy

Can I use Apache Camel with Jax-ws implementation in application server (e. WAS, WLS) without CXF or Axis2?

I dont want to use Axis2 or CXF with Camel. Is it possible to configure camel with JAX-WS reference implementation or weblogic application server or websphere application server or tomcat + jax-ws refrence implementation?
Camel provides 2 web services components out of the box: camel-cxf and camel-spring-ws. For any other web service integration just use plain java. From any Java code, you can send a message to Camel using the ProducerTemplate. Then that way you can bridge the JAX-WS of the application server with Camel. We used to have an old example at Apache Camel that showed how to integrate Axis 1.4 with Camel, but that examples has been removed as part of cleanup recently.
As far as I know that is not possible. The camel-axis and camel-cxf components are directly using the cxf and axis classes. You could use the SoapDataFormat but this is just for simple cases and not a full stack.

Resources