Best way to create a scaleable group promotion system?

I know this isn’t directly to do with Roblox, but it’s for a product (on Roblox) that I’m working on that I want to be scaleable.

Not sure what the best way to explain this is, but I’m essentially working on an auto group promotion system, with lots of other things included (like a prestige system and admin commands) which I can do. The issue is the backend. I can do the basic code that uses Express (In Node.js) to get requests the IP from Roblox and then act accordingly with Roblox-js to promote/demote the user, etc, but this means that for everyone who purchases, I have to create an entirely new script and edit it to work for that person.

I want a system that is easy for me to set up, in the long-run, so that all I have to do is enter the client’s information into some kind of database (Like an auth token, game ID, user ID, group ID, etc), and then when that user’s game sends a request, the server can validate that that game is who it says it is and acts accordingly on the clients group.

1 Like

Take a look at this Github bot
It’s sadly only written is php. I can try to find a node.js bot for you. Why haven’t you also tried to code it yourself? Roblox has a great httpservice API but you’ll need a proxy to access it sadly.

I have tried making it myself, I can use Roblox’s httpservice. This issue is creating the backend on my VPS. Let me give you an example:

Server script in Roblox: (I know this code isn’t entirely correct)

local connection = httpservice:getasync(IP, AuthKey, All the other info)
connection:promote(userid)

Something like that is what I’m after.

EDIT: The bot you sent doesn’t do much to help me with this because it doesn’t authenticate the user in any way. I need a system that is a lot more scalable and communicates to a database that holds all of my clients info, like I said in the original post. I can already to the ranking part and everything else. The main issues are everything iv just stated. Authentication and getting all the clients info from a database.

Explain the authenticate user part to me more?
Do you want to hold a database of all the user’s ranks in a group?

No, I want a database that I can easily add to that holds all of my clients information (Group ID, User ID, Authentication token, Game ID(s)) so that when they send a request , I can get the AuthToken that will be in the header, match that to the AuthToken in the database and then match the game-id that roblox automatically sends in any http request (I know the second bit is still insecure, its just for an extra layer of security.)

So you want to track what games they’re in and group id and user id? Sorry if this is wasting your time to explain it to me

No. So basically, when they purchase the system from me, I will add them to a database of clients. They purchase it for each group that they want it in, the script will then work for each of the groups games.

Edit: Userid is just as an identification so I know who it is and who to blacklist if they leak their authtoken.

Ah, a database of purchases for a user per group they want that purchase to happen in?

Yes. Then, when once of the group games sends a request to my sever, my server will act accordingly, know which group it is and rank that person. But how do I do this? Currently I’m having to create a separate script for each person. Oh, and the database would have to contain a username and password for the bot account of each group.

Have a database system connected up to your ranking system.
Make a request have these arguments:

Group ID
UserID
GameID
Auth Token

Let me visualize this for you


Of course, this is a very simplified visualization but this should give a good understanding.
You’ll obviously need to do security check like if the request if from a trusted IP or is sent via Roblox servers.

You’ll need a database system hooked up towards your ranking system. If you don’t feel like coding a lot get 2 seperate databases and store them as seperate servers. Make them send HTTPService requests to eachother or use another method. This is very inefficent. It’s better off you combine both database and rank up into 1 system.

2 Likes

Okay thanks!

1 Like

Your answer is mLab. From experience in doing development on a project by @TechSpectrum that provides a service similar to this, mLab is a very good solution this.

It is easy to use, scaleable, has a free storage limit of 500MB per database (Which is alot for one clan, considering it’s free), and can be used to store whatever you want for clans, e.g Audits for logging experience, as well as profiles for each individual user in the clan that has some form of data saved for them, e.g. XP.

Here is a tutorial by w3schools on how to get started with it. This will teach you the basics regarding how to use the database, and to store and retrieve data.

Later on if you wish, you can set up a REST API to help you set up endpoints to retrieve data for users in your database. Here is a snippet of a work in progress tutorial about it that will be released to the public soon.

Hope this helps, let me know if you have by questions and I’ll be happy to assist. Good luck!

4 Likes

You can message me on Roblox TechSpectrum#2620 and I can give you advice as I’ve already coded a highly scaled promotion system for over 50 clans that includes superclans. Plus I’m writing a tutorial how to make an entire web service right now that’s going to come out probably tomorrow or this Saturday.

Thanks for the reply, I’ll be sure to check it out!

Thanks, I’ll message you soon!