You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by geert <ge...@gmail.com> on 2013/07/08 19:35:03 UTC

under the hood architecture of camel-jetty and camel-http4

Hello all,

I'm working on the concept for a camel route and I have some high level
questions about the internal architecture of camel and especially
camel-jetty and camel-http4. I need an extremely fast processing time and
for this I want to control the connection pool, enforce keep-alive
connections, timing out of connections, ... 

My route will take http soap requests (call A) and dispatch them to multiple
web services using soap once more (call B). I know how to write this route,
so that's not the question. My issue is that I want to exert high control
both connection pools. I already know there are quite a few parameters you
can set, as explained in various article on google, the docs and the forum,
for example

http://camel.apache.org/jetty.html and
http://camel.apache.org/http4.html and 
http://camel.apache.org/how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html
etc..

But I would like to understand the underlying architecture so that it can be
confirmed that above settings will be sufficient or that I need to start
digger deeper and how I best tackle this digging. Any pointers and advice
are appreciated. Below are a few points where I would like to have answers,
pointers to doc, corrections if I didn't get it, confirmation if I got it,
suggestions, advice, ... Both high and detailed reactions are appreciated:

- I want to enforce the usage of a connection pool and keep-alive
connections for call A and call B. Most simple solution is to use the
standard configuration options, explained in the links above. Because the
camel components just wrap jetty and http client, I really need to start
looking at respectively the docs of jetty and http client to understand the
possible parameters and their implications?

- If the documented configuration parameters are not sufficient for my
needs, I need to take the existing components and enrich them or even write
my own component. To give a very crazy example, I could have a "my-jetty"
component and let it point to an hard coded jetty server.

- Another idea, probably a very bad one and only valid for call B is to
forget about camel-http4: I could write my own processor to do the call B
and integrate it into the route. I could then try to write the processor
such that it would use a self-built connection pool?

- camel-cxf ensures that soap is being integrated into the built-in jetty
server automatically, so I don't need to worry about the fact that I'm using
a very specific kind of http request (SOAP). I really only need to focus on
the http communications going on under the hood, ie. jetty and httpclient?

- Would I be able to influence the configuration of the built-in jetty under
the hood of camel (without going via camel-jetty) and would this
configuration be picked up at run time? I'm mentioning this because I'm
considering to deploy the whole application on servicemix, where I have high
control over the jetty server (if I use the right version of servicemix :-)


Best regards, thank you for reading and big thank you if you also respond
:-)

geert




--
View this message in context: http://camel.465427.n5.nabble.com/under-the-hood-architecture-of-camel-jetty-and-camel-http4-tp5735291.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: under the hood architecture of camel-jetty and camel-http4

Posted by Willem jiang <wi...@gmail.com>.
Hi   

Please see my comments inline.  

--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, July 9, 2013 at 1:35 AM, geert wrote:

> Hello all,
>  
> I'm working on the concept for a camel route and I have some high level
> questions about the internal architecture of camel and especially
> camel-jetty and camel-http4. I need an extremely fast processing time and
> for this I want to control the connection pool, enforce keep-alive
> connections, timing out of connections, ...  
>  
> My route will take http soap requests (call A) and dispatch them to multiple
> web services using soap once more (call B). I know how to write this route,
> so that's not the question. My issue is that I want to exert high control
> both connection pools. I already know there are quite a few parameters you
> can set, as explained in various article on google, the docs and the forum,
> for example
>  
> http://camel.apache.org/jetty.html and
> http://camel.apache.org/http4.html and  
> http://camel.apache.org/how-to-use-camel-as-a-http-proxy-between-a-client-and-server.html
> etc..
>  
> But I would like to understand the underlying architecture so that it can be
> confirmed that above settings will be sufficient or that I need to start
> digger deeper and how I best tackle this digging. Any pointers and advice
> are appreciated. Below are a few points where I would like to have answers,
> pointers to doc, corrections if I didn't get it, confirmation if I got it,
> suggestions, advice, ... Both high and detailed reactions are appreciated:
>  
> - I want to enforce the usage of a connection pool and keep-alive
> connections for call A and call B. Most simple solution is to use the
> standard configuration options, explained in the links above. Because the
> camel components just wrap jetty and http client, I really need to start
> looking at respectively the docs of jetty and http client to understand the
> possible parameters and their implications?

For the jetty service side, there is no much parameters those you can change.
But for  the client side, you can configure the connection pool, connection time out etc through the http4 options.
>  
> - If the documented configuration parameters are not sufficient for my
> needs, I need to take the existing components and enrich them or even write
> my own component. To give a very crazy example, I could have a "my-jetty"
> component and let it point to an hard coded jetty server.

  
>  
> - Another idea, probably a very bad one and only valid for call B is to
> forget about camel-http4: I could write my own processor to do the call B
> and integrate it into the route. I could then try to write the processor
> such that it would use a self-built connection pool?

You could do it yourself, but you don't have to.
   
>  
> - camel-cxf ensures that soap is being integrated into the built-in jetty
> server automatically, so I don't need to worry about the fact that I'm using
> a very specific kind of http request (SOAP). I really only need to focus on
> the http communications going on under the hood, ie. jetty and httpclient?

If you don't need to change the soap request or response, you don't need to use the camel-cxf component.  
>  
> - Would I be able to influence the configuration of the built-in jetty under
> the hood of camel (without going via camel-jetty) and would this
> configuration be picked up at run time? I'm mentioning this because I'm
> considering to deploy the whole application on servicemix, where I have high
> control over the jetty server (if I use the right version of servicemix :-)


Using the camel-servlet component, you can leverage the web container function which servicemix already provides.  
>  
>  
> Best regards, thank you for reading and big thank you if you also respond
> :-)
>  
> geert
>  
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/under-the-hood-architecture-of-camel-jetty-and-camel-http4-tp5735291.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).