
| Key: |
SVC-169
|
| Type: |
New Feature
|
| Status: |
Open
|
| Priority: |
Normal
|
| Assignee: |
Unassigned
|
| Reporter: |
Cutter Rees
|
| Votes: |
5
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
Any
|
|
Issue Links:
|
Relates
|
|
This issue Relates to:
|
|
SVC-98
Client Script & Persistent Data Object
|
|
|
|
|
|
This issue is related to by:
|
|
|
SVC-3515 Storage Objects instead of writing Notecards
|
|
|
|
|
|
|
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.
|
|
Description
|
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. |
Show » |
|
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.