Difference between revisions of "User:Ravenhurst Xeno"

From Second Life Wiki
Jump to navigation Jump to search
(New page: {{LSL Header}} == LSL Database == These programs comprise SLBase, an entirely LSL based database system. With an appropriate hashing function, it should be able to easily handle 25,000 ...)
 
Line 4: Line 4:
== LSL Database ==
== LSL Database ==


These programs comprise SLBase, an entirely LSL based database system. With an appropriate hashing function, it should
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.  
be able to easily handle 25,000 entries and/or 1 MB of data.  


The SLBase components do nothing on their own but are designed to be a basic key/value database backend for  
 
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
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().
prim and the client script(s) communicate with the database through llMessageLinked().


There SLBase has several different components:


  <table  {{Prettytable}} >
There LSLBase has several different components:
    <tr>
 
      <td>
 
        DB
<table  {{Prettytable}}>
      </td>
<tr>
      <td>
<td>
        This is the core database module. It can be used standalone  
'''DB'''
        by a client script or ganged together through DBMeta.  
</td>
      </td>
<td>
    <tr>
This is the core database module. It can be used standalone  
      <td>
by a client script or ganged together through DBMeta.
      </td>
</td>
      <td>
</tr>
      </td>
<tr>
    </tr>
<td>
'''DBMeta'''
</td>
<td>
DBMeta is a multiple DB script controller that lets a client script
gang together more than one core DB script for expanded data storage.
</td>
</tr>
<tr>
<td>
'''DBSort'''
</td>
<td>
DBSort is the sorting module that lets the client sort the data of
one or more core DB scripts
</td>
</tr>
<tr>
<td>
'''DBTest'''
</td>
<td>
Interactive testing module to test the other components.
</td>
</tr>
</table>
 
 
== 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>
 
<table {{Prettytable}}>
<tr>
<td>
'''LINK_THIS'''
</td>
<td>
All components are in the same prim
</td>
<tr>
<td>
'''MsgId'''
</td>
<td>
The client program can set this to an arbitrary value and responses from the database components will have the same message id.
</td>
</tr>
<tr>
<td>
'''DBCommand'''
</td>
<td>
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.
<table {{Prettytable}}>
<tr>
<td>
''Target''
</td>
<td>
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.
<td>
</tr>
<tr>
<td>
''command''
</td>
<td>
This is one of several literal strings that indicate the database command to be processed.
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
''operand''
</td>
<td>
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.
</td>
</tr>
</table>

Revision as of 09:16, 29 March 2008


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.