I need help with profileservice

Hello,

So lately I’ve been working on a new project. I will not leak the main idea but I can say that it involves building. The problem is that these builds will need to be saved and I’m not really that experienced using either datastore or ProfileService. I have although used profileservice for smaller data storage such as xp, coins etc.
I was thinking of using ProfileService and use a table-like structure like this one:

local ProfileTemplate = {
	Moderation = {
		Warnings = 0,
		Banned = false
	},
	Builds = {
		-- Nested tables with instance data. Will include a lot of data.
	},
	Currencies = {
		Xp = 0,
		Credits = 0
	}
}

I don’t know if this structure is bad in the long term. Is it better to have a separate profile for the Builds to not bypass the 4mb limit? Or maybe it’s better to use Ds2? I don’t know.

I would appreciate any help.

/skateborden

1 Like

Your approach using ProfileService and a table-like structure seems reasonable for storing various types of data including builds. However, considering the potential size of build data, you might run into the 4MB limit for ProfileService data.

To address this, you could indeed consider separating the builds into their own profiles to avoid hitting the size limit. Alternatively, you could explore using DataStore2 (Ds2) which offers more flexibility and scalability for larger datasets.

With DataStore2, you can partition your data more efficiently, potentially avoiding the size limitations you might encounter with ProfileService. Additionally, DataStore2 provides features like caching and automatic retries for data operations, which can be beneficial for managing large amounts of data.

Ultimately, the decision between ProfileService and DataStore2 depends on your specific requirements, such as the size and complexity of your data, as well as your familiarity with each system. You might want to experiment with both approaches to see which one better suits your project’s needs.

If you have any further questions or need assistance with implementing either approach, feel free to ask!

2 Likes

Alright, thanks. But I’ve never used DS2 before and I’ve heard a lot of people saying that it can be complex and have a steep learning curve. Do you think that ProfileService will do the job?

For right now, it should be more than enough. Eventually you may run into issues and have to switch over, but ultimately it’s your decision if you want to structure it that way with DS2 now or just hope you don’t need to.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.