A quick question about managing server data.
Let’s suppose a player purchases something from an in-game store. This information, through RemoteFunction would travel to the server and an object’s attribute in the server will be updated. Let’s say that this data needs to be replicated to other clients as well. Now here’s the dilemma :
I can call a function called replicateToClients() that goes through list of players.
I can dispatch an action to Rodux and let it do it’s thing.
It’s an interesting use case that doesn’t really involve UI, but performance and code wise, what do you all think about using Rodux for Non-UI state management?
Iterating through a list of players will always be more consuming. If you dispatch an action to Rodux, you’re lessening your code which is great ig. I haven’t used Rodux because I prefer my own custom solutions to things(allows me to make changes where I please).
@sanjay2003 Not really sure what you mean by “lessening your code”, because you also have to write bunch of Reducers and action creators in order to make it work. I was wondering if doing this extra effort would make the code more modular or waste of time.
@sanjay2003 Thanks for the input, but I just can’t understand why that’s bad practice. After all, without optimization the runtime would only be O(n). While redux may do it better, it wouldn’t really make a big difference. Instead I’m more interested in modularity.
Let me rephrase the question: Is Rodux stable and fast enough to use it in the server, in a Non-UI setting?
I was looking at rodux, because it popped up in roblox internal packages, but never really got to practice on using it, my friend thinks it’s a waste of time, but i find it somewhat interesting nonetheless, if you can provide an example like here on using it on the server, instead of ui, maybe it could clear my mind about using that module.