You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Sergey Beryozkin <sb...@gmail.com> on 2011/02/28 12:10:03 UTC
How to consume JMS services
Bill,
I'm starting a new thread...
Comments inline.
On Fri, Feb 25, 2011 at 5:04 PM, Bill Burke <bb...@redhat.com> wrote:
> On 2/25/11 10:51 AM, Sergey Beryozkin wrote:
>>
>> In your opinion, why would such (Java) users prefer an HTTP centric
>> interface for consuming messages backed up by JMS stores, when they
>> just can do plain Java JMS ?
>>
>> What do you think ?
>>
>
> (Remember you asked what I think so....)
>
> I don't think people should use CXF nor Resteasy nor SOAP if their
> environment is all Java. As you said, use native Java JMS protocols.
I was not advocating the use of the native Java JMS only. If CXF
JAX-RS proxies could do it then I'd advocate using the proxies. At the
moment they can not do it. Generally speaking we would like CXF be
used everywhere, on the client and on the server side because it will
let us work on providing the additional QOS stuff via client-side
interceptors, transformations, policies, and the auto-discovery. We
don't mislead the users here. Users are clever and can always go their
own way.
>
> The benefit of using a Messaging RESTful interface is for, IMO, to provide
> lightweight inter-language/platform support. If you check out the HornetQ
> rest examples, specifically Python ones, you'll see they use the built in
> http client that comes with the language and nothing else.
+1 - this is a good reason for creating such an interface. However
we're not interested (I'm saying 'we' here, thus take it with a grain
of salt please) in encouraging CXF users to stop using CXF and start
using a Python library for consuming JMS services. What is the point
here for CXF ?
However, having a CXF JAX-RS client consuming JMS-messages using a
'JMS-centric' language can be of interest. I hope HornetQ users will
ask us about it one day :-)
>
> Through content-negotiation and JAX-RS providers we also support
> transformation of JMS client sent Java objects into the representation the
> REST client desires. And vice versa, unmarshalling of representations to
> Java objects using JAX-RS.
This is neat.
>
> As a side note, I'll eventually be pulling out the API into a specification.
> Probably submitting it as an Internet Draft at IETF so we can leverage a
> neutral and respected entity's specification process. That way, anybody
> could implement and support it.
Sounds promising. The thing is we can't do anything about it at the
CXF level. We can only write a demo showing CXF JAX-RS consumers
working with this interface.
>>
>> If people using HornetQ as a messaging solution could plugin CXF
>> JAX-RS to back up your interface then I'd be the first one who would
>> blog about it and promote it. On CXF lists we discuss CXF-based issues
>> or solutions.
>
> HornetQ REST could probably be ported quite easily to CXF as most of it is
> pure JAX-RS (minus config and the client framework). Honestly, from the
> client perspective it has nothing to do with CXF or Resteasy. The client is
> free and encouraged to use any HTTP client framework in any language they
> desire.
The client perspective is a different issue. As I said, I don't see
the point in us advocating the use of non-CXF client frameworks
because at the CXF level it does not make sense. CXF is not a
container, CXF is a web services framework and thus its success
depends on how widely it is being used. The use of the CXF JAX-RS on
the HornetQ server side is the one which would motivate me and again
hope HornetQ users will ask us about it one day :-).
>
> I think its fair to suggest to somebody asking about JMS integration
> solutions other than CXF. We encourage such posts on resteasy mail list.
Sure - unless we reckon we can provide something meaningful at the CXF level ?
> For example, I always defer to Jersey regardings WADL as I have zero
> interest in implementing or supporting it.
ok. FYI, CXF supports WADL too :-) and plans to expand on this support
thanks, Sergey
P.S. Bill - you are welcome to contribute and challenge us on the dev
list. Sorry if the previous thread caused you some grief :-). I
believe no-one meant anything more than just a protective remark. It
is obvious now it turned out to be a highly controversial one but hope
such a seasoned professional as you are can accept the attempted
clarifications and apologies which followed :-)
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
Re: How to consume JMS services
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
>
> FYI, I've tried very very hard to minimalize, lessen, remove the
> requirement or need for a specific client framework or stack other than HTTP
> to consume hornetq's REST interface. IMO, anybody writing a REST interface
> should make similar efforts. Because, otherwise, what's the point?
>
The point is to provide the add-on and up-sell features which may make the
life of the users simpler in certain cases.
Example, Christian is working on the generic tracing component which will
work for CXF consumers. It's the basic trade-off.
>
> I also think we have to be very very careful from a REST framework
> perspective to avoid marrying/coupling our frameworks to a developer's
> application. Once you've created the requirement for a framework to be
> installed both on the client and server, you've done something wrong.
>
>
See the comment above. Say CXF SOAP users can download ActievMQ or HornetQ,
and just use JMS API. They will miss on the generic tracing component. They
may not need it or they may end up duplicating the effort. Or they can
'bind' themselves to the use of the CXF api. The choice is theirs. And as I
said in the previous post, the success of CXF depends on how widely it is
being used. We are building the features which will help us convince the
users they'd be better off with going the CXF way.
> All this is why I piped in when somebody asked about JMS integration.
> Because I believe really strongly about the above. SOAP+JMS is really a
> consideration only for cross-language/platform interoperability. REST, IMO,
> is a superior approach because of the reasons listed above.
SOAP+JMS does not use HTTP. It uses JMS. CXF JAX-RS proxies may end up
supporting this feature too.
The use of the RESTful interface is interesting as it provides the users at
large with the options to try it in a non-Java environment, and it is
something new.
Is it superior to the optimized JMS over TCP/IP (used directly, or via
proxies) , performance wise, security-wise ? I'm not sure at all.
Would users prefer writing 'JMS-centric' HTTP APIs as opposed to what
proxies provide - it's a different issue but not all users will want to post
to some queue 'explicitly' as opposed to via the proxies.
> Since CXF is now embracing REST through its JAX-RS implementation,
> alternatives to SOAP-based approaches should be suggested and encouraged, at
> least by the REST guys at CXF ;)
>
>
As I said it's not SOAP vs REST but JMS vs HTTP.
I'm convinced JAX-RS is here to stay and that it (the jax-rs frontend) is an
absolutely essential part of CXF for many reasons, but I won't be swaying
existing SOAP users. They will try it themselves once/if they see it works
for them. Just telling them REST is a better option is not something I will
pursue until we have something working for them to go and try. Example, once
we have users coming in to us and asking : I have HornetQ on the other end
and I'd like to try CXF JAX-RS to consume it, then I'll step in (not that I
always wait for the users to describe the actual requirements, but in this
case it may be warranted because we have CXF options too).
Otherwise I'd encourage users to try CXF JAX-RS endpoints with the JMS
back-up - because at the CXF level we can not support the interface you
built for HornetQ.
Cheers, Sergey
>
>
>> P.S. Bill - you are welcome to contribute and challenge us on the dev
>> list. Sorry if the previous thread caused you some grief :-). I
>> believe no-one meant anything more than just a protective remark. It
>> is obvious now it turned out to be a highly controversial one but hope
>> such a seasoned professional as you are can accept the attempted
>> clarifications and apologies which followed :-)
>>
>>
> My "grief" usually doesn't last more than 2 seconds
lol :-). Great to hear it, thanks
> and I've received much much worse grief before. If I was more
> professional, and I'm not, I would have just ignored Glen's comments.
> Instead, I just couldn't resist the urge to tweak him, for that I
> apologize.
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
--
Sergey Beryozkin
Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com
Re: How to consume JMS services
Posted by Sergey Beryozkin <sb...@gmail.com>.
Alternatively, in CXF, users can just write a JAX-WS or JAX-RS endpoint and
have the runtime taking care of delivering AMQP messages and in case of
JAX-RS use the JMS properties for deciding how/where to route a given
message.
Seems to be a better option to me.
Cheers, Sergey
On Mon, Feb 28, 2011 at 5:18 PM, James Carr <ja...@gmail.com> wrote:
> AMQP as the protocol rather than propietary JMS. I'd prefer JSON as
> the format, but XML works too. The important thing on my part is that
> in java/python/nodejs land I should't care whatsoever on the format
> all I care about is that I called a method on a proxied interface in
> java and "magically" got the same object in my python or nodejs apps
> bound to the same AMQP broker. :)
>
> Last night I actually did some hacks at transforming JAXRS311
> annotations to bind to AMQP queues/exchanges and use @Paths as routing
> keys, buit we'll see how it goes.
>
> Thanks,
> James
>
>
> On Mon, Feb 28, 2011 at 11:14 AM, Bill Burke <bb...@redhat.com> wrote:
> > you mean using AMQP as a marshalling format?
> >
> > On 2/28/11 10:29 AM, James Carr wrote:
> >>
> >> Even more important... REST over AMQP will be the superior choice in
> >> the future imho. Small messages shared between java and non java
> >> consumers. FTW! :)
> >>
> >> On Mon, Feb 28, 2011 at 8:55 AM, Bill Burke<bb...@redhat.com> wrote:
> >>>
> >>>
> >>> On 2/28/11 6:10 AM, Sergey Beryozkin wrote:
> >>>>
> >>>> Bill,
> >>>>
> >>>> I'm starting a new thread...
> >>>>
> >>>> Comments inline.
> >>>>
> >>>>>
> >>>>> I think its fair to suggest to somebody asking about JMS integration
> >>>>> solutions other than CXF. We encourage such posts on resteasy mail
> >>>>> list.
> >>>>
> >>>
> >>> Especially since hornetq rest can be consumed by CXF.
> >>>
> >>>> Sure - unless we reckon we can provide something meaningful at the CXF
> >>>> level ?
> >>>>
> >>>
> >>> FYI, I've tried very very hard to minimalize, lessen, remove the
> >>> requirement
> >>> or need for a specific client framework or stack other than HTTP to
> >>> consume
> >>> hornetq's REST interface. IMO, anybody writing a REST interface should
> >>> make
> >>> similar efforts. Because, otherwise, what's the point?
> >>>
> >>> I also think we have to be very very careful from a REST framework
> >>> perspective to avoid marrying/coupling our frameworks to a developer's
> >>> application. Once you've created the requirement for a framework to be
> >>> installed both on the client and server, you've done something wrong.
> >>>
> >>> All this is why I piped in when somebody asked about JMS integration.
> >>> Because I believe really strongly about the above. SOAP+JMS is really
> a
> >>> consideration only for cross-language/platform interoperability. REST,
> >>> IMO,
> >>> is a superior approach because of the reasons listed above. Since CXF
> is
> >>> now embracing REST through its JAX-RS implementation, alternatives to
> >>> SOAP-based approaches should be suggested and encouraged, at least by
> the
> >>> REST guys at CXF ;)
> >>>
> >>>>
> >>>> P.S. Bill - you are welcome to contribute and challenge us on the dev
> >>>> list. Sorry if the previous thread caused you some grief :-). I
> >>>> believe no-one meant anything more than just a protective remark. It
> >>>> is obvious now it turned out to be a highly controversial one but hope
> >>>> such a seasoned professional as you are can accept the attempted
> >>>> clarifications and apologies which followed :-)
> >>>>
> >>>
> >>> My "grief" usually doesn't last more than 2 seconds and I've received
> >>> much
> >>> much worse grief before. If I was more professional, and I'm not, I
> >>> would
> >>> have just ignored Glen's comments. Instead, I just couldn't resist the
> >>> urge
> >>> to tweak him, for that I apologize.
> >>>
> >>> --
> >>> Bill Burke
> >>> JBoss, a division of Red Hat
> >>> http://bill.burkecentral.com
> >>>
> >
> > --
> > Bill Burke
> > JBoss, a division of Red Hat
> > http://bill.burkecentral.com
> >
>
--
Sergey Beryozkin
Application Integration Division of Talend <http://www.talend.com>
http://sberyozkin.blogspot.com
Re: How to consume JMS services
Posted by James Carr <ja...@gmail.com>.
AMQP as the protocol rather than propietary JMS. I'd prefer JSON as
the format, but XML works too. The important thing on my part is that
in java/python/nodejs land I should't care whatsoever on the format
all I care about is that I called a method on a proxied interface in
java and "magically" got the same object in my python or nodejs apps
bound to the same AMQP broker. :)
Last night I actually did some hacks at transforming JAXRS311
annotations to bind to AMQP queues/exchanges and use @Paths as routing
keys, buit we'll see how it goes.
Thanks,
James
On Mon, Feb 28, 2011 at 11:14 AM, Bill Burke <bb...@redhat.com> wrote:
> you mean using AMQP as a marshalling format?
>
> On 2/28/11 10:29 AM, James Carr wrote:
>>
>> Even more important... REST over AMQP will be the superior choice in
>> the future imho. Small messages shared between java and non java
>> consumers. FTW! :)
>>
>> On Mon, Feb 28, 2011 at 8:55 AM, Bill Burke<bb...@redhat.com> wrote:
>>>
>>>
>>> On 2/28/11 6:10 AM, Sergey Beryozkin wrote:
>>>>
>>>> Bill,
>>>>
>>>> I'm starting a new thread...
>>>>
>>>> Comments inline.
>>>>
>>>>>
>>>>> I think its fair to suggest to somebody asking about JMS integration
>>>>> solutions other than CXF. We encourage such posts on resteasy mail
>>>>> list.
>>>>
>>>
>>> Especially since hornetq rest can be consumed by CXF.
>>>
>>>> Sure - unless we reckon we can provide something meaningful at the CXF
>>>> level ?
>>>>
>>>
>>> FYI, I've tried very very hard to minimalize, lessen, remove the
>>> requirement
>>> or need for a specific client framework or stack other than HTTP to
>>> consume
>>> hornetq's REST interface. IMO, anybody writing a REST interface should
>>> make
>>> similar efforts. Because, otherwise, what's the point?
>>>
>>> I also think we have to be very very careful from a REST framework
>>> perspective to avoid marrying/coupling our frameworks to a developer's
>>> application. Once you've created the requirement for a framework to be
>>> installed both on the client and server, you've done something wrong.
>>>
>>> All this is why I piped in when somebody asked about JMS integration.
>>> Because I believe really strongly about the above. SOAP+JMS is really a
>>> consideration only for cross-language/platform interoperability. REST,
>>> IMO,
>>> is a superior approach because of the reasons listed above. Since CXF is
>>> now embracing REST through its JAX-RS implementation, alternatives to
>>> SOAP-based approaches should be suggested and encouraged, at least by the
>>> REST guys at CXF ;)
>>>
>>>>
>>>> P.S. Bill - you are welcome to contribute and challenge us on the dev
>>>> list. Sorry if the previous thread caused you some grief :-). I
>>>> believe no-one meant anything more than just a protective remark. It
>>>> is obvious now it turned out to be a highly controversial one but hope
>>>> such a seasoned professional as you are can accept the attempted
>>>> clarifications and apologies which followed :-)
>>>>
>>>
>>> My "grief" usually doesn't last more than 2 seconds and I've received
>>> much
>>> much worse grief before. If I was more professional, and I'm not, I
>>> would
>>> have just ignored Glen's comments. Instead, I just couldn't resist the
>>> urge
>>> to tweak him, for that I apologize.
>>>
>>> --
>>> Bill Burke
>>> JBoss, a division of Red Hat
>>> http://bill.burkecentral.com
>>>
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
Re: How to consume JMS services
Posted by Bill Burke <bb...@redhat.com>.
you mean using AMQP as a marshalling format?
On 2/28/11 10:29 AM, James Carr wrote:
> Even more important... REST over AMQP will be the superior choice in
> the future imho. Small messages shared between java and non java
> consumers. FTW! :)
>
> On Mon, Feb 28, 2011 at 8:55 AM, Bill Burke<bb...@redhat.com> wrote:
>>
>>
>> On 2/28/11 6:10 AM, Sergey Beryozkin wrote:
>>>
>>> Bill,
>>>
>>> I'm starting a new thread...
>>>
>>> Comments inline.
>>>
>>>>
>>>> I think its fair to suggest to somebody asking about JMS integration
>>>> solutions other than CXF. We encourage such posts on resteasy mail list.
>>>
>>
>> Especially since hornetq rest can be consumed by CXF.
>>
>>> Sure - unless we reckon we can provide something meaningful at the CXF
>>> level ?
>>>
>>
>> FYI, I've tried very very hard to minimalize, lessen, remove the requirement
>> or need for a specific client framework or stack other than HTTP to consume
>> hornetq's REST interface. IMO, anybody writing a REST interface should make
>> similar efforts. Because, otherwise, what's the point?
>>
>> I also think we have to be very very careful from a REST framework
>> perspective to avoid marrying/coupling our frameworks to a developer's
>> application. Once you've created the requirement for a framework to be
>> installed both on the client and server, you've done something wrong.
>>
>> All this is why I piped in when somebody asked about JMS integration.
>> Because I believe really strongly about the above. SOAP+JMS is really a
>> consideration only for cross-language/platform interoperability. REST, IMO,
>> is a superior approach because of the reasons listed above. Since CXF is
>> now embracing REST through its JAX-RS implementation, alternatives to
>> SOAP-based approaches should be suggested and encouraged, at least by the
>> REST guys at CXF ;)
>>
>>>
>>> P.S. Bill - you are welcome to contribute and challenge us on the dev
>>> list. Sorry if the previous thread caused you some grief :-). I
>>> believe no-one meant anything more than just a protective remark. It
>>> is obvious now it turned out to be a highly controversial one but hope
>>> such a seasoned professional as you are can accept the attempted
>>> clarifications and apologies which followed :-)
>>>
>>
>> My "grief" usually doesn't last more than 2 seconds and I've received much
>> much worse grief before. If I was more professional, and I'm not, I would
>> have just ignored Glen's comments. Instead, I just couldn't resist the urge
>> to tweak him, for that I apologize.
>>
>> --
>> Bill Burke
>> JBoss, a division of Red Hat
>> http://bill.burkecentral.com
>>
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com
Re: How to consume JMS services
Posted by James Carr <ja...@gmail.com>.
Even more important... REST over AMQP will be the superior choice in
the future imho. Small messages shared between java and non java
consumers. FTW! :)
On Mon, Feb 28, 2011 at 8:55 AM, Bill Burke <bb...@redhat.com> wrote:
>
>
> On 2/28/11 6:10 AM, Sergey Beryozkin wrote:
>>
>> Bill,
>>
>> I'm starting a new thread...
>>
>> Comments inline.
>>
>>>
>>> I think its fair to suggest to somebody asking about JMS integration
>>> solutions other than CXF. We encourage such posts on resteasy mail list.
>>
>
> Especially since hornetq rest can be consumed by CXF.
>
>> Sure - unless we reckon we can provide something meaningful at the CXF
>> level ?
>>
>
> FYI, I've tried very very hard to minimalize, lessen, remove the requirement
> or need for a specific client framework or stack other than HTTP to consume
> hornetq's REST interface. IMO, anybody writing a REST interface should make
> similar efforts. Because, otherwise, what's the point?
>
> I also think we have to be very very careful from a REST framework
> perspective to avoid marrying/coupling our frameworks to a developer's
> application. Once you've created the requirement for a framework to be
> installed both on the client and server, you've done something wrong.
>
> All this is why I piped in when somebody asked about JMS integration.
> Because I believe really strongly about the above. SOAP+JMS is really a
> consideration only for cross-language/platform interoperability. REST, IMO,
> is a superior approach because of the reasons listed above. Since CXF is
> now embracing REST through its JAX-RS implementation, alternatives to
> SOAP-based approaches should be suggested and encouraged, at least by the
> REST guys at CXF ;)
>
>>
>> P.S. Bill - you are welcome to contribute and challenge us on the dev
>> list. Sorry if the previous thread caused you some grief :-). I
>> believe no-one meant anything more than just a protective remark. It
>> is obvious now it turned out to be a highly controversial one but hope
>> such a seasoned professional as you are can accept the attempted
>> clarifications and apologies which followed :-)
>>
>
> My "grief" usually doesn't last more than 2 seconds and I've received much
> much worse grief before. If I was more professional, and I'm not, I would
> have just ignored Glen's comments. Instead, I just couldn't resist the urge
> to tweak him, for that I apologize.
>
> --
> Bill Burke
> JBoss, a division of Red Hat
> http://bill.burkecentral.com
>
Re: How to consume JMS services
Posted by Bill Burke <bb...@redhat.com>.
On 2/28/11 6:10 AM, Sergey Beryozkin wrote:
> Bill,
>
> I'm starting a new thread...
>
> Comments inline.
>
>>
>> I think its fair to suggest to somebody asking about JMS integration
>> solutions other than CXF. We encourage such posts on resteasy mail list.
>
Especially since hornetq rest can be consumed by CXF.
> Sure - unless we reckon we can provide something meaningful at the CXF level ?
>
FYI, I've tried very very hard to minimalize, lessen, remove the
requirement or need for a specific client framework or stack other than
HTTP to consume hornetq's REST interface. IMO, anybody writing a REST
interface should make similar efforts. Because, otherwise, what's the
point?
I also think we have to be very very careful from a REST framework
perspective to avoid marrying/coupling our frameworks to a developer's
application. Once you've created the requirement for a framework to be
installed both on the client and server, you've done something wrong.
All this is why I piped in when somebody asked about JMS integration.
Because I believe really strongly about the above. SOAP+JMS is really a
consideration only for cross-language/platform interoperability. REST,
IMO, is a superior approach because of the reasons listed above. Since
CXF is now embracing REST through its JAX-RS implementation,
alternatives to SOAP-based approaches should be suggested and
encouraged, at least by the REST guys at CXF ;)
>
> P.S. Bill - you are welcome to contribute and challenge us on the dev
> list. Sorry if the previous thread caused you some grief :-). I
> believe no-one meant anything more than just a protective remark. It
> is obvious now it turned out to be a highly controversial one but hope
> such a seasoned professional as you are can accept the attempted
> clarifications and apologies which followed :-)
>
My "grief" usually doesn't last more than 2 seconds and I've received
much much worse grief before. If I was more professional, and I'm not,
I would have just ignored Glen's comments. Instead, I just couldn't
resist the urge to tweak him, for that I apologize.
--
Bill Burke
JBoss, a division of Red Hat
http://bill.burkecentral.com