You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@river.apache.org by Bishnu Gautam <bi...@hotmail.com> on 2014/05/28 07:51:27 UTC

River/Jini with WebSocket

Hi all
Have anyone tried to integrate river application with WebSocket Application. If anyone have experience, could you share it. That would be a great help.
RegardsBishnu
 		 	   		  

Re: River/Jini with WebSocket

Posted by Gregg Wonderly <gr...@wonderly.org>.
I think of this working at the endpoint level.  An HTTP endpoint, capable of consuming any of the appropriate web serializations (through a parameterized CODEC passed to a constructor), that would then devise a Method object to invoke would do the trick.

The EndPoint would know about Annotations that would provide mappings between URIs and Methods, using a pluggable web technology based factory.

This would then allow Jini services to become Web services seamlessly.

Gregg

Sent from my iPhone

> On May 28, 2014, at 4:21 AM, Bishnu Gautam <bi...@hotmail.com> wrote:
> 
> 
> Thanks Dawid for your experience. It sounds pretty interesting. Definitely, it would be great to see your solution regarding Web Socket or Web-Service. I think if we are able to expose jini service through Web Socket, jini/river can bring another momentum in distributed object field. Please keep it up and lets share the experience and also the source codes.
> RegardsBishnu
> 
> Bishnu Prasad Gautam
> 
> 
>> Date: Wed, 28 May 2014 10:27:31 +0200
>> From: dawid@travellinck.com
>> To: dev@river.apache.org
>> Subject: Re: River/Jini with WebSocket
>> 
>> I've gone 'half way' - I've created a service that tracks and publishes
>> Jini services as web services - either as SOAP using JAX-WS, or as a
>> RESTful resource using JAX-RS (or both at that same time). I did this
>> using an embedded Grizzly HTTP container, and it's all built in Dennis
>> Reedy's Rio framework.
>> 
>> As both of these technologies are annotations-driven, I had quite a
>> tough time with this. The "thing" to ultimately expose as a service ends
>> up being a generated smart proxy (i.e. a Rio proxy), and this has lost
>> all the annotations. I had to use BCEL to generate, on the fly, a new
>> proxy on top of this smart proxy, one which has the annotations from the
>> original service interface applied to it, so that standard frameworks
>> can expose it as a valid web service. This generated proxy also needed
>> to properly track the service disappearing and re-appearing, so that it
>> can publish/unpublish the service.
>> 
>> I imagine it won't be extremely different to expose a service as a web
>> socket channel - one would just have to figure out what you want this
>> channel to map to, i.e. requests/responses from some Jini service, or
>> Jini events, or whatever.
>> 
>> I have not been in a position to open-source my Jini web container just
>> yet (even though I wrote it almost two years ago, gulp!). When I am in a
>> position to do so, I'll definitely share it on this list.
>> 
>> Good luck! In the world of today, Jini really needs seemless web
>> interoperability - both to consume and expose services.
>> 
>> Dawid Loubser
>> 
>> 
>> 
>>> On 28/05/2014 07:51, Bishnu Gautam wrote:
>>> Hi all
>>> Have anyone tried to integrate river application with WebSocket Application. If anyone have experience, could you share it. That would be a great help.
>>> RegardsBishnu
>                         

RE: River/Jini with WebSocket

Posted by Bishnu Gautam <bi...@hotmail.com>.
Thanks Dawid for your experience. It sounds pretty interesting. Definitely, it would be great to see your solution regarding Web Socket or Web-Service. I think if we are able to expose jini service through Web Socket, jini/river can bring another momentum in distributed object field. Please keep it up and lets share the experience and also the source codes.
RegardsBishnu

Bishnu Prasad Gautam


> Date: Wed, 28 May 2014 10:27:31 +0200
> From: dawid@travellinck.com
> To: dev@river.apache.org
> Subject: Re: River/Jini with WebSocket
> 
> I've gone 'half way' - I've created a service that tracks and publishes
> Jini services as web services - either as SOAP using JAX-WS, or as a
> RESTful resource using JAX-RS (or both at that same time). I did this
> using an embedded Grizzly HTTP container, and it's all built in Dennis
> Reedy's Rio framework.
> 
> As both of these technologies are annotations-driven, I had quite a
> tough time with this. The "thing" to ultimately expose as a service ends
> up being a generated smart proxy (i.e. a Rio proxy), and this has lost
> all the annotations. I had to use BCEL to generate, on the fly, a new
> proxy on top of this smart proxy, one which has the annotations from the
> original service interface applied to it, so that standard frameworks
> can expose it as a valid web service. This generated proxy also needed
> to properly track the service disappearing and re-appearing, so that it
> can publish/unpublish the service.
> 
> I imagine it won't be extremely different to expose a service as a web
> socket channel - one would just have to figure out what you want this
> channel to map to, i.e. requests/responses from some Jini service, or
> Jini events, or whatever.
> 
> I have not been in a position to open-source my Jini web container just
> yet (even though I wrote it almost two years ago, gulp!). When I am in a
> position to do so, I'll definitely share it on this list.
> 
> Good luck! In the world of today, Jini really needs seemless web
> interoperability - both to consume and expose services.
> 
> Dawid Loubser
> 
> 
> 
> On 28/05/2014 07:51, Bishnu Gautam wrote:
> > Hi all
> > Have anyone tried to integrate river application with WebSocket Application. If anyone have experience, could you share it. That would be a great help.
> > RegardsBishnu
> >  		 	   		  
> 
> 
 		 	   		  

Re: River/Jini with WebSocket

Posted by Dawid Loubser <da...@travellinck.com>.
I've gone 'half way' - I've created a service that tracks and publishes
Jini services as web services - either as SOAP using JAX-WS, or as a
RESTful resource using JAX-RS (or both at that same time). I did this
using an embedded Grizzly HTTP container, and it's all built in Dennis
Reedy's Rio framework.

As both of these technologies are annotations-driven, I had quite a
tough time with this. The "thing" to ultimately expose as a service ends
up being a generated smart proxy (i.e. a Rio proxy), and this has lost
all the annotations. I had to use BCEL to generate, on the fly, a new
proxy on top of this smart proxy, one which has the annotations from the
original service interface applied to it, so that standard frameworks
can expose it as a valid web service. This generated proxy also needed
to properly track the service disappearing and re-appearing, so that it
can publish/unpublish the service.

I imagine it won't be extremely different to expose a service as a web
socket channel - one would just have to figure out what you want this
channel to map to, i.e. requests/responses from some Jini service, or
Jini events, or whatever.

I have not been in a position to open-source my Jini web container just
yet (even though I wrote it almost two years ago, gulp!). When I am in a
position to do so, I'll definitely share it on this list.

Good luck! In the world of today, Jini really needs seemless web
interoperability - both to consume and expose services.

Dawid Loubser



On 28/05/2014 07:51, Bishnu Gautam wrote:
> Hi all
> Have anyone tried to integrate river application with WebSocket Application. If anyone have experience, could you share it. That would be a great help.
> RegardsBishnu
>