ProfileSync - A Simple ProfileService Wrapper and Replicator
A simple, and effective, ProfileService wrapper for data management and replication.
About it
ProfileSync is a simple project that I made for managing data and its replication in my games, it provides an easy-to-use syntax and allows you to easily access player data on both client and server with the same syntax.
It currently relies on a simple wrapper of Warp for its replication network, so it should be quite performant in that context (I hope).
Also, since some of you might want to handle replication yourself, or not have it at all, you can disable it completely by just having its Filter List to be empty while the Filter Type is set to âWhitelistâ.
ProfileSync's Past Release
ProfileSync was previously released some time ago lacking features and having a considerable amount of issues that got fixed up privately as I was working with it and polishing its use cases, so it should be at least a bit reliable for testing out different solutions.
Also, I know someone might bring this up so Iâll make it clear that this is not a ReplicaService substitute, it actually does not compete with it whatsoever as itâs a lighter and less robust approach to the replication context.
Why use ProfileSync?
- Itâs simple, fast, and does the job.
- I maintain it since I use it.
- Itâs cool to try stuff out (100% not a personal opinion ).
Why NOT use ProfileSync?
- It has NOT been properly tested in production.
- Itâs in early development.
- Did I already say it has not been tested in production? So yes, DO NOT use this in a production environtment yet unless youâre willing to take the risk of ProfileSync not working as expected.
Setup
- Get the model from the Creator Store: Roblox Creator Store
-
- Or get it from its GitHub: nSpected/ProfileSync (github.com)
- Drop the âProfileSyncâ folder inside ServerScriptService
- Setup the data structure inside
ProfileSync > Utilities > Settings
- Youâre ready to go!
Example Usages
Gettings a playerâs data:
Can be used on both client and server, though client is limited to the data that he is allowed to read.
Not using promise:
local playerProfile = DataController:GetProfile(player, 20, false) -- Yields
if not playerProfile then return end --// Profile could not be loaded
Using promise:
DataController:GetProfile(player, 20, true):andThen(function(playerProfile)
if not playerProfile then return end --// Profile could not be loaded
--// Yay, profile loaded!!
end):catch(warn)
Editing a playerâs data:
Setting a playerâs coins to 100:
local newCoins = DataService:Set(player, "Coins", 100)
print(newCoins) --// It will print 100.
Documentation
For more information regarding ProfileSync, take a look into its documentation page:
License
MIT License
Copyright (c) 2024 InKrnl
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the âSoftwareâ), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.THE SOFTWARE IS PROVIDED âAS ISâ, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Development Support
For developers that wish to help with bug fixing or adding features to it, please contact me through my DevForum DMs, or open an issue on github (for bugs).
How to Update
I setup the model to contain multiple packages for the components that are more likely to get updated by me and that you probably wonât have to touch, which means that updating should be as easy as just right-clicking an outdated component and pressing to get the latest package version.
More about Packages here: Packages | Documentation - Roblox Creator Hub
Credits
- Warp: Warp - very fast & powerful networking library - Resources / Community Resources - Developer Forum | Roblox
- ProfileService: Save your player data with ProfileService! (DataStore Module) - Resources / Community Resources - Developer Forum | Roblox
- Promises: roblox-lua-promise | roblox-lua-promise (eryn.io)
- TableUtil: TableUtil | RbxUtil (sleitnick.github.io)