Right now, the documentation (albeit lackluster) is all it has; you should be able to get a general idea of how to use it though. Iām in the process of improving the documentation, but itāll take a while.
If you have any questions, feel free to ask.
Though youāre able to view the Tutorial page on my fork. Granted, itās still being worked on; it should still be useful one way or another.
The Tutorial page is now available on the documentation page
Happy to hear you want to help - please do get in touch on OSS discord or present your ideas to me somehow!
Important Fix - Version 1.1.3
Fixes a bug where cancelling a hook would cause a future hook to be skipped over, and exports some more types.
Documentation update
I have heard your feedback and received your contributions! I have now published two more pages of in-depth usage information.
You mention why to use this over ProfileService, but wondering if stuff on that list is still comparable to the new ProfileStore As I was tempted to switch over to ProfileStore, but I really need a DataStore library that can not just handle session locked player data, but also shared data that players can access across servers
ProfileStore is certainly an improvement over ProfileService and fixes several problems that ProfileService had. It will also be easier to use for beginners and I agree with all the changes loleris has made! However, ProfileStore is still lacking in several places compared to DocumentService - which still has far superior error handling, better type support, better debugging features (validation), migrations, immutably editing, and supports both player data and non-player data. It also is fairly lacking in unit tests and real-world testing compared to DocumentService. For a new project I would of course go with DocumentService but Iām a bit biased!
If you want to use the same library for shared and player data definitely go with DocumentService - thatās one of the main reasons I had for making it!
Do you have metrics on how well it performs/etc.
Iām wanting to implement a clan system similar to what Pet Simulator 99 has, and at the moment am just using Robloxās DataStoreService and MemoryStoreService, but Iām sure Iām not doing it 100% efficiently, and I am very concerned about reaching data limits quickly, as itās having to retrieve clan data for top 100 clans, etc. constantly. Curious if this would be a valid use case for DocumentService.
In particular, using MemoryStoreService to handle data getting across servers, saving it once, vs every server. And keeping a valid cache constantly, without data limits being reached.
For example
- Get Clan data
- If cached (MemoryStoreService) return cache
- else load from data store + store cache
But if letās say 2 differnet servers, player leaves clan on 1 server, needs to update to other server (obviously not immediately) and update the data, but if you go constant players joining/leaving/etc. data stores can reach limits super quickly, especially with hundreds of clans. So ideally thereād be a way to store the update, and just do 1 big update once every minute or so
Hey, sorry for the late reply!
Iām using DocumentService for a clan-style system. The main benefits are migrations and type checking.
To be honest, I donāt think you will get any performance benefit from switching to DocumentService. Itās more about DX - the only optimisation DocumentService provides is caching session-locked data.
Your use of MemoryStoreService for clans is very interesting, and sounds a lot more promising for performance than switching to this library. I personally just impose ratelimits and caches for now - the DataStore limits are pretty high to be honest. Depending on the complexity of your projects, if you want complex migrations it might be worth it, but if you only need simple reconciliations you probably donāt need this library.
Hi everyone!
If you would like a say on the new signals API for v1.2.0, please comment on my pull request!
Update
v1.2.1 has released and DocumentService is now stable in a production game! See README.md for more infromation.
Hello! It seems pretty good datastore library module and i want to use it in my project but i have a few questions to try to migrate it over profileservice module.
- is it possible to read old versions of data like in profileservice?
- i donāt use wally or any frameworks cause i donāt want to migrate my projects to frameworks, its too hard for me and my project uses a lot nested instances, is it possible to use it without using frameworks and Guard?
thanks.