User:Ravenhurst Xeno

From Second Life Wiki
Revision as of 10:16, 29 March 2008 by Ravenhurst Xeno (talk | contribs)
Jump to navigation Jump to search


LSL Database

These programs comprise LSLBase, an entirely LSL based database system. With an appropriate hashing function, it should be able to easily handle 25,000 entries and/or 1 MB of data.


The LSLBase components do nothing on their own but are designed to be a basic key/value database backend for one or more client scripts. All the database component scripts and the client scripts are contained within a prim and the client script(s) communicate with the database through llMessageLinked().


There LSLBase has several different components:


DB

This is the core database module. It can be used standalone by a client script or ganged together through DBMeta.

DBMeta

DBMeta is a multiple DB script controller that lets a client script gang together more than one core DB script for expanded data storage.

DBSort

DBSort is the sorting module that lets the client sort the data of one or more core DB scripts

DBTest

Interactive testing module to test the other components.


Using LSLBase

The client script(s) and the LSLbase component script(s) are placed in the same prim. The client communicates with the database components through link messages: <lsl>

 llMessageLinked( LINK_THIS, MsgId, DBCommand, Caller );

</lsl>

LINK_THIS

All components are in the same prim

MsgId

The client program can set this to an arbitrary value and responses from the database components will have the same message id.

DBCommand

The command to the database. It is of the form: Target|command[|operand][|operand...]

Each part of the command text is separated from the next by the '|' character.

Target

The name of the LSLbase script that is the target of this command. This can be "DB" for the basic core database, "DBMeta" if the client is using the controller. The core DB script(s) can be given any name so more than one can be used in the same prim.

command

This is one of several literal strings that indicate the database command to be processed.

operand

Many commands take one or more operand. Operands are separated by '|' characters so only the final operand to a command can actually contain a '|' character.