users@jersey.java.net

RE: [Jersey] RESTful Ordering (was: JAX-RS == REST? Or not? (was Re: [Jersey] What HATEOAS actually means))

From: Markus Karg <markus.karg_at_gmx.net>
Date: Sat, 20 Feb 2010 09:09:27 +0100

Anyways, their storing of carts content of their servers was a business
decision, not a technical one. ;-)

 

From: Kevin Duffey [mailto:andjarnic_at_yahoo.com]
Sent: Samstag, 20. Februar 2010 03:23
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] RESTful Ordering (was: JAX-RS == REST? Or not? (was
Re: [Jersey] What HATEOAS actually means))

 


That's a good example, Marc. I forgot about Amazon keeping the contents of
my cart over a period of time. I've come back days later, forgot I had a
cart going, add some stuff and then fall over when I see the price, to
finally realize it still had stuff I left in there from before. Maybe they
have a 30 day timeout for carts. :D

--- On Fri, 2/19/10, Marc Hadley <Marc.Hadley_at_Sun.COM> wrote:


From: Marc Hadley <Marc.Hadley_at_Sun.COM>
Subject: Re: [Jersey] RESTful Ordering (was: JAX-RS == REST? Or not? (was
Re: [Jersey] What HATEOAS actually means))
To: users_at_jersey.dev.java.net
Date: Friday, February 19, 2010, 10:56 AM

On Feb 19, 2010, at 1:08 PM, Kevin Duffey wrote:
>
> That said, I can see how REST could be used for the cart example... but
(always a but) I am failing to see how anyone other than an individual
client would want to use a pure rest implementation since the burden of
maintaining state is put on them. By anyone other than individual, I
basically mean a web site... where they cater to end users.. and thus have
to deal with the scaling issues that maintaining state will put on them.
It's the HttpSession/replication nightmare all over again.. although these
days we're far better prepared to scale state than back in the late 90s when
servlets and HttpSession were first being developed with and not many people
had an idea how to replicate session data to ensure fault tolerance and
load.
>
I think its an application decision how much state its wants to maintain.
The shopping cart example is a good one, there nothing unRESTful about
having a resource that represents a shopping cart. The key point is that any
server-side state should be held by a resource rather than something
ephemeral like session state.

Personally I like the way my Amazon shopping cart works, I can use it from a
variety of clients and the state of my cart is maintained on the server.

Marc.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net