users@jersey.java.net

Re: [Jersey] Would it be possible to create a RESTful web service and deploy it in a clustered environment?

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Thu, 26 Feb 2009 13:45:42 +0100

On Feb 26, 2009, at 1:37 PM, Srinivas Naresh Bhimisetty wrote:

> Paul Sandoz wrote:
>>
>> On Feb 26, 2009, at 1:10 PM, Srinivas Naresh Bhimisetty wrote:
>>
>>> Hi,
>>>
>>> one of my colleagues asked me this question today.
>>> He wants to create a RESTful Web Service using Jersey and deploy
>>> it in a clustered environment.
>>
>> If you conform to the REST stateless constraint then you do not
>> require clustering. Strictly speaking the application is not that
>> RESTful if it relies on session state.
> True. But he just wants to use it just for some demonstration
> purpose. The main goal was to demonstrate clustering, he wanted to
> use the RESTful web service in the demo, if possible.

Chalk and Cheese :-)

I would recommend not calling it RESTful, or say that it is conforming
to some REST contraints but not the stateful constraint.

Demos more in tune with REST would be showing load balancing or fail
over with multiple nodes e.g. the load is distributed evenly over x
number of nodes, and if one node goes down the service is still
running on (x -1) nodes.

Paul.