From 080e27a38c508b2370cfe7f0152183f99a17131a Mon Sep 17 00:00:00 2001 From: David Walter Seikel Date: Sat, 20 Feb 2016 12:31:37 +1000 Subject: Rearrange the docs. --- docs/common/BlackListAssetServersTracker.html | 37 + docs/common/NGIW.Commands.html | 46 + docs/common/NGIW.html | 50 + docs/common/Nails.html | 2519 +++++++++++++++++++++++++ docs/common/OMG-WTF-BBQ.html | 25 + docs/common/README.Bookie | 33 + docs/common/README.libraries | 34 + docs/common/README.mumble | 5 + docs/common/The_Naminator.txt | 14 + docs/common/no_accounts.txt | 29 + docs/common/portals.txt | 106 ++ docs/common/privacy.txt | 5 + 12 files changed, 2903 insertions(+) create mode 100644 docs/common/BlackListAssetServersTracker.html create mode 100644 docs/common/NGIW.Commands.html create mode 100644 docs/common/NGIW.html create mode 100644 docs/common/Nails.html create mode 100644 docs/common/OMG-WTF-BBQ.html create mode 100644 docs/common/README.Bookie create mode 100644 docs/common/README.libraries create mode 100644 docs/common/README.mumble create mode 100644 docs/common/The_Naminator.txt create mode 100644 docs/common/no_accounts.txt create mode 100644 docs/common/portals.txt create mode 100644 docs/common/privacy.txt (limited to 'docs/common') diff --git a/docs/common/BlackListAssetServersTracker.html b/docs/common/BlackListAssetServersTracker.html new file mode 100644 index 0000000..d080e87 --- /dev/null +++ b/docs/common/BlackListAssetServersTracker.html @@ -0,0 +1,37 @@ + +BlackListAssetServersTracker + + + +

Late night realization about multiple asset servers and Censorship and such.

+

(04:33:43 AM) alice_crush: Oh!

+

(04:36:29 AM) alice_crush: What if we let folks run more than one inventory asset server, and make some asset servers private/subscription. Which just means if a person takes no action they'll never see an asset from a private server. *Then* say folks in Japan can have a sim full of nasty lolicon, and folks from countries that make it illegal to see such pictures won't ever be accidentally exposed. *And* the grid will stay 'pure' never serving "bad" images. "Hey idiot, if you choose to download illegal content, don't complain to us!"

+

(04:38:17 AM) alice_crush: so you could walk around in a t-shirt with a grossly illegal image on it, and unless someone is subscribed to the right asset server they just see gray.

+

(04:39:07 AM) alice_crush: have to get to like phase 2 or whatever, not the stop gap quick fix proxying feature

+

(04:40:26 AM) onefang: That goes to the whole "Hey it's just a web server, you can implement whatever access policy you want" thing.

+

(04:40:53 AM) onefang: "You are not authorized to see this t-shirt.".

+

(04:41:04 AM) alice_crush: though would need some special client side controls/subscriptions something like that.

+

(04:41:26 AM) onefang: "Knomes stole this skirt, quick get hippos."

+

(04:41:34 AM) alice_crush: "This texture above your security grade" lol

+

(04:43:07 AM) onefang: "These are not the clothes you are searching for."

+

(04:43:10 AM) alice_crush: minor issue of when uploading a texture specifying which asset server it goes to...

+

(04:44:03 AM) alice_crush: you could give me your illegal images (drawing of the profit, peace be on him) I could put them out in my sim, and never see the blasphemy myself

+

(04:44:33 AM) onefang: Well, no, that's the whole point of allowing multiple inventory stores. You get to manage them, decide what goes where. Sometimes using ordinary web CMS software, or a file browser for local ones..

+

(04:45:37 AM) alice_crush: Hmmm maybe folks could sell say a pg skin and a X version, and folks could choose to avoid the X asset servers... and not see grey people.

+

(04:46:20 AM) alice_crush: Lol, theres always a clever policy choice that makes the thought police un necessary.

+

(04:46:47 AM) alice_crush: LL will hate it (Breaks the shared experience rule)

+

(04:47:00 AM) alice_crush: OS will probably hate it too

+

(04:48:08 AM) onefang: I'm not particularly worried about pissing off those two groups.

+

(04:48:37 AM) alice_crush: I would rather make thought police optional, then market forces will eliminate them.

+

(04:48:02 AM) alice_crush: some day could have certificates for asset servers, collect them in classes "PG servers", "IP Clean servers" lol

+

 

+

More linear description of above

+

Imagine that texture assets can come from multiple sources. When a sim tells your client about a texture it only tells you an ID, your client has to find out which server has the resource for you.

+

Imagine your client has a list of servers to try, it can simply go through the list of servers stopping as soon as a server gives a response.

+

Imagine that some of the servers in the list come from standard places such as the sim. Imagine that other of the servers come from a manually selected list of private subscription servers.

+

Say I am in simulator 101, I get told about a resource named "409" from the simulator. I check all the asset servers I know. If I don't find it, I show a blank/gray texture.

+

You might be in the same simulator, and you get told about the same resource named "409" by the simulator. In addition to the simulator though, you have a private server you can check, and there you find resource "409" so you client can draw it for you.

+

In this way you and I looking at a third person might see something different. You see the third person wearing a shirt with the logo of a sports team. I see a very plain gray 'slider' shirt, not even with textures cuffs and hems.

+


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

+ + diff --git a/docs/common/NGIW.Commands.html b/docs/common/NGIW.Commands.html new file mode 100644 index 0000000..c058a6f --- /dev/null +++ b/docs/common/NGIW.Commands.html @@ -0,0 +1,46 @@ + +NGIW.Commands + + + +

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.

+

 

+

Proposal

+

If http://sim.ulat.or/obj/oid is the url to some object with id oid, and we have a http connection to http://sim.ulat.or then

+ +

And maybe

+ +

 

+

What a PUT really sends to the server

+

Supose we are telling the server about the avy touching an object. The actual text that gets sent might look like:

+
   PUT /obj/oid/eq HTTP/1.1
+   Host: sim.ulat.or
+   Content-Type: application/json
+   Content-Length: xxxx
+   
+   {"touch_start":{"force":13,"avy":"uuid","time":1311663233}}
+
+

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 amortised across many commands by using the last two forms of request. The last would look like:

+
   PUT /eq HTTP/1.1
+   Host: sim.ulat.or
+   Content-Type: application/json
+   Content-Length: xxxx
+   
+   [{command1...},{command2...},...]
+
+ + diff --git a/docs/common/NGIW.html b/docs/common/NGIW.html new file mode 100644 index 0000000..dfe6f83 --- /dev/null +++ b/docs/common/NGIW.html @@ -0,0 +1,50 @@ + +NGIW + + + +

See also SledjHamr

+

Random thoughts about Next Generation Immersive Web, or whatever we call it.

+

Here I want to indicate a possible design direction. The buzzword compliant summary is HTTP 1.1, REST and JSON.

+

I don't want to descend into the actual messy details here, so I will make some simplifications. I will assume a simplified world where there are only two kinds of things, boxes and textures. Boxes have a position, a rotation, a size, and a single texture. The software architecture will be simplified to two elements of software, the simulator and the client.

+

Suppose the simulator is at http://simulat.or/sim01 .

+

Then, per usual REST design, to ask about box 104, the client would "GET /sim01/object/b104". Similar to opening http://simulat.or/sim01/object/b104 in a web browser.

+

The sample response might be

+
   {   "at":1000,
+       "id":"b104",
+       "p":[1,1,1],
+       "r":[0,0,0,0],
+       "s":[0.5,0.5,0.5],
+       "t":"/sim01/texture/t104" }
+
+

This is a really important data structure, it is the representation that forms part of the REST acronym. Since we are talking about a simulator, it isn't really complete to say an object has a certain position. In a simulator all properties of objects are dependant on time. The "at" field encodes some time representation. Probably something like Unix time * 1000, aka the number of milliseconds since 1970 UTC. The "id" field is the name of the object. The "p" field is the position encoded as a JSON array of 3 numbers, the "r" the rotation (quaternion) encoded as a JSON array of 4 numbers, the "s" the size encoded as a JSON array of 3 numbers, and "t" is the texture.

+

Since we are talking to a web server, and since we want to sometimes reference textures from other places than the simulator, the value of the texture is a URL. In this case a relative URL that leaves out the server, thus meaning the full URL to the texture is "http://simulat.or/sim01/texture/t104". If the client needs the texture it can do a GET of "http://simulat.or/sim01/texture/t104". There are ways to further compress this information, but let's not fix what isn't broken.

+

Supose the user moved the box up 1 meter by some manipulation of the client. The client would "PUT /sim01/object/b104" with the data

+
   {   "at":1001,
+       "id":"b104",
+       "p":[1,1,2],
+       "r":[0,0,0,0],
+       "s":[0.5,0.5,0.5],
+       "t":"/sim01/texture/t104" }
+
+

Always transfering the full representation of an object could be wasteful and error prone so I slightly bend REST. I will use POST to an object to transmit only the changed fields. So "POST /sim01/object/b104" with the data

+
   {   "at":1001,
+       "id":"b104",
+       "p":[1,1,2]  }
+
+

would cause the same change in the simulator state.

+

To get the current state of the world "GET /sim01/object" would reply with all the objects. In this case it would be a JSON array of JSON objects similar to the first example above:

+
   [   {"at":999,"id":...}, {"at":999,...} ... ]
+
+

But, look what happens when we understand that the reply is using chunked encoding. The simulator might not actually ever finish sending the state of the world. The client might get

+
   [   {"at":999,"id":...}, {"at":999,...},
+
+

in the first chunk, and more

+
   {"at":1000,...}, {"at":1001,...}, ...
+
+

in the second chunk. And so forth. Again, sending all the fields of all the objects, even for just the changed objects is wasteful. I see a few ways to go.

+

If the server knows it has sent a full description of an object to a client, then future updates would, like the POST, only include the changed parts of the object.

+

Alternatively, lowering the load on the server, the client closes the "GET /sim01/object" connection at some point, and does "GET /sim01/object?delta". At that point only updates are ever sent. If the client sees a change to some object it doesn't recognise, is opens a second connection and requests "GET /sim01/object/b999" for example to get the full description.

+

The third alternative is that all the server ever sends in response to "GET /sim01/object" is a stream of changes. If the client doesn't have enough information to render an object, it can query the individual object as in the first example.

+ + diff --git a/docs/common/Nails.html b/docs/common/Nails.html new file mode 100644 index 0000000..152549d --- /dev/null +++ b/docs/common/Nails.html @@ -0,0 +1,2519 @@ + +Nails + + + +

Putting it all together

+

This is where onefang starts to get his hands dirty, though I'll mostly be talking about the modules of the basic architecture that deals with the objects in the world. Most everything else could be dealt with as mostly stand alone pre existing software (jabber, mumble, etc), though some of those would still need to get their hands on some of the data.

+

In this part I'll use the term "client" to refer to anything thing talking to a server, even if it's another server. "Viewer" means the users client that they use to interact with the virtual worlds. "Virtual world" is any group of sims linked together, the equivalent of a 3d web site in this web centric model of virtual worlds. "Sim" is the equivalent of a web page. "Engine" will be any server module that deals with a particular active function. "Object" could be link sets, prims, mesh objects, avatars, the sim itself, or perhaps other things that are tracked per sim. "Data" is any property of an object in the sim that can be sent in a single command, which might consist of several values. "Value" is a single basic property of an object, though it could be a vector, rotation, URL, or other complex data type. "Command" is a something sent from one module to another stating that some data has changed on some object. An example command might be something like "command=value,value,<1.2.3>,"string". "Assets" are any non object thingy that might be part of an object, like textures, scripts, etc. Not so sure if there should be that distinction between object and asset though. Though assets generally don't change, or have "data".

+

The various modules could pretty much be written in any language, it's the protocols between them that is important. Even then, the form of the protocols should be somewhat flexible as well. I'll insist on the central form of the protocols to be tight binary, but lots of people have a co-dependent relationship with abusive things like XML. Slightly saner people might prefer JSON, perhaps BSON, or plain name=value pairs. And just coz everyone else gets to have their favourite bloated human readable text format, I'll add my own MTRX from years ago. I'll be writing my version of the modules in C, with threats of assembler. Others could write things in scheme, smalltalk, PHP, ruby, C#, javascript, or any other less efficient language.

+

The basic modules would be the viewer, the script engine, the physics engine, the sim data store, the inventory data store, and the command pump. Since this is a web centric design, there are web servers involved to. There can be any number of each of these modules, perhaps even a changing number on any given sim, for load balancing or redundancy reasons.

+

 

+

command pump

+

Quite literally, this would be the heart of the system. It's job is to manage the exchange of changes to in world objects between everything else. These changes are always expressed as commands. More about this later.

+

 

+

inventory data store (we should call this "hammerspace")

+

Stores part of a users inventory, and serves it to sim data stores, or other users inventory data stores. This could probably be just a web server, it's protocol would be ordinary HTTP/S sending files around. Generally the files would be protected, only being sent to those that are authorised to get any individual file. The inventory's owner would have complete control. It's two main tasks are to send individual objects to sim data stores, and to send individual objects, or entire folders of objects, to other users inventory stores. All of this is initiated by the owner manually. Some method for the user to manage their inventory objects would be needed, but the world is already full of ways to manage web server contents, so don't need to mention them further. Though perhaps using WebDav as a standard method would be a great idea. It may even be possible for multiple users to manage any given inventory data store, say via a typical CMS system. Public inventory data stores could exist. Shops could just be an ecommerce front end to an inventory data store. It's a web server, any webby thing could be done with it. Objects should be sent as individual files for the purposes of HTTP, though they could be collected and compressed into some archive format when sending lots of them. Folders should be represented directly as paths in the URL.

+

It's entirely up to the web server how it actually stores the objects. I would recommend just storing the commands that define an object, but there will be things like IARs with XML files, exports from other viewers, and such around. Storing just the commands means that they can just be dumped direct to the command pump. XML would have to be translated first. On the other hand, inventories store non object assets, like textures, sound samples, scripts, etc. These could be stored in their native formats.

+

 

+

sim data store

+

Stores objects and their data that are in the sim. Again, it's a web server, but completely public. Though just like ordinary web servers, parts could be private to members only. Most of what was said about inventory data stores applies. There is a change of emphasis though, these would be public in general, with privacy an option, where inventory is private in general, with public being an option. Note that objects and other assets that are contents of a sim object should not be public by default, perhaps they could be handled by inventory data stores. Inventory data stores could be very simple data stores, with authorisation, so would be perfect to be used as data stores for objects contents. Lets us reuse code and protocols, and can share code on the same server.

+

A sim data store could be a web proxy in front of any user in that sim. This is for any inventory data store an the users own computer, so that they can hide behind that sims proxy. Perhaps this could be another module? Not sure how to handle inventory transfers to offline users, especially those without some other web server to have an inventory data store on. Likely users will be a member of at least one web site somewhere that offers inventory data stores.

+

 

+

physics engine

+

Calculates physics interactions between objects in a sim. Does not have to handle all the objects on a sim, but the sim can be partitioned up, probably via some load balancing scheme. Physics is calculated on a frame per frame basis, though the "frame rate" might not have any bearing on the viewer graphics frame rate. It should however be close to human visual frame rate.

+

 

+

script engine

+

Runs scripts, either those in objects in a sim, or those in a users viewer. Does not have to handle all the scripts, but could be load balanced. Viewer scripts would be things like attachments or HUDs, and might run in the viewer. Scripts might set up sensor timers to scan nearby objects, or request specific data from random objects at random times. They also would be interested in specific events, perhaps physics or user interaction events, perhaps others. Scripts can also send arbitrary commands to do their work. Script engines can be identical, whether on servers or viewers.

+

Since sims can have one or more script engines, script engines could service one or more sims, and viewer scripts could be run in the viewer or a specific script engine the user is allowed to use...we can do away with the need to save script state, and load it again on the next sim when avatars move from one sim to the next. That's one of the major time consuming parts of a TP on your average script heavy avatar.

+

 

+

viewer

+

Brings it all together as a rich virtual world for the user. It operates in graphics frames, having to pull everything together from the various sources, and generate all the pixels for the next frame at hopefully human visual rates. It also has to let the user do whatever it is that they want to do in the sim. Some things can happen at a more leisurely rate, like transferring files. People are used to large graphic files rezzing a bit at a time, even in the 2D web for instance.

+

 

+

command pump

+

A command pump has to accept object change commands from the other modules, and make sure that all modules get the data that they need in the form of commands. All the other modules are clients of the command pump. It really has to be as efficient as possible in both network usage and internal processing. It's debatable whether or not it should pre filter data to the other modules or just throw everything at them and let the modules ignore stuff they don't need. I'll err on the filtered data stream side, to keep bandwidth down. It could be a CPU+RAM versus bandwidth trade off. Certainly there should be nothing that prevents that trade off going either way. The other modules SHOULD ignore commands they don't understand. General rule of software engineering - be careful with what you send, be tolerant of what you receive. On the other hand, initial implementations are likely to start simple, just naive with no filters.

+

Data in the form of commands to change object state for particular objects is thrown at the command pump at random by other modules. Some may be slow (human interaction speeds from viewers), some maybe fast (bullets and debris whizzing around from the physics engine). All relevant object state changes should be sent to all other modules, perhaps with a complete resync every once in a while as needed just to be sure. We are not really worried about any lost update problems, if two or more modules are trying to change the same object data, the last one wins.

+

Timing is also a concern. Data changes sent to the viewer for instance should not include many changes to the same object data per frame, only the last one sent is important to the viewer. Same for the physics engine. Scripts generally set their own time for when they want to know about external changes, but likely want to know about changes to the object they are in when they happen, or when they ask.

+

So, the command pump has to understand at least a little about what the command language is. For clients that run at some sort of frame rate, the pump should delete commands when a new one for the same data arrives, so that it sends only one change per data each "frame". It should also delete old commands from previous frames if it detects that the client has moved on without getting all the commands for those frames. Clients could request that they are only interested in specific commands. On the other hand, the pump does not need to know what the data represents, or even what the commands mean. It just stores and forwards, with some arbitrary filtering as requested by each client. So it needs to know which part of each command is the command verb, and which object the command refers to. The command pump also needs to understand which clients have a frame rate, but that could be handled by clients sending filter requests. Filtering entire objects should be possible to, based on what objects the client says it's interested in.

+

So basically, it manages FIFO queues of commands, one per client. Filtering out any command type the client requests, filtering for objects of interest, or filtering object data on a frame rate basis per object. Every now and then, it has to sync the sim data store as well, so that the sim state is persistent across restarts, and clients can just download complete objects from the store when they first need them. Phew.

+

A good optimisation would be for the sim data store and command pump to be the same module. The pump has to keep the current state of objects in memory anyway, and knows how to pump the command data out, all it needs is a persistent backing store to write to and read at start up.

+

As an optional wrapper around the command pump, could be translators for those that want REST, JSON, XMLRPC, or other bloat. With commands to switch to and from these and the native binary protocol. Native binary protocol must always be supported, and always be the default until requested otherwise. 99.9999% of Internet traffic does not NEED to be human readable on the wire, human readable is not so easy for computers to read, they need to translate it. Why slow everyone down? I will insist that these protocol translators operate outside the command pump, don't want to slow that down to satisfy peoples longing for bloat. They should be separate processes, preferably operating on separate cores, or even entirely different computers. They will naturally talk the tight binary protocol to the command pump, just like every one else.

+

There are three basic Internet protocols we could use as the basis for the wire traffic. TCP, UDP, and SCTP. SCTP would be a great candidate, except for the lack of MacOS support. I think we should try SCTP, with TCP as backup, SCTP support might come to Mac sooner or later.

+

 

+

command channels and language

+

In other parts of this document, a command channel is mentioned. Most of the data flowing through this command channel would be for setting or changing prim parameters. I propose a binary format based on llSetLinkPrimitiveParams() http://lslwiki.net/lslwiki/wakka.php?wakka=llSetLinkPrimitiveParams&show_comments=1#comments

+

A command list would usually start with a command stating which link number of which linkset the following commands will change. This command can be sent at any time. The link number can be one of the special link numbers. Then a series of prim parameter commands, also in binary. Each prim parameter command starts with a 32 bit integer parameter type, and then follows the actual parameters. Since each parameter type has a fixed format for it's arguments, no need to specify types. All arguments except strings are fixed width, so strings should be moved to the end of the argument list, zero terminated, and UTF-8. In general, there is only a single string for any command that includes a string, but it could be possible to have any number of zero terminated strings in order. Everything should be sent in network order.

+

There is naturally some room to define more commands. For instance, a delay before executing the next command, a command to stop this one and start a new one with a different link number, or one to set something other than a prim parameter (a land parameter for instance). We could add a command - "JSON" which means "I'm a fucking human, talk to me in something that looks vaguely like English" until the end of the session. Or a few such commands for a few different formats. BSON, BNRY to change back to the default binary mode, and EWWW to change to the XML mode used by OAR files, MTRX for something like my matrix-RAD wire protocol.

+

The command language should be binary.The objects current state is stored as the currently active list of commands for each object. An object in this case would be a prim, mesh, linkset, the sim itself, terrain, or avatars.

+

 

+

propagating language changes

+

In order to support a changing language as things develop, we could use an initial handshake between clients, servers, and engines (acting as clients to the sim data server) that could exist in these several variations. In the following, the variations are numbered for later discussion. The first word on the line is who is sending the data, indented lines then go into the extra detail that is being sent. The client sends first, as it's always the one to start the connection. The word "checksum" means that a checksum of some standard representation of the language known by that computer is sent. The word "signed" means that the language representation is signed in some manner to show it came from some authority.

+
    +
  1. client -> I speak Version 1 checksum
    server -> I speak Version 1 checksum
  2. +
  3. client -> I speak Version 1 checksum
    server -> I speak Version 2 checksum signed
    Version 2 is -
    A=int,int,float
    B=vector,string
    client -> I speak Version 2 checksum
    server -> I speak Version 2 checksum
  4. +
  5. client I speak Version 1 checksum +
    which adds -
    C=rotation,int
    D=string,float,vector
    server I speak Version 1 checksum + (only to this client)
  6. +
  7. client I speak Version 2 checksum
    server I speak Version 2 checksum (which is different) signed
    Version 2 really is -
    A=int,int,float
    B=vector,string
    client I speak Version 2 checksum
    server I speak Version 2 checksum
  8. +
  9. client I speak Version 2 checksum
    server I speak Version 1 checksum
    client I speak Version 2 checksum signed
    Version 2 is -
    A=int,int,float
    B=vector,string
    server I speak Version 2 checksum
  10. +
  11. client I speak Version 1 checksum
    server I speak Version 1 checksum +
    which adds -
    C=rotation,int
    D=string,float,vector
    client I speak Version 1 checksum + (only to this server)
  12. +
+

1) all is good, hopefully the usual thing.

+

2) and 4) are subject to evil servers screwing things up. 5) is subject to to evil clients. Should think of ways to protect from that. GPG signed from a trusted source? Web of trust needed.

+

3) server only uses that version of the language for talking to that client.

+

5) a way to push up an official new protocol version.

+

6) is pathological, but might happen during development. On the other hand, the extra data might be useless, as the client does not know what to do with it.

+

Sim data server to sim data server changes could happen between servers that have some sort of arrangement between them. Like neighbouring sims, or servers run by the same person. The first server is then client, and contacts the other server as normal. Otherwise, language updates are going to be slow getting around. Physics engines would likely only need to know the new languages when they know how to deal with the new data types. Script engines could benefit from command languages if their scripts know how to deal with the new data types.

+

1) 2) 4) 5) both ends just use the same language.

+

3) 6) Store the extra things as name/value pairs, send them back as name/value pairs. The "store" part could be a DOS attack to soak up storage space. However, there should be restrictions on who can change things on any given sim data server, so that will help. Should also send any name/value pairs to other clients/servers that register identical pair formats? Would be useful for development of the next version of the language. Note there could be name clashes, so include the data types for each name/value pair when deciding to send it.

+

 

+

Command language

+

llSetPrimitiveParams() is the model I want to follow.

+

For the binary protocol, we will try to pack things up as much as possible. A lot of the integers don't need to be full 32 bit integers. Some of the vectors can be just small integers instead of floats. etc.

+

Yes, I am trying to micro optimise this part before actual implementation. So I'll go over my assumptions, use cases, and other design decisions here for reference.

+

I want the command language itself to use as little bandwidth as possible. I think the on disk storage should just be this tight little command language. I want the code that deals with this command language to be simple. If there has to be any trade offs, the code can be more complicated if it keeps the command language tight. The reasons for these things is scalability. While the distributed nature of this design means that we are generally only concerned with sim level scalability. We do want to support huge sims with large numbers of users. The command pump code could be used for both servers and clients. Flinging the basic data about, and storing it, is something I want to be efficient as possible from the very beginning. Folks, that means PACKED BINARY dammit. Cringe now and get it over with.

+

Those people that want to use less efficient and more human readable data formats do get to eat their cake by the use of protocol translators. These should NOT be part of the same process as the inner pump, in order to not have them slow down this inner pump. I see these uses of other data formats as being the exception rather than the rule. That's one of my big assumptions. If you want to avoid bloat and lag, use this tight packed binary, but feel free to filter it through a protocol translator for debugging purposes. Just don't ever get in the way of those wanting things to be efficient.

+

The command language will not deal with large binary blob assets directly, things like actual textures, sounds, animations. Instead it will simply deal with pointers to these assets. These pointers might be UUIDs, or names. I want to extend that to include URLs and SHA-1 sums as data pointers (content addressable blobs).

+

The main use cases are those basic modules I have identified above - command pump, inventory and sim data stores, physics and script engines, and the viewer. Each of these modules will have an internal representation of each object of interest.

+

The data stores want to know which object the commands are for so they can store each object separately. They also only want the latest data for each object. They store each object on disk somewhere, but possible have those objects memory mapped and update them as commands come in.

+

The engines want to filter out only the data they need for their work. For the script engine, this filter might be different for each script. The script itself has internal state that would need to be persisted during sim shutdowns, or transfer to inventory.

+

The viewer wants all the data, though probably would be happy to just drop old data if it's too late to render it and newer data is already here. It will have internal representations of objects of interest, but may cache them.

+

The command language is mostly concerned with changing in world properties. In general these are split into prim (object), sim, avatar, animation, and environment (windlight/lightshare) properties.

+

Prims (objects) are the basic building blocks of the world. Originally prims where general 3D primitives, where the idea is that you can build more complex shapes with simple primitives, and the data to describe those primitives is much less that defining each triangle. Since then sculpties have been added, where the triangles are defined as an array of points encoded into and RGB texture, and the triangles have a fixed mapping. Very recently, arbitrary meshes have been introduced, since sculpties had restrictions. Still, the data for the sculpty and mesh triangles and such are treated as blobs of opaque binary data, with pointers to them (and some flags) being the only data dealt with at the prim level. That still works for me. B-)

+

Prim properties can change quickly, by the physics engine, scripts, or users editing them in world in real time.

+

Sim properties in general don't change fast. No point updating the land music URL many times a second, or even many times a minute. Perhaps someone might want to update the terrain or terrain texture quickly, but current viewers are very slow to track those changes anyway. Perhaps in the future we might want to allow piping video into the terrain to simulate an earthquake, but that would still be represented as just attaching one video stream to the terrain heightfield. So in general I think we can treat sim property changes as slow moving.

+

Avatars currently consume the most resources, which is why you can have thousands of prims in an existing SL style sim, but only dozens of avatars. They move around a lot, animate, change clothes, and wear prims. Prims are covered above, animations below, movement might be covered by treating avatars as a prim type. That leaves clothes. In the end, clothes is treated just like a texture change, and is not usually done quickly.

+

Animations are currently really only applied to avatars. They are references to animation assets (BVH files), where the asset is downloaded as needed, perhaps cached, and usually triggered by scripts. These tend to be slow changes (updating which animation asset is in use right now), but scaled up by the number of avatars in the sim at any given time. AO animations may change quicker as people move about.

+

On the other hand, we are extending animations to prim objects, and thinking about in world editing of them, plus allowing ad hoc "animations" via puppeteer style controls. So we need to keep these things in mind.

+

The environment is not changed quickly.

+

So, in the end, looks like prim property changes (including avatars as prims) are the heavy users. This is my next big assumption. There should be lots of commands for dealing with individual prim properties, as opposed to say sim commands where we can pack a bunch of properties into a single command. This is the reason why I'm starting with llSetPrimitiveParams() as my model for the command language. Perhaps a hamming code might work well?

+

After looking at things from the perspective of the above thoughts, there are very few commands that do NOT have a fixed set of parameters. These are generally those with string parameters. Most of those strings are asset pointers, often UUIDs, though some are just arbitrarily long bits of text that are just displayed as is. So I want to leave command lengths out of the basic command language (though know about them internally), but we do have to deal with some variable length commands. We could have three different versions of those commands that deal with asset pointers, UUID and SHA-1 being fixed length commands, name and URL being variable length (name treated as a relative to current sim URL).

+

So a first hack at this that keeps things nice and simple is 8 bit commands, with fixed length parameters for each command. Using a 256 entry table that includes that fixed length, and details of the types of parameters. Perhaps we can use a special value for the length in that table that means "variable length, you might have to actually scan and think about the command data to find it's end", but otherwise just use the fixed length for doing things like skipping to the next command, or copying this command somewhere. I assume that any single command will not be very long. Given that keeping the command data smaller is more important than keeping the code simple, I lean towards the C string style rather than the Pascal string style. In other words, a NULL end of string token instead of a couple of bytes of string length.

+

The other issues to deal with are when and how to do the filtering; and how to handle "old" data.

+

The first level of filtering would be per object. Physics engines are only interested in physics enabled objects (including avatars some of the time). Viewers are only interested in objects within draw distance. Script engines would initially only be interested in the objects with scripts in them, but maybe interested in other objects they are scanning or whatever.

+

The physics and script engines really want to spend most of their resources actually calculating physics and executing scripts. So it might be worthwhile filtering the commands we send to them. Physics is easy, it wants only a few bits of prim data that is well known ahead of time.

+

Scripts are harder, any given script at any given moment, might only be interested in a small subset of info about a prim, or the sim, etc. There are two categories - query a parameter right now, or trigger events based on parameter changes. Note that LSL at the moment treats some "ask for parameter" async, they send the request, then setup an event to get the results.

+

I think all modules only want current data. The world exists only in real time. Some general method for just dropping commands that are too old needs to be included. "Too old" means that some new command arrived that replaces that old commands data, but before that old command has been dealt with. This might be made more complicated by the existence of command variations where some of the data is encoded in the command byte for the current proposed implementation.

+

 

+

Prim commands.

+

There are seven commands not allocated in the middle, and two near the end, no doubt we could use those for the missing commands. These are the commands not currently accounted for in the command language -

+

llSetPrimMediaParams(face, list)

+

Can probably combine most of these. Width and height SHOULD be combined per the LL specs.

+ +

llParticleSystem(list)

+

These could be combined a bit, some of them should be.

+ +


llCreateLink(key boolean)

+

llSetTextureAnim(integer:7 face integer integer float float float)

+

Stuff to do with the playing of sound clips.

+

 

+

Parcel commands.

+

There is no need for parcels really, they are just a way of managing a fixed sized sim. We use arbitrary sized sims with little or no boundaries. So "parcels" can just be a bunch of smaller sims arranged in what ever way makes them more manageable by the sim owners. I would even suggest that sky boxes be just another sim, but with a high vertical offset from the land sims.

+

 

+

Sim commands.

+

Note that terrain and water could be dealt with by prim commands, treating them as heightfield meshes. This assumes that parcels are just specialised sims.

+

A sim has the following properties, which will need commands to change them -

+

Name, description, owner, group.

+

Rating - LL introduced the concept of maturity ratings, but the web has various other ways of dealing with that, with no standard system across the board. We could just say "let the web server owner figure out their own system", though still have the option of supporting LL style maturity ratings.

+

Land sales and deeding are possibly meaningless in this case, but we can always support the legacy LL method. Note that some of the legacy LL stuff makes no sense outside of LL type grids.

+

Autoreturn setting. Edit terrain and fly permissions, as well as object create, entry, and script running permissions for the land group, and for others. That's a nice set of 8 bits. B-)

+

Creating landmarks permission is similar to creating bookmarks. Not really something that is done on the web, and we are opening this up to web style access systems, so we don't really need that.

+

No damage is irrelevant really, if they want combat on their sims, they can provide a proper combat system. No pushing is likely similar.

+

Showing places in search is really now up to the search engines to cope with this new form of data.

+

A snapshot is good. Teleport landing spot and routing should have more options, but we can start with just supporting the usual LL stuff.

+

Audio and media are now handled differently anyway.

+

Access is now controlled by the usual web methods.

+

Allowing land resale and joining / sub dividing is no longer relevant. Telehubs are no longer relevant. Object bonus, and minimum agent age are not relevant. Agent limit might be relevant, but should be taken care of by usual web access systems.

+

Will still need to send broadcast messages to people in sims.

+

Restarting sims, disabling scripts, collisions, and physics.

+

Four terrain textures, and the four pairs of elevation ranges (one per corner) should still be supported, but we should also support just setting a fixed texture, or even several.

+

Water height, but also allow water heightfield. Terrain raise and lower limits not needed. Terrain heightfield and editing. Baking terrain. Don't really need stuff specific to backing up heightfields, they just become one more texture file on the web server.

+

Sim sun stuff should be handled by the windlight commands.

+

Allowing voice chat becomes a matter of whether the sim owner bothered to set that up.

+

Allow direct teleport is now part of access controls.

+

Covenant is just the sites ToS.

+

Should be able to kick people, and return their stuff. Though that's more content management, which we can leave to CMS style systems. Most everything else is content management, or admin stuff best left to other tools.

+

Create and delete an object. Moving and editing them is up to the prim commands. Though it should be pointed out, the position and rotation of root prims are a property of the sim rather than of the prim or linkset itself.

+

 

+

Windlight commands.

+

 

+

Avatar commands.

+

Some of this could be dealt with by treating the avatar as a prim. In fact, Alice's proposed animation system deals with animating avatars and prims the same way.

+

 

+

Animation commands.

+

Alice is working on that over at the BVJ page.

+

 

+

Meta commands.

+

0 SELECT_OBJECT key

+

There will be a bunch of four byte commands, they all switch up to less efficient command representations, so they can afford to be more verbose. B-)

+

They all are actually one byte commands, with the extra three bytes just being verbose padding for the humans. Let's hope there are no conflicts with other commands, otherwise the other command will just have to move.

+ +

Note that a key in SL is a 32 hex digit string (128 bits, or 16 bytes), with four dashes added to make it 36 characters long. We probably don't need that much uniqueness within a sim, or even within a host full of sims. Two bytes gives us 65,536 unique objects, three bytes 16,777,216, and four bytes 4,294,967,296 objects. The maximum number of prims on a 256x256 SL sim is 15,000, and the maximum number of avatars is 100. So two bytes seems like plenty.

+

I would suggest using SHA-1 hashes of fixed blobs like textures and sounds, in the same way that git uses them for content addressable storage. SHA-1 is 160 bits (20 bytes), but as git has shown, if there are a small number of objects, you can get away with using just the first few digits. The advantage here is that multiple copies of the same texture end up with the same SHA-1, and thus we only store one copy.

+

Since we are using the format used by LSL prim parameter setting as the guide, after looking at it, I think we can do something like this...

+

A command is one byte, letting us have 256 commands. The very first command is 0 - select what object the next commands will work on.

+

The prim parameters take up the next 32 commands, but that only needs 5 bits. Some of those prim parameters include an integer, or even boolean, that could only need 3 bits. PRIM_TYPE in particular could encode the type itself into those extra 3 bits, making a total of 8 commands, and making it easy to fit the different sets of parameters into a table. PRIM_TYPE_LEGACY becomes 6 commands; PRIM_MATERIAL 8; PRIM_PHYSICS, _TEMP_ON_REZ, _PHANTOM, _FULLBRIGHT, _FLEXIBLE, _POINT_LIGHT, _CAST_SHADOWS, _TEXGEN 2 each; PRIM_TYPE 8; PRIM_BUMP_SHINY could be 4 with the shiny part in the command number. The other 10 add to make a total of 52. 103 commands left for the other commands, I think that might work.

+

 

+

The big arsed command table

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
decimalhexbinaryASCIIcommandargumentscomments
0000000 0000NULLSELECTkeyNext commands refer to this object.
1010000 0001SOHPRIM_TYPE_LEGACY BOXvector float float vector vector 
2020000 0010STXPRIM_MATERIAL (STONE)integer:3OK, the cleanest way to deal with this conflicting with the BSON commands is to have it as just one command. sigh
3030000 0011ETXPRIM_PHYSICS off  
4040000 0100EOTPRIM_TEMP_ON_REZ off  
5050000 0101ENQPRIM_PHANTOM off  
6060000 0110ACKPRIM_POSITIONvector 
7070000 0111BELPRIM_SIZEvector 
8080000 1000BSPRIM_ROTATIONrotation 
9090000 1001TABPRIM_TYPE BOXinteger:2 vector float vector vector vector 
100A0000 1010LF   
110B0000 1011VT   
120C0000 1100FF   
130D0000 1101CR   
140E0000 1110SO   
150F0000 1111SI   
16100001 0000DLE   
17110001 0001DC1PRIM_TEXTUREface string/key vector vector float 
18120001 0010DC2PRIM_COLOURface (vector float)=colour 
19130001 0011DC3PRIM_BUMP_SHINY PRIM_SHINY_NONEface integer:5 
20140001 0100DC4PRIM_FULLBRIGHT offface 
21150001 0101NAKPRIM_FLEXIBLE off  
22160001 0110SYNPRIM_TEXGEN PRIM_TEXGEN_DEFAULTface 
23170001 0111ETBPRIM_POINT_LIGHT off  
24180001 1000CANPRIM_CAST_SHADOWS off  
25190001 1001EMPRIM_GLOWface float 
261A0001 1010SUBPRIM_TEXTstring (vector float)=colour 
271B0001 1011ESCPRIM_NAMEstring 
281C0001 1100FSPRIM_DESCstring 
291D0001 1101GSPRIM_ROT_LOCALrotation 
301E0001 1110RSPRIM_POS_LOCALvectorThis is just my guess about where LL will put it.
311F0001 1111US   
32200010 0000SPACEPRIM_OMEGAvector float float 
33210010 0001 !PRIM_TYPE_LEGACY CYLINDERvector float float vector vector 
34220010 0010"(PRIM_MATERIAL METAL)  
35230010 0011#   
36240010 0100$   
37250010 0101 %   
38260010 0110&   
39270010 0111'   
40280010 1000(   
41290010 1001)PRIM_TYPE CYLINDERinteger:2 vector float vector vector vector 
422A0010 1010*   
432B0010 1011+   
442C0010 1100,   
452D0010 1101-   
462E0010 1110.   
472F0010 1111/   
48300011 00000   
49310011 00011   
50320011 00102   
51330011 00113   
52340011 01004   
53350011 01015   
54360011 01106   
55370011 01117   
56380011 10008   
57390011 10019   
583A0011 1010 :   
593B0011 1011 ;   
603C0011 1100<   
613D0011 1101=   
623E0011 1110>   
633F0011 1111 ?   
64400100 0000@   
65410100 0001APRIM_TYPE_LEGACY PRISMvector float float vector vector 
66420100 0010BBSON Switch to BSON mode. (Conflicts with PRIM_MATERIAL GLASS)
67430100 0011C   
68440100 0100D   
69450100 0101EEWWW Switch to XML mode, as used by OpenSim in IAR and OAR backup files.
70460100 0110FFUCK Switch to two, four byte command mode; with three, four bytes of object ID.
71470100 0111G   
72480100 1000H   
73490100 1001IPRIM_TYPE PRISMinteger:2 vector float vector vector vector 
744A0100 1010JJSON Switch to JSON mode.
754B0100 1011K   
764C0100 1100L LUA  Switch to Lua mode.
774D0100 1101MMRTX Switch to matrix-RAD mode.
784E0100 1110N   
794F0100 1111O   
80500101 0000P   
81510101 0001Q   
82520101 0010R   
83530101 0011SPRIM_BUMP_SHINY PRIM_SHINY_LOWface integer:5 
84540101 0100TTITE Switch back to the tight binary mode that is the sane default. B-)
85550101 0101U   
86560101 0110V   
87570101 0111W   
88580101 1000X   
89590101 1001Y   
905A0101 1010Z   
915B0101 1011[   
925C0101 1100\   
935D0101 1101]   
945E0101 1110^   
955F0101 1111_   
96600110 0000`   
97610110 0001aPRIM_TYPE_LEGACY SPHEREvector float vector 
98620110 0010bbson Switch to BSON mode. (Conflicts with PRIM_MATERIAL WOOD)
99630110 0011c   
100640110 0100d   
101650110 0101eewww Switch to XML mode, as used by OpenSim in IAR and OAR backup files.
102660110 0110ffuck Switch to two, four byte command mode; with three, four bytes of object ID.
103670110 0111g   
104680110 1000h   
105690110 1001iPRIM_TYPE SPHEREinteger:2 vector float vector vector 
1066A0110 1010jjson Switch to JSON mode.
1076B0110 1011k   
1086C0110 1100l lua  Switch to Lua mode.
1096D0110 1101mmrtx Switch to matrix-RAD mode.
1106E0110 1110n   
1116F0110 1111o   
112700111 0000p   
113710111 0001q   
114720111 0010r   
115730111 0011s   
116740111 0100ttite Switch back to the tight binary mode that is the sane default. B-)
117750111 0101u   
118760111 0110v   
119770111 0111w   
120780111 1000x   
121790111 1001y   
1227A0111 1010z   
1237B0111 1011{   
1247C0111 1100|   
1257D0111 1101}   
1267E0111 1110~   
1277F0111 1111DEL   
128801000 0000   
129811000 0001PRIM_TYPE_LEGACY TORUSvector float float float vector vector 
130821000 0010(PRIM_MATERIAL FLESH)  
131831000 0011ƒPRIM_PHYSICS on  
132841000 0100PRIM_TEMP_ON_REZ on  
133851000 0101PRIM_PHANTOM on  
134861000 0110PRIM_TEXGEN PRIM_TEXGEN_PLANARface 
135871000 0111   
136881000 1000ˆ   
137891000 1001PRIM_TYPE TORUSinteger:2 vector float vector vector vector vector vector float float float 
1388A1000 1010Š   
1398B1000 1011   
1408C1000 1100Œ   
1418D1000 1101   
1428E1000 1110Ž   
1438F1000 1111   
144901001 0000   
145911001 0001   
146921001 0010   
147931001 0011PRIM_BUMP_SHINY PRIM_SHINY_MEDIUMface integer:5 
148941001 0100PRIM_FULLBRIGHT onface 
149951001 0101PRIM_FLEXIBLE oninteger float float float float vector 
150961001 0110   
151971001 0111 PRIM_POINT_LIGHT on(vector)=colour float float float 
152981001 1000 PRIM_CAST_SHADOWS on  
153991001 1001    
1549A1001 1010    
1559B1001 1011    
1569C1001 1100    
1579D1001 1101    
1589E1001 1110    
1599F1001 1111    
160A01010 0000    
161A11010 0001 PRIM_TYPE_LEGACY TUBEvector float float float 
162A21010 0010 (PRIM_MATERIAL PLASTIC)  
163A31010 0011    
164A41010 0100    
165A51010 0101    
166A61010 0110    
167A71010 0111    
168A81010 1000    
169A91010 1001 PRIM_TYPE TUBEinteger:2 vector float vector vector vector vector vector float float float 
170AA1010 1010    
171AB1010 1011    
172AC1010 1100    
173AD1010 1101    
174AE1010 1110    
175AF1010 1111    
176B01011 0000    
177B11011 0001    
178B21011 0010    
179B31011 0011    
180B41011 0100    
181B51011 0101    
182B61011 0110    
183B71011 0111    
184B81011 1000    
185B91011 1001    
186BA1011 1010    
187BB1011 1011    
188BC1011 1100    
189BD1011 1101    
190BE1011 1110    
191BF1011 1111    
192C01100 0000    
193C11100 0001    
194C21100 0010 (PRIM_MATERIAL RUBBER)  
195C31100 0011    
196C41100 0100    
197C51100 0101    
198C61100 0110    
199C71100 0111    
200C81100 1000    
201C91100 1001 PRIM_TYPE RINGinteger:2 vector float vector vector vector vector vector float float float 
202CA1100 1010    
203CB1100 1011    
204CC1100 1100    
205CD1100 1101    
206CE1100 1110    
207CF1100 1111    
208D01101 0000    
209D11101 0001    
210D21101 0010    
211D31101 0011 PRIM_BUMP_SHINY PRIM_SHINY_HIGHface integer:5 
212D41101 0100    
213D51101 0101    
214D61101 0110    
215D71101 0111    
216D81101 1000    
217D91101 1001    
218DA1101 1010    
219DB1101 1011    
220DC1101 1100    
221DD1101 1101    
222DE1101 1110    
223DF1101 1111    
224E01110 0000    
225E11110 0001    
226E21110 0010 (PRIM_MATERIAL LIGHT) Deprecated: Looks the same as [ PRIM_FULLBRIGHT, ALL_SIDES, TRUE ]
227E31110 0011    
228E41110 0100    
229E51110 0101    
230E61110 0110    
231E71110 0111    
232E81110 1000    
233E91110 1001 PRIM_TYPE SCULPTstring/key integer:8 
234EA1110 1010    
235EB1110 1011    
236EC1110 1100    
237ED1110 1101    
238EE1110 1110    
239EF1110 1111    
240F01111 0000    
241F11111 0001    
242F21111 0010    
243F31111 0011    
244F41111 0100    
245F51111 0101    
246F61111 0110    
247F71111 0111    
248F81111 1000    
249F91111 1001    
250FA1111 1010    
251FB1111 1011    
252FC1111 1100    
253FD1111 1101    
254FE1111 1110    
255FF1111 1111    
+

Not sure where else to put this, but nails I think is the bit that drives the network traffic the most -

+low-latency-requires-smart-queuing-traditional-aqm-is-not-enough +

Another article that deals with network issues in a 3D networked game -

+the_internet_sucks_or_what_i_ +


This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.

+ + diff --git a/docs/common/OMG-WTF-BBQ.html b/docs/common/OMG-WTF-BBQ.html new file mode 100644 index 0000000..5e48a14 --- /dev/null +++ b/docs/common/OMG-WTF-BBQ.html @@ -0,0 +1,25 @@ + +OMG WTF BBQ + + + +

The rationale

+

Scripts, and sometimes objects, can invoke a file purely by its UUID. It had been suggested we might replace the existing UUID system with something where the file is invoked via some sort of machine address, pointing to the Internet address of the grid or world -- actually, call it an OMG Node -- the file originated from. The problem with this sort of approach is that, a given VR world could go away, making that direct addressing fail, a given world could change its name and location, causing the direct addressing to break. What we need is a system where the UUID of a file is location-agnostic. That is to say, it shouldn't matter where the file originally came from, it should only matter that there is still a way to bring it in when you need it.

+

At that, while it might be possible to go into a script and change the machine-address for the file if it breaks, that makes the assumption one would be able to edit the script, or know what the new pseudo-UUID for that file would be in order to replace it. For one thing, a lot of scripts are going to be no-mod, so even if you did know what that new pseudo-UUID to replace in there was, you wouldn't be able to fix it anyway.

+

What needs to exist is some means of identifying what world a given set of files came from by some kind of UUID subset. That is, each file made on a particular, distinct part of the OMG needs a unique identifier that starts out all UUIDs made there, and that the rest of the UUID would be appended to that would uniquely identify a file that was created there. This unique identifier for an OMG Node also needs to exist in a form that doesn't change when the name or location of the OMG Node changes.

+

OMG Node

+

This would be a server or group of servers that function as a single entity. I.e. the gridrid and the sims that are specifically owned by a person. Another might be the server sim-providing service Waki and Torben are now setting up.

+

WTF -- Where's The File

+

This would be a list of UUID-identified files (pictures, sounds, notecards, scripts, etc) available from a given OMG Node that are currently known on your current machine, and would function as a sort of look up table if those UUIDs get invoked again. It identifies where a particular file came from originally, and/or what machines it traversed getting here. There would be one .WTF file for each OMG Node, and would list all the files that came from there which the local OMG Node has collected in its own interactions with other OMG Nodes, and that are reachable in a Six Degrees of Separation from Bacon sort of way. Basically, any UUID which starts with the code that identifies it as having come from that specific OMG Node would be stored here.

+

BBQ -- Big, Broad Query

+

Here is where the Six Degrees of Separation from Bacon mentioned under the WTF entry comes in. A .BBQ files keeps track of all the OMG Node identifier UUID-subset codes so that when an OMG Node changes its address or ceases to exist, every back address is stored, also, what other places maintain mirror copies of some or all of the files from there that could be called by a full UUID (from inside a script, say) so even when an OMG Node goes away, those files will continue to be available.

+

Basically, if a UUID is invoked by a script, and the file that UUID is tied to isn't in the local OMG Node, a query will be sent out to the nearby OMG Nodes asking if they have this file, if they don't, they might query their nearby OMG Nodes to see if those have it, and so on. Ideally there should develop from that, ant-tracks-style, that identifies the shortest path between OMG Nodes to where files with a given OMG Node identifier UUID-subset's files can be obtained from, even if that OMG Node has been out of business for a decade.

+

COW -- Copy On Write.

+

What's a BBQ without some COW, er I mean beef? We can speed up the BBQ search a bit by pre caching things, but what to pre cache and how?

+

Instead of using UUIDs, which are basically random numbers, we could use SHA1 hashes. This is the same system used by git at least. That means the objects can be content addressable. First benefit is that all these identical copies of any given object would end up with identical names, so that we have a broader field to search. Second benefit is that we don't end up having to store dozens of identical copies of the same object on the local OMG node, since they all end up with the same name. A UUID is 16 bytes, an SHA-1 is 20, but a UUID is usually shown in a format that includes 4 dashes, so they end up being the same length. Much experience with git has shown that you can get away with just the first few digits, depending on how many objects you need to distinguish between. So instead of completely ignoring the half a dozen copies of any given object you are searching for; coz different people uploaded it from different places; you might find it more easily by noticing that you already have it. The .WTF file can include pointers to known locations, and the various names it is known as, but the object itself has the SHA1 hash as it's file name, instead of the UUID. The SHA1 hash is it's internal name. It does not even have to be stored on the local OMG node, just the SHA1 internal name, and some pointers to likely locations.

+

Where does the COW come in? If it's got horns, any where it wants to. Er...

+

Quite often an object gets changed, that would naturally change the SHA1 hash. So now we have a different object, with a different name. But, the object might not be stored locally, just the pointer. The programming field has a name for what happens next, a copy is made when you try to write to it - Copy On Write. So the object is copied from the most convenient nearby OMG node, the changes made, then it is written (under a new SHA1 hash name) onto the local OMG node. This OMG node informs other interested nodes that it now has this new object, they can store pointers to the new object on this OMG node in their .WTF files.

+

Which brings us back to the pre caching. The hungry little OMG node does not have to wait for the BBQ to fire up to get it's COW. It can start to download the object if it has some time on it's hands, just coz.

+

To quote a famous local sporting hero "Where's the cheese?". Ah, that's another story...

+ + diff --git a/docs/common/README.Bookie b/docs/common/README.Bookie new file mode 100644 index 0000000..bec4b19 --- /dev/null +++ b/docs/common/README.Bookie @@ -0,0 +1,33 @@ +Shared dynamic libraries is a bit of an issue for cross platform code. +LL viewers deal with it by including their own copies of the libraries +they use. This bypasses the idea of sharing them, and thus uses too +much resources. On the other hand, it seems to be the Windows way of +doing things, lots of Windows packages I have seen include their own +copies of libraries. Mac Os X seems to do the same, each application is +installed as it's own directory, filled with it's own copies of +libraries. Not a lot of sharing going on. Linux and the BSDs do the +right thing, most libraries are actually shared. Except that LL viewers +STILL bring their own libraries. + +I think the main difference is having a proper package management +system. Apt, RPM, and portage (I think) can track dependencies on +libraries, install the libraries automatically, and even have different +versions of libraries installed side by side. Without this, the OS has +no official way of tracking library dependencies, so every one has to +supply their own. Sure Mac OS X has had a few package systems ported to +it, but none of them are the official one, so developers can't rely on +them. + +SledjHamr has to deal with this, and try to do so in some sort of smart +way. As usual, the right way to do things is generally to do the +opposite of what LL does. lol + +Bookie should be a sub system that probes the OS, trying to see if +there's some sort of OS store of libraries, and try to find reasonable +versions of the libraries needed in that. If not found, it could invoke +an OS specific method of installing a suitable library. If that fails, +it can download a SledjHamr specific version into the SledjHamr +installed directory. So it tries to do the right thing first, and +gradually falls back to doing the wrong thing like LL does. + +That's the theory, in practice, gonna be a pain. diff --git a/docs/common/README.libraries b/docs/common/README.libraries new file mode 100644 index 0000000..8b99b7f --- /dev/null +++ b/docs/common/README.libraries @@ -0,0 +1,34 @@ +There are some base libraries that should be used in common. Notable +the Enlightenment Foundation Libraries (EFL), Irrlicht, lemon, LuaJIT, +and luaproc. Other external open source projects that we just use +directly should go here to. Makes it easy to compile it all. + +Note that in some cases, there might be changes. Such changes should be +documented, and marked with "// onefang changes". + +EFL has been released, so not including that anymore. You can find it +in distro repos, PPA's, etc. Or http://enlightenment.org/ + +Irrlicht has been slightly modified to get it to use externally created +GL stuff, and not use their internal copies of bzip, jpeglib, libpng, +and zlib. + +Lemon is from http://www.hwaci.com/sw/lemon/. + +LuaJIT 2.0 has been released for Ubuntu 13.04 and later, try using +https://launchpad.net/~mwild1/+archive/ppa for 12.04. Not including +that anymore. + +luaproc has been hacked up a bit, and will continue to be hacked up. +Merged it into LuaSL, so it's no longer here. Then replaced it +completely. + +-------------------------------------------------------------------- + +These are the libraries written for the SledjHamr project. + +libLumbrJack is a library of logging stuff, coz every one wants to log. + +libRunnr is for running Lua scripts. Named (sorta) after a friend of mine. + +libSledjHamr is a motley collection of stuff that is needed. diff --git a/docs/common/README.mumble b/docs/common/README.mumble new file mode 100644 index 0000000..1010f18 --- /dev/null +++ b/docs/common/README.mumble @@ -0,0 +1,5 @@ +Viewer integration with mumble and whisper, and using it for as many +audio services as it can. + +Mumble is a voice system designed for networked 3D game usage. Sounds +perfect, just what we need. B-) diff --git a/docs/common/The_Naminator.txt b/docs/common/The_Naminator.txt new file mode 100644 index 0000000..0002d2e --- /dev/null +++ b/docs/common/The_Naminator.txt @@ -0,0 +1,14 @@ +The Naminator eliminates human readable names, to make way for computer +names from SkyNet. Or something. + +In world names can be anything, but they map more or less to file names +and URLs, so the names have to be munged accordingly. A further issue +is that different in world objects can have the same name. Lots of +copies of the same thing, or two different things that happen to be +called the same thing. No one is gonna individually name each tree in a +forest, or every lamppost in the city. File names and URLs have to be +unique. The Naminator deals with munging names to deal with these +issues. It should generate names that are compatible with a variety of +operating and file systems, as well as being URL compatible. This is +such a useful thing to do that it should be a shared library, even if it +will be tiny. diff --git a/docs/common/no_accounts.txt b/docs/common/no_accounts.txt new file mode 100644 index 0000000..5ecbe08 --- /dev/null +++ b/docs/common/no_accounts.txt @@ -0,0 +1,29 @@ +We don need no stinkin' accounts. + +We don't really need accounts, so we can do away with them. Though +obviously since SledjHamr is designed to be a flexible set of tools +rather than one big take it or leave it system, people can use what ever +accounts system they need for their purposes. SledjHamr not only doesn't +impose an accounts system, we eliminate the need for one in the general +case. So we don't have to write one. B-) + +When a user fires up the extantz client for the first time, it can use +their local computer account name as the users name (I think most +operating systems make you create one when you install them). Extantz +could also do a reverse DNS lookup on the computers IP, and likely end +up with an ISPs dynamic IP reverse mapping, or maybe a real domain name. + +Extantz then tries to connect to a love server running on the same +computer, or starts one if it can't find one. This local love server by +default runs a small grid, with maybe a nice little cottage, and a star +gate. This is the users home, they can do what ever they like with it. + +The star gate works similar to current OpenSim hypergates, linking to +external grids and allowing HyperGrid access to them. Since the user +already has a local name and domain name, with the local love server +acting as the users home HyperGrid server, they are good to go visit +other grids. No real in world account need ever be created. + +The drawback is that the virtual worlds will be filled with lots of +root@123_231.bigisp-dyn.com users. Naturally it should be simple for +users to change the default name to anything they want. diff --git a/docs/common/portals.txt b/docs/common/portals.txt new file mode 100644 index 0000000..28498c2 --- /dev/null +++ b/docs/common/portals.txt @@ -0,0 +1,106 @@ +SledjHamrs killer feature, or one of them. + +A major reason for SledjHamr is to break down the garden walls. We do +this by allowing free travel between peoples virtual worlds. In OpenSim +this is done by HyperGrid, which is clunky and hard to use. Second Life +deliberately has no such system. Even worse, it's hard convincing people +in SL to visit your grid, coz it's all very hard, again due to +deliberate policy decisions by LL. LL knows their content is the key to +their business, even though almost all of it was created by the users, +LL locks it up tight. So people visiting OpenSim grids from SL have to +create a new avatar from scratch, which is such a major pain that most +people baulk at that and don't bother. And they can't bring their +inventory with them, inventory they paid for and spent years collecting. + +In SledjHamr, as well as allowing completely unrestricted and easy +access to lots of content, we should make it easy to travel between +virtual worlds. Part of this is to include compatibility layers in +separate modules to be compatible with what ever virtual world systems +are around. You would still need to create accounts and log onto those +worlds though. How can we mix them up? I imagine easy to use portal +objects. Let's start with the basics, and work out some more complex +examples. + +As mentioned in the no_accounts.txt document, every SledjHamr user has +their own little world running on their computer by default when they +start up the extantz client. There is a star gate on this default +world, an already setup portal that can connect to a bunch of default +external worlds. The user can use this star gate, and other peoples +portals to travel around other peoples worlds. Initially this could be +using OpenSim and its HyperGrid system. Later it would be SledjHamr +style worlds as well. + +A portal would be like Cobalt style portals, you can see the destination +in real time, and step through it to go there. They can be permanent, +or temporary. You can carry them in your inventory, they could just be +normal scripted in world objects. + +So you travel around the virtual worlds, meeting people, and you want to +invite some one to your home, or a group of people. You right click on +them and select "Invite them home" from the menu. Extantz knows your +home world, that's where you started and it's running on the same +computer. Extantz communicates to that home server, or starts it up +first. The home server adds this new person to it's access list. +Extant creates a portal object and offers it to the person, so they can +rez it anywhere. Or you could rez this portal object in the world you +are in. Either way, once the portal is in a world, it connects to your +home world, showing a view of your front gate, maybe including your +lovely garden in your front yard. The portal connects to the "front +gate" of your home world. + +Any one on your home worlds access list can step through this portal to +get to your home world. Simple to use, no figuring out HyperGate URLs +and copy pasting them, no manual messing with hard to use access systems. +Though it would still be possible to create URLs to in world places, to +store as landmarks, to email to someone, or to copy'n'paste into +farcebook. + +Portals rezzed in world could be temporary, and vanish after who ever +you invited to come stepped through it. Or time out several minutes +later so as not to clutter the universe with left over portals. Or +deleted by the owner / managers of the world you left them, or deleted +yourself from your own world. Portals could be permanent. Say you +found a larger world that you and the owner decide you wish to be a part +of. Portals could be left on both worlds linking them. The "portal" +could just be reconfiguring each world to locate the other world near +them, like neighbouring sims. Still, that should be done via the portal +interface, just a simple click. + +Portals can be fully open if you want to run a public world. People can +be banned. Or private worlds with specific groups and people allowed. +Similar to many web sites, you could have your own account system on +your world, people with accounts are allowed to build, or allowed to +with certain limits, or are the only ones allowed to visit. Privacy can +be applied to the portal, only those that can step through can see +through, or semi private, you can see a limited area, but not step +through. A portal could include a "door bell", people that want to +visit ring the door bell, someone might answer and let them in, but can +chat with them across the portal first. Perhaps getting dressed first. + +For those hard to reach places, I'm looking at you SL, a portal could be +coded as an LSL script in a SL prim object that you keep in your SL +inventory. It can operate in two modes, depending on who is looking. +If someone using a SledjHamr aware client looks, they see the usual +portal view mentioned above, and can easily step through it as usual. +Others would see a still photo of the view through the portal, or +perhaps a live video stream if the other world server has enough +bandwidth to support that. Or they could see just a logo if the world +owner hasn't bothered to pay LL to upload a suitable photo. If the user +of the viewer that is not SledjHamr aware clicks on or tries to step +through the portal, they are sent to a web page that lets them download +SledjHamr aware clients, with instructions on what to do to actually get +to that world. + +Once a user of that closed world steps through the portal using a +SledjHamr aware client, their client knows what that person looks like, +and has access to that persons inventory in that closed world, so they +can bring it all with them with no need to do anything other than step +through. The user remains logged on to the closed world, coz SledjHamr +needs no actual accounts. What their avatar is left doing in the closed +world for others to see is an open question. Perhaps sitting on some +chair on the portal prims, snoozing. Just had a better idea, the user +gets a new tab, in their original world they can wander off again and do +stuff, and in the new world they can do new stuff. Likely LL will ban +this in their TOS, and ban SLedjHamr aware viewers, they are anal like +that, and want to own your content to keep people locked in their walled +garden. Here's a SledjHamr for you all, break those walls open. B-) diff --git a/docs/common/privacy.txt b/docs/common/privacy.txt new file mode 100644 index 0000000..992867b --- /dev/null +++ b/docs/common/privacy.txt @@ -0,0 +1,5 @@ +There is more to come on this subject, but I just want to make a quick +note about stuff a friend just brought up. + +For people that share their computers, should have master passwords for +each user, and encrypt accounts, logs, log out photos, settings, etc. -- cgit v1.1