User:JB Kraft/Servers
Intro
This is an attempt to document what happens currently at the other end of the viewer, in other words, answer the question, "Who is the viewer talking to and what is it talking about?" Much of this has been done already with various wiki pages but there are still details missing that can only be gleaned with packet analysis and staring at the LibSL, opensim and viewer code and this is an attempt to fill in some of those gaps.
Note: I do not work for Linden Labs nor am I privy to any inside info. These are notes from my own investigation and could very well be completely wrong or misleading. Caveat Emptor. If you do see any errors or misinformation I would very much appreciate your input and help. JB Kraft
Servers
There are three main servers, though in practice many other sub-systems and servers could be utilized, from the viewer perspective, there are three servers that it needs to talk to.
Login Server
The login is server is the first point of contact. It utilizes an XML-RPC style dialog to establish credentials and to locate the other two servers to talk to. This is the most documented part of the process so I am not going into it here. The following links will get you up to speed.
- Current_login_protocols -- how it works, pretty straight up
- LibSL Login -- LibSL take on it
CAPS Server
The Capabilities system allows viewers to request abilities and be temporarily granted those abilities through a unique URL. The transport format is LLSD XML, and clients can either post new events to CAPS URLs or wait for events to come from the server on the event queue connection the client holds open.
- Capabilities -- short blurb about what it is but no nitty gritty
- Message_System_and_Capabilities -- some more info but in slideshow format
Simulator Server
The simulator talks UDP. It handles the view or scene, physics issues, and a bunch of other stuff. Most of it in fact. It's the thing that makes things go bing. Although some of the packet formats are documented, there is little on how those packets actually go back and forth, book-keeping and the general query/response thing. I hooked up wireshark to a session to watch the conversation and am attempting to collate the info linked below with the the packet dump. Hopefully I can make some sense of things here.
So, for now, here is the first bit of the conversation with the beta grid from the 1.20.15 viewer. Note that order is the order the packets came in and left and is not the sequence number of the packet. The sequence number is shown in braces after the message name.
Order | From Viewer | From Server |
---|---|---|
1 | UseCircuitCode (0001) | PacketAck (0001) |
2 | AgentDataUpdate (0002) | AgentDataUpdate (0002) |
3 | CompleteAgentMovement (0002) | TestMessage (0003) |
4 | EconomyDataRequest (0003) | AgentMovementComplete (0004) |
5 | ViewerEffect (0004) | TestMessage (0005) |
6 | PacketAck (0005) | PacketAck (0006) |
7 | TestMessage (0006) | HealthMessage (0007) |
8 | TestMesssage (0007) | PacketAck (0008) |
9 | AgentHeightWidth (0008) | ViewerEffect (000A) |
10 | AgentUpdate (0009) | - |
11 | AgentAnimation (000A) | - |
Packet Data
These are some decoded packets.
Name | Type | Flags | Data |
---|---|---|---|
PacketAck | Fixed | 00 00 00 00 05 00 ff ff ff fb 01 02 00 00 00 |
UDP Messages
- Message Layout -- Explanation of message format and the message template
- Packet Layout -- the layout of the UDP payload.
- Circuits -- Establishment and common operation of UDP circuits between two nodes
- Packet Accounting -- how the message system handles packet sequencing, reliability, suppression, throttling, etc.
- Common Messages -- messages that are handled by every Indra message system instance.
- Xfer Manager -- messages used by the
LLXFerManager
class. - Transfer Manager -- messages used by the
LLTransferManger
class. - All messages -- an alphabetical listing of all messages in the system
- LibSL Network Protocol -- LibSL docs
SLIR
I am working on a server system in my spare time. LibSL, opensim and Pyogp are great projects in which I participate in as much as I can but, for my own purposes and education, I am building this system in Ruby. At the moment I call it 'SLIR' which means absolutely nothing or possibly Second Life Interactive Ruby, or even So Little Interesting Real-Work, I don't know for sure. I had a python implementation of this as well but Pyogp kind of made that moot. I plan on releasing the SLIR code as soon as I can get the viewer to login and logout. So far it's still complaining when logging in.