How to have a member system?

I am talking about usernames / passwords. Is it kind of like a server, like i/o files, except with a server? Like, say I use fstream, and I make a file on a server. Each time someone new registers, the file on the server is written to writes it down, and when the user signs in, the file is searched for it, and if it isn't found, an error message.

Am I in the ballpark? I assume I will have to learn some ACE networking stuff with C++. But can someone explain to me how it works? Just curious, because I am thinking about getting into app development.
Google SQL database programming. This is commonly used for storing login and member information.
Outside the SQL world...
Keeping a different file for each user isn't recommended at all (for being very slow, and unsafe. What if you want to allow your users to have a : in their nick?).
I suggest a single file with an array of user informations.
I had a test on my own lua webserver, and found out JSON isn't that bad at storing stuff, once you are able to de/serialize correctly.

Basically, the result file is on the lines of:

{"SGH":{"name":"SGH","pwd":"<crypted password>","id":"<unique user id>"}},
{"Richard":{"name":"Richard","pwd":"<crypted password>","id":"<unique user id>"}}


And so on for each user.

But, try to stick with SQL for your purpose.
JSON files can be read by humans with a simple notepad.
Last edited on
Topic archived. No new replies allowed.