aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/docs/NGIW.Commands.html
diff options
context:
space:
mode:
authorDavid Walter Seikel2016-01-01 21:57:24 +1000
committerDavid Walter Seikel2016-01-01 21:57:24 +1000
commitbc44e6b3339976fc08d86eecc79f972fb90aecab (patch)
tree8c4dc473840ba773a7a2ee393b2045cc758dc024 /docs/NGIW.Commands.html
parentAdded a test HTML page for bringing the design docs into the source repo. (diff)
downloadSledjHamr-bc44e6b3339976fc08d86eecc79f972fb90aecab.zip
SledjHamr-bc44e6b3339976fc08d86eecc79f972fb90aecab.tar.gz
SledjHamr-bc44e6b3339976fc08d86eecc79f972fb90aecab.tar.bz2
SledjHamr-bc44e6b3339976fc08d86eecc79f972fb90aecab.tar.xz
Import the design docs from Drupal / MediaWiki.
Diffstat (limited to 'docs/NGIW.Commands.html')
-rw-r--r--docs/NGIW.Commands.html45
1 files changed, 45 insertions, 0 deletions
diff --git a/docs/NGIW.Commands.html b/docs/NGIW.Commands.html
new file mode 100644
index 0000000..310c176
--- /dev/null
+++ b/docs/NGIW.Commands.html
@@ -0,0 +1,45 @@
1<html>
2<head>
3</head>
4<body bgcolor="black" text="white" alink="red" link="blue" vlink="purple">
5<p>In a virtual world there are many places where an actor (either an avatar directed by a human, an avatar directed by a program (bot), or a scripted object) wants to do something to an object. Something other than just directly change a property of the object. The LSL programming model is that scripts react to events. So I propose we unify commands, LSL events and REST by manipulating even queues.</p>
6<p>&nbsp;</p>
7<h2> Proposal </h2>
8<p>If <a href="http://sim.ulat.or/obj/">http://sim.ulat.or/obj/</a><strong>oid</strong> is the url to some object with id <strong>oid</strong>, and we have a http connection to <a href="http://sim.ulat.or">http://sim.ulat.or</a> then</p>
9<ul>
10<li>PUT /obj/<strong>oid</strong>/eq -- adds a new event to the queue (at the end)</li>
11<li>PUT /obj/<strong>oid</strong>/eq/0 -- adds a new event to the queue at the <strong>beginning</strong></li>
12<li>PUT /obj/<strong>oid</strong>/eq/9 -- same behavior as PUT /obj/<strong>oid</strong>/eq</li>
13<li>GET /obj/<strong>oid</strong>/eq -- returns the full event queue</li>
14<li>PUT /obj/<strong>oid</strong>/eq/<strong>eventid</strong> -- changes the event (or adds one) with id <strong>eventid</strong></li>
15<li>GET /obj/<strong>oid</strong>/eq/<strong>eventid</strong> -- returns the event with id <strong>eventid</strong> or an error</li>
16<li>GET /obj/<strong>oid</strong>/eq/0 -- returns the first event from the queue or an error</li>
17<li>GET /obj/<strong>oid</strong>/eq/9 -- returns the <strong>last</strong> event in the queue</li>
18<li>DELETE /obj/<strong>oid</strong>/eq/<strong>eventid</strong> -- removes an event from the queue and returns it</li>
19<li>DELETE /obj/<strong>oid</strong>/eq/0 -- removes the first event from the queue and returns it, or returns an error</li>
20</ul>
21<p>And maybe</p>
22<ul>
23<li>PUT /obj/<strong>oid</strong>/eq -- add a bunch of events to a queue</li>
24<li>PUT /eq -- add a bunch of events to a bunch of objects?</li>
25</ul>
26<p>&nbsp;</p>
27<h2> What a PUT really sends to the server </h2>
28<p>Supose we are telling the server about the avy touching an object. The actual text that gets sent might look like:</p>
29<pre> PUT /obj/<strong>oid</strong>/eq HTTP/1.1
30 Host: sim.ulat.or
31 Content-Type: application/json
32 Content-Length: xxxx
33
34 {"touch_start":{"force":13,"avy":"uuid","time":1311663233}}
35</pre>
36<p>So you can see it is fairly heavy weight compared to a tuned command language. I will investigate what subsequent requests look like when using the http 1.1 persistent connection features. At the worst the http overhead can be amortized across many commands by using the last two forms of request. The last would look like:</p>
37<pre> PUT /eq HTTP/1.1
38 Host: sim.ulat.or
39 Content-Type: application/json
40 Content-Length: xxxx
41
42 [{command1...},{command2...},...]
43</pre>
44</body>
45</html>