Question On Using Spring Remoting Against Camel Remoting

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Question On Using Spring Remoting Against Camel Remoting

Carlo Camerino-2
Hi,

I have this question. We have a requirement in a project in which we have to
use remoting for our application. Reading the Spring Documentation, it says
that it is possible to do remoting via Spring Remoting Facilities. They have
several options and I opted to use the JMS Version.

Here is my scenario,

All Of the business objects would no longer be wired directly to their
interfaces. All of the classes are to be wired via some remoting.
Normally, all of our business objects can be attached directly. The
requirement this time would be the other way around. We'd have to do it
somewhat like ejb approach in which we deploy the business objects in
another container.

Spring offers several options including hessian, burlap, httpinvoker, and
jms. We are opting for the JMS option but we're trying to look at ways on
how it get it to work.

I've read that camel offers remoting also through spring remoting.

Should I use camel's version of it?
What benefits will I get if I use camel's version?
Also is this the right path? For example I have 50 business objects all of
them would have to be accessed remotely, is this the proper approach to
this?
I can do it the web service way but if remoting is possible it will be a lot
easier for me.

appreciate your comments

thanks

carlo
Reply | Threaded
Open this post in threaded view
|

Re: Question On Using Spring Remoting Against Camel Remoting

Bruno Borges
Wrong path my friend.

Camel is not a "service container". It is a message routing framework. It  
routes messages (in which might contain a data object, a file, an xml,  
etc...)
You can "send" and/or "receive" messages with Camel, using different  
protocols, some remote, some not. It is up to you on how to start/end the  
route.

You can though achieve what you want with Camel, but if you will be writing  
routes with only two endpoints, it will be useless.

Now, if you want one entry point only, and from there find out which  
service should be invoked based on some data, then Camel is the right way  
to go.

If you want to know more about it, let us know.

Cheers,
Bruno
Reply | Threaded
Open this post in threaded view
|

Re: Question On Using Spring Remoting Against Camel Remoting

jstrachan
In reply to this post by Carlo Camerino-2
2009/11/10 Carlo Camerino <[hidden email]>:

> Hi,
>
> I have this question. We have a requirement in a project in which we have to
> use remoting for our application. Reading the Spring Documentation, it says
> that it is possible to do remoting via Spring Remoting Facilities. They have
> several options and I opted to use the JMS Version.
>
> Here is my scenario,
>
> All Of the business objects would no longer be wired directly to their
> interfaces. All of the classes are to be wired via some remoting.
> Normally, all of our business objects can be attached directly. The
> requirement this time would be the other way around. We'd have to do it
> somewhat like ejb approach in which we deploy the business objects in
> another container.
>
> Spring offers several options including hessian, burlap, httpinvoker, and
> jms. We are opting for the JMS option but we're trying to look at ways on
> how it get it to work.
>
> I've read that camel offers remoting also through spring remoting.
>
> Should I use camel's version of it?

Sure, why not.


> What benefits will I get if I use camel's version?

Its very easy to switch to a different protocol from JMS to HTTP to
RMI to TCP etc.  Your code will be middleware agnostic...
http://camel.apache.org/hiding-middleware.html


You can also easily add a Content Based Router or indeed any other EIP
pattern either at the client side or server side.

Also Camel supports asynchronous operations to
http://camel.apache.org/using-exchange-pattern-annotations.html


> Also is this the right path? For example I have 50 business objects all of
> them would have to be accessed remotely, is this the proper approach to
> this?

Its either Spring remoting - or go JAXWS or REST I'd say. They've all
got strengths and weaknesses.

If you want WSDLs / XSDS and stuff, then maybe JAXWS is a simpler approach?

--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/
Reply | Threaded
Open this post in threaded view
|

AW: Question On Using Spring Remoting Against Camel Remoting

Schneider Christian
Hi Carlo,

I think the main question for you is: Do you want just remoting inside one
application (client and server are inside the same release unit), or do you
want to offer services to another application?

If you want simple remoting then you can directly expose your business
objects. In this case you can use any of the named technologies. Often you
will use code first here as it is less work to do. Many people use service
facades even in this case as not all of your object graphs can be easily
transported through all transports.

If you want to offer services then you should go contract first and use a
service facade. In this case you define a stable representation of some of
the business objects for the service. These will often be pure data transfer
objects as these can be easily transported. You will also want to avoid
complex object graphs and instead rather use trees.
For this case the typical technology would be JAX-WS/JAXB with code
generation from a wsdl which will be your service contract.

Greetings

Christian


Christian Schneider
Team Handel und Risikomanagement
Informationsverarbeitung Business Solutions Trading
EnBW Systeme Infrastruktur Support GmbH

Informationsverarbeitung
Business Solutions
Handel und Dispatching
Durlacher Allee 93
76131 Karlsruhe

Tel : +49-(0)721-63-15482
Mail: [hidden email]

Sitz der Gesellschaft: Karlsruhe
Handelsregister: Amtsgericht Mannheim   HRB 108550
Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
Geschäftsführer: Jochen Adenau, Dr. Peter Krampf

-----Ursprüngliche Nachricht-----
Von: James Strachan [mailto:[hidden email]]
Gesendet: Dienstag, 10. November 2009 15:19
An: [hidden email]
Betreff: Re: Question On Using Spring Remoting Against Camel Remoting


Its either Spring remoting - or go JAXWS or REST I'd say. They've all
got strengths and weaknesses.

If you want WSDLs / XSDS and stuff, then maybe JAXWS is a simpler approach?

--
James
-------
http://macstrac.blogspot.com/

Open Source Integration
http://fusesource.com/
Reply | Threaded
Open this post in threaded view
|

Re: Question On Using Spring Remoting Against Camel Remoting

Carlo Camerino-2
In reply to this post by jstrachan
Thanks A Lot For The Answer

I think this would be a good option so that I could hide
implementation details in the future

http://camel.apache.org/hiding-middleware.html

>>Its either Spring remoting - or go JAXWS or REST I'd say. They've all
>>got strengths and weaknesses.

>>If you want WSDLs / XSDS and stuff, then maybe JAXWS is a simpler approach?

Actually the reason why i went with remoting rather than going with
jaxws is all my beans will actually be remotely called.
it is somehow more transparent on the developer's part that he is
actually calling a bean outside, if i go the jaxws way, i would have
to generate different artifacts and stuff
it would take mostly spring configuration to actually change the
behavior of the beans. i'm using wicket as a front end and the beans
are mapped automatically through annotations.
However if I use the jms version, then i would be able to get the
benefits of having brokers as well.

i'm looking at other advantages. I think camel would provide me a lot
that's why i'm considering it more having used it a lot before
Reply | Threaded
Open this post in threaded view
|

Re: Question On Using Spring Remoting Against Camel Remoting

Carlo Camerino-2
In reply to this post by Schneider Christian
thanks for the reply

On Tue, Nov 10, 2009 at 6:42 AM, Schneider Christian
<[hidden email]> wrote:
> Hi Carlo,
>
> I think the main question for you is: Do you want just remoting inside one
> application (client and server are inside the same release unit), or do you
> want to offer services to another application?

yes we are gonna use remoting inside one application only.

> If you want simple remoting then you can directly expose your business
> objects. In this case you can use any of the named technologies. Often you
> will use code first here as it is less work to do. Many people use service
> facades even in this case as not all of your object graphs can be easily
> transported through all transports.

what if i use jms transport for it?

> If you want to offer services then you should go contract first and use a
> service facade. In this case you define a stable representation of some of
> the business objects for the service. These will often be pure data transfer
> objects as these can be easily transported. You will also want to avoid
> complex object graphs and instead rather use trees.
> For this case the typical technology would be JAX-WS/JAXB with code
> generation from a wsdl which will be your service contract.
>
 we don't have any requirement yet of exposing a wsdl web service.
we will have this requirement in the future but i think i could use
another bean for this

> Greetings
>
> Christian
>
>
> Christian Schneider
> Team Handel und Risikomanagement
> Informationsverarbeitung Business Solutions Trading
> EnBW Systeme Infrastruktur Support GmbH
>
> Informationsverarbeitung
> Business Solutions
> Handel und Dispatching
> Durlacher Allee 93
> 76131 Karlsruhe
>
> Tel : +49-(0)721-63-15482
> Mail: [hidden email]
>
> Sitz der Gesellschaft: Karlsruhe
> Handelsregister: Amtsgericht Mannheim   HRB 108550
> Vorsitzender des Aufsichtsrats: Dr. Bernhard Beck
> Geschäftsführer: Jochen Adenau, Dr. Peter Krampf
>
> -----Ursprüngliche Nachricht-----
> Von: James Strachan [mailto:[hidden email]]
> Gesendet: Dienstag, 10. November 2009 15:19
> An: [hidden email]
> Betreff: Re: Question On Using Spring Remoting Against Camel Remoting
>
>
> Its either Spring remoting - or go JAXWS or REST I'd say. They've all
> got strengths and weaknesses.
>
> If you want WSDLs / XSDS and stuff, then maybe JAXWS is a simpler approach?
>
> --
> James
> -------
> http://macstrac.blogspot.com/
>
> Open Source Integration
> http://fusesource.com/
>
Reply | Threaded
Open this post in threaded view
|

Re: Question On Using Spring Remoting Against Camel Remoting

Carlo Camerino-2
if i use this class coming from spring

org.springframework.jms.listener
Class SimpleMessageListenerContainer

there is a property called concurrentconsumers.

if i don't set a value it defaults to 1.

in camel, if i use the jms component and i don't set a value on
concurrentconsumers?

what would be my default value?

will it create a new thread automatically for every request that arrives?