[Opensim-dev] autoexpose every scene (object) attribute over http?
Toni Alatalo
antont at kyperjokki.fi
Wed Jan 13 04:28:31 UTC 2010
Hi,
would it be feasible for Opensim to automatically expose every scene &
scene object etc. attribute over http? I think everything is possible to
add at least by hand to e.g. REST handlers, but having them all without
(much) extra manual work would be nice. Perhaps the upcoming scene
refactor can facilitate this too?
The reason why have been thinking this is to be able to write a client
test suite (for Naali) which would do things like:
#change an object on the client side
e = scene.entities[MYTESTOBJECT_UUID] #the scene entity in the client,
for example a prim
e.pos.x = 20 #self documenting i hope :)
e.sync() #sync the change made in the viewer to the server, using sludp
or equivalent
#test whether the information on the server matches what the client was
supposed to set it to
assert e.pos.x ==
urlopen("http://testregion:9009/scene/entities/%s/pos/x" %
MYTESTOBJECT_UUID).read()
#(here ignoring types and float conversions and possible inaccuracies
etc for simplicity, authentication likewise)
I think having a test suite like this would be invaluable when working
on protocol stuff, e.g. optimizing packets or testing alternative
protocols etc .. but also to test the default impls when refactoring
code, kind of an integration test 'cause needs all parts to work. Would
be very straightforward to write that kind of tests using libomv too,
obviously, when that is more suitable than Naali.
Of course having such at least in one way complete REST or equivalent
easy access API would probably be useful for many other things too.
Perhaps is easy enough to do with .NET reflection stuff, which is also
needed for OAR saving of the data in the upcoming components to work?
(or how does the plan go there exactly?)
Regarding the earlier post, "about web services" by ssm2017 asking about
the general state of the web services and where they are in the code
etc., I personally have no clue 'cause haven't used them yet -- others
here know, and finding them in the code with normal searches is probably
easy.
~Toni
More information about the Opensim-dev
mailing list