Skip to main content
gamedev.net
🔒 Locked

Game Login Server Problem

Started by Robinhood 6 replies 300+ views
Original Post
Robinhood
Robinhood
I am developing a net game login server,and I found there are two way to process the login request.One is processing the requests one by one,and the other is processing several requests simultaneously in many threads.I don''t want which to choose,please help me.If you got a better idear,share it with me,OK?
Zipster
Zipster
How involved is the login process? You don''t need to process requests one by one, or use separate threads. The server should just accept messages, and be able to identify both the client that sent the message and the message itself. The server then just keeps track of how far along each client is in the login process.

For example, you have a separate thread that reads incoming messages (or use the main thread if you wish), and then once they arrive in full dispatches them to be processed. They are routed depending on the message type and client.
ChaoticCanuck
ChaoticCanuck
You are talking about a fundamental portion of the infrastructure for your network code. You really should plan out the overall protocol for communication before you go any further that way you can select the best approach for the way to handle it.
Robinhood
Robinhood
Shall I use TCP or UDP to implement the Login Server
Monder
Monder
TCP as you need to make sure that any messages you get are intact and the data is in the right order.
Robinhood
Robinhood
Thank you for helping me.Now I got another question.The players'' profiles are stored in database,and shall I let clients directly access the database or let my server query the database and then send back to clients?
jfclavette
jfclavette
For the sake of integrity, the server should query.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Megahertz
Megahertz
let your server query the database and then send back to clients

The client should never have any type of access to the DB.

-=[ Megahertz ]=-
-=[Megahertz]=-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.