• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
MAINTENANCE ANNOUNCEMENT - JIRA will undergo maintenance starting 1:00am PDT through 3:00am on Saturday 2010.03.20. Please do not enter issues during this time as the system maybe restarted.
Issue Details (XML | Word | Printable)

Key: SVC-169
Type: New Feature New Feature
Status: Open Open
Priority: Normal Normal
Assignee: Unassigned
Reporter: Cutter Rees
Votes: 5
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
2. Second Life Service - SVC

Allow minimal database storage (persistance), either per user or per prim

Created: 02/May/07 06:19 PM   Updated: 27/Jan/09 12:34 AM
Component/s: Scripts
Affects Version/s: 1.13.4
Fix Version/s: None

Time Tracking:
Not Specified

Environment: Any
Issue Links:
Relates


 Description  « Hide
The lack of any kind of in-game persistence results in all kinds of inefficient and unreliable workaround. Any script that wants to reliably persist data has to have an outside web site associated with it and do the storage and retrieval via HTTP. I propose the following:

llObjectStoreData(string tag, string value)
string llObjectFetchData(string tag)
llUserStoreData(string tag, string value)
string llUserFetchData(string tag)
llAuthorStoreData(string tag, string value)
string llAuthorFetchData(string tag)

Both store calls would work the same way, as a map a la Java. They would persist a string value associated with a string tag. In the case of llObjectStoreData, the data would be specific to the UUID of the containing prim. So in effect, the prim UUID and the tag would form a compound primary key. In the case of llUserStorageData, the data would be specific to the UUID of the prim owner. Thus, prim-specific storage, as well as user-common storage, would be available. The user-based calls would all for semaphore-like operations (one writer, many readers) among multiple unlinked objects. The Author calls would work the same as the User calls, but would key on the UUID of the script author, allowing a purchased object to report back to the author, or receive status updates easily (new version available, for example) This also would allow for broadcast-like capabilities, which one object could serve as a data collector via, for example, an HTTP request, and then the client objects could query the author-common data to get their updates, rather than all making HTTP requests.

The storage could be limited, for example 1K per object and 10K per user/author.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Haravikk Mistral added a comment - 27/Jan/09 12:32 AM - edited
I posted an issue that's pretty similar (which I've closed as a duplicate); SVC-3722.
The things I want to note from it are the parts on access-synchronisation (when one script is writing or removing, either the whole construct, or the single setting is "locked", blocking scripts attempting to read (or also write/remove) from introducing inconsistencies. Another point is that it would be nice to have the storage work across a whole linked-set, personally I prefer this to per-prim and/or per-avatar. The others are fine in addition, but whole linked-set is most useful I think. It could be done as an extension of per-prim by having the script specify the link-number to communicate with, making it easy to always use LINK_ROOT or LINK_THIS, the constants LINK_SET and LINK_ALL_OTHERS of course would do nothing. The final point is on the use of lists to store values by type, rather than always casting to/from string.

So perhaps I'd modify the proposal like so:
list llPutObjectData(integer link, string tag, list value) - stores a value in link's shared memory-space, returning any old value (or empty-list if the entry did not exist before).
list llGetObjectData(integer link, string tag) - retrieves a value from link's shared memory-space.
list llRemoveObjectData(integer link, string tag) - removes a value from link's shared memory-space. May be replaced in favour of using llPutObjectData(link, tag, []).

For avatars I dunno, one alternative is to use a key instead of a link, but I don't know if it's as elegant as you'd have to keep your key updated if you're using it for a linked-set.