Misleading Behavior of MemoryStoreService Queues

Issue Description

Recently I have been working on writing a wrapper module for MemoryStoreService Queue’s to make using the service more user friendly, extending upon its functionality to be accessible as a more traditional queue data structure, ie adding functions to serve as a formal Push, Pop, Peek, as well as additional behaviors such as is checking if a queue is empty and wiping a queue of all data.

I have been battling with what I initially believed was unintended behavior of the service, but after more toying I believe that I am simply trying to use the service in a way it is not designed to be used.

MemoryStoreService is of a queue data structure, has extremely simplified and unintuitive ways to interact with it

My main gripe with the service is a product of confusing documentation, specifically that of the “invisibility timeout” of data read through :ReadAsync. Though this timeout is explained on this page, I did not understand what exactly it meant until I spent a few hours toying with the behavior myself. This timeout makes it so that data is hidden from the queue, making it appear empty, but after 30 seconds is visible again. This makes simple functions yield for 30 seconds, and trying to remove this annoying yield by setting the timeout to 0 makes it impossible to delete from the queue as :RemoveAsync must be called before the timeout expires.

The documentation for MemoryStoreService is a maze to work though, and as I struggled with the API I constantly found myself with 10+ tabs open at all times. Here is an example of how I would navigate through the documentation:

Additionally, as found in the code sample for :ReadAsync, it would appear as though if the queue is empty items should be an empty list. However, I have found that it returns as nil.

Issue Area: Documentation Content
Page URL: Memory Stores | Roblox Creator Documentation

4 Likes

Thanks for the report! We’ll follow up when we have an update for you.

1 Like

Apologies for the delayed response. Just wanted to let you know we updated all docs related to MemoryStoreService and resolved the reported issue. Thanks!

2 Likes