MemoryStoreSortedMap SortKey equivalent for OrderedDatastores

As a developer it’s currently annoying the fact that one can’t use an ordered datastore without a non-number value. When this is supported by MemoryStoreSortedMaps via SortKey.

This makes it annoying, as I have to store my sorted value separate from the rest of my data. For instance, I have a money value I store, and I want to also store session lock data with it. In order to do this I have to use 2 datastores, one normal for the session data and an ordered one for ordering so I can have a money leaderboard.

Having a MemoryStoreSortedMap Sortkey equivalent for OrderedDatastores would help significantly. As I wouldn’t have to use 2 datastores thus taking up essentially double the requests, vs just using a normal datastore alone.

while i agree for the feature request that let us store some data along side the number value can be flexible, can you explain more on your current use case?

usually for a leaderboard, we store {key = userId, value = money} into OrderedDataStore
if we need the player data, we get the key as it is the user id, and we query the DataStore for their data, two requests in total like you described.

But what data stored along side the money can benefit you to save you one extra call for the player data?

Session lock data, as that has to be stored in a seperate datastore as of now. ie

{
     id = "efa73916-e3ee-4971-8028-6423ea3cac37",
     last_save_time = 0,
}

for the time being, would it be okay if you store the session data in MemoryStore? as it has a separate request limit than DataStore, and it is more fit for session non-permanent data

No I’d rather just rely on one service, as memory stores arent on the same servers as datastores. So its just adding an extra point of failure, if I were to use memory stores

I support this idea. I store values into ordered data stores using the UserId as a key, but need to make the value display along with the username in the leaderboards. I know I can use Players service or UserService to get the username from user id, but the rate limits are a problem considering the update rates and there being multiple leaderboards. I have to temporairly store values in my game to link the username with the user id, but it would be way easier if I could just save the username with the data stat. And that’s actually better because if the player change their name, the moment their data gets saved again to the ordered data store, the username will also update.