arrow_upward

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
database: networking and security
#7
(11-21-2020, 08:40 AM)fitkoh Wrote: Not really: my limited programming knowledge is entirely self taught and self guided. I haven't adhered to any particular curriculum or course of study... I just try to learn what I need to know to achieve a goal. I have bits and pieces of different languages, techniques, methods I've acquired over the years, mostly from examining other's code. Recently I've found https://www.w3schools.com to be very useful.

Perhaps a long long time ago, before stylesheets, I could have been considered fluent in javascript, but js have evolved significantly since then, and I haven't kept up with the changes. This recent project has been challenging, but I am satisfied with my progress thus far. I have some help on the client, but I've done all the integrations with the server side, and wrote the first prototype from scratch in 2 days. I then did some research and rewrote almost the entire set of scripts using newly discovered techniques. Five days later, more studying later, I rewrote about half of what I had. Now I'm working on a fourth iteration which will be heavily focused on security, in hopes of a round of beta testing maybe by early next year Smile

Okay then it might be helpful to remind you that a full-blown registration system is only needed when one wants to identify the users/players in the long-term; hence the users table/list and the registration process plus the login/logout routines. If that's what you really want then yes, a database-backed app is warranted.

On the other hand, if you only want to keep track of the who's who, short-term (ie during the ongoing game server-side), then PHP sessions are what you're looking for instead. PHP session is the way PHP keeps track of the user-agent requests (ie the way it keeps state on a stateless protocol that's HTTP). They are generally ephemeral (destroyed when the browser exit) and you can destroy(/or regenerate them server-side) via your PHP script.

I'll leave it to you to see what fits best your use case. In case of an ephemeral state preservation (that shouldn't require a user, login, logout tables) you'll only need the session table implemented preferably with Redis [don't use a classic database server in Games, inadequate for latency] and a session script.

The way I would have implemented it is by using JavaScript in both the front-end (your actual JavaScript-based game) and in the back-end using Node.js and Redis to store my users session data.

If Node.js and Redis are new software for you, I'd highly recommend you to start studying them in-depth. They are the keys for a successful HTML5-based Game App.

Good luck!
VirMach's Buffalo_VPS-9 Holder (Dec. 20 - July 21)
microLXC's Container Holder (july 20 - ?)
VirMach's Phoenix_VPS-9 Holder (Apr. 20 - June 20)
NanoKVM's NAT-VPS Holder (jan. 20 - ?)


Messages In This Thread
database: networking and security - by fitkoh - 11-19-2020, 06:48 PM
RE: database: networking and security - by fitkoh - 11-20-2020, 08:53 PM
RE: database: networking and security - by fChk - 11-21-2020, 06:48 AM
RE: database: networking and security - by fitkoh - 11-21-2020, 08:40 AM
RE: database: networking and security - by fChk - 11-21-2020, 12:03 PM
RE: database: networking and security - by fitkoh - 11-24-2020, 05:47 PM
RE: database: networking and security - by fChk - 11-26-2020, 10:48 AM
RE: database: networking and security - by fitkoh - 11-26-2020, 04:48 PM
RE: database: networking and security - by fChk - 11-28-2020, 06:59 AM
RE: database: networking and security - by fitkoh - 11-28-2020, 06:49 PM
RE: database: networking and security - by fChk - 12-04-2020, 10:00 AM

person_pin_circle Users browsing this thread: 1 Guest(s)
Sponsors: VirMach - Host4Fun - CubeData - Evolution-Host - HostDare - Hyper Expert - Shadow Hosting - Bladenode - Hostlease - RackNerd - ReadyDedis - Limitless Hosting