ProfileSync - A Simple ProfileService Wrapper and Replicator

ProfileSync - A Simple ProfileService Wrapper and Replicator

A simple, and effective, ProfileService wrapper for data management and replication.

About it :memo:

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? :white_check_mark:

  • 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 :+1:).

Why NOT use ProfileSync? :x:

  • 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 :hammer_and_wrench:

Example Usages :mag:

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

4 Likes