As a Roblox developer, it is extremely difficult to use datastores in unpublished or local place files. In order for developers to effectively “use” datastores while not working in published places under an experience, developers have to write their own “mock” datastore services in luau. While this gets the job done, this puts unnecessary burden on the developer. Any time new datastore features are added, any limits are changed, or any parameters are added, the developer now has to update their “mock” datastore library to be 1:1 with what Roblox’s APIs do. This also requires the developer to actively maintain their “mock” datastore library, which is not always possible. Time is limited, developers are busy with their own games, etc. While there are some libraries that exist, they are not actively maintained due to the aforementioned issue of time.
This is unnecessarily difficult for what should be a built-in feature of DataStoreService.
When working in an unpublished place file, DataStoreService
should simply store the data temporarily. Any datastores that are created or keys that are created would be discarded after a “play solo” test or a local server has shut down. Any reads to these datastores or keys would return values that are being cached during that test session.
In this mode, DataStoreService
would behave exactly like it does in a normal published place - same limit rates, same size restrictions, etc… except instead of the data being stored in actual datastores, it’s just cached in local memory since it’s an unpublished place file.
Having the ability to “use” DataStoreService
in local files allows data systems to work in unpublished files, meaning developer code does not break simply because it is running in an unpublished place file. This makes the code work in a larger variety of workflows, specifically those that are heavy on external-tooling (such as rojo). This also gets rid of the need for developers writing their own “mock” libraries, reducing the burden on developers who simply want to test their datastore code without needing to go through the hassle of publishing a place.