Expand my Community achievements bar.

Simple int based Shared Index?

Avatar

Level 2
I have a somewhat complicated data model. And I am starting
to regret using GUIDs for every reference on data that is often
times internal to the session. Is there a built in way to generate
a shared int based index? One that basically starts at zero and
increments on every getIndex or something? Maybe clients have a way
of allocating whole blocks of indicies. I think I can build a
version based on baton passing but I am curious if there is
something withing the framework that would be better suited.



Perhaps and assigned index authority? One user basically
sends out messages allowing users to allocate a block of 1000
linear indecies. Users request for a block and the index authority
allocates one to them in a fifo fashion. It would be nice if the
server side could do simple tasks like these automatically
though.....



_vesuvias
2 Replies

Avatar

Level 2
It looks like I found the answer to my problem. It looks like
the itemID from STORAGE_SCHEME_QUEUE can be used for this purpose.
So essentially I generate a message to a node using this scheme and
grab the itemID on the ItemRecieve even that had my userID as the
publisher. Easy... enough.

Avatar

Former Community Member


Hi _vesuvias,



Yup, you got the answer - if the storage scheme is QUEUE and
you haven't supplied an itemID as you publish, the service will
generate an itemID for you. (In fact, I'm pretty sure that this
works with MANUAL as well).



let us know if you hit any roadblocks with this approach

nigel