[Opensim-dev] Asset Server Rest Interface

Sean Dague sean at dague.net
Mon Nov 5 14:08:08 UTC 2007


On Mon, Nov 05, 2007 at 02:39:22PM +0100, Tleiades Hax wrote:
> On 11/5/07, Sean Dague <sean at dague.net> wrote:
> >
> > On Mon, Nov 05, 2007 at 10:11:39AM +0100, Stefan Andersson wrote:
> > > Uh, not entirely sure how to read the current state of the draft, but
> > just wanted to make sure that
> > > POST /assets/new should returd assetid in response, as we can't rely
> > > on everybody 'playing nice'.
> >
> > My initial thought was that it returns the full object, with UUID in
> > place.
> 
> 
> I think it is a bad idea to let the asset server assign the asset id, this
> will make it necessary for the client to wait for the asset id to be
> returned, leading to a lot of situations where the client will hold an
> "internal" id, and then later fix up the internal representation with the
> actual and real asset id.
> 
> One of the beauties, almost the only one I can think of actually, by using
> UUID's as a data type for id's is that they can be created and assigned
> client side, without fear of collision and/or elaborate schemes for ensuring
> uniqueness.
> 
> By implementing a protocol where the assets server is responsible we force
> the hand of the client designers and architects to either create assets in a
> synchronous process or force them into a situation where assets have two
> id's, an "internal id" and a public "external id". I would strongly
> recommend that we leave it up to the client to assign the asset id.

Fair enough.  Given that we aren't allowing update anyway, we can handle
the colliding case by returning a bad error code on POST.

If that is the case, I think we should be doing 

POST /assets/assetid/UUID

Instead of POST /assets/new

Which will ensure that if you've built a spreader based on URL that
POST, GET, and DELETE requests for the same asset are going to the same
server with no additional work.

       -Sean

-- 
__________________________________________________________________

Sean Dague                                       Mid-Hudson Valley
sean at dague dot net                            Linux Users Group
http://dague.net                                 http://mhvlug.org

There is no silver bullet.  Plus, werewolves make better neighbors
than zombies, and they tend to keep the vampire population down.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071105/6ed7819c/attachment-0001.pgp>


More information about the Opensim-dev mailing list