Archived

This topic is now archived and is closed to further replies.

Neff

(begin series of questions/opinionated answers relating to client/server mpog theory)

Recommended Posts

I have many questions, but will ask one at a time so they can all get answered: For a MMOG, which would be better to use: dos-based server, or win32 based server? I don''t care about interacting with the server on server side as much. I care about speed, and ease of handling data flow. May this receive many helpful answers. return Neff;

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
okay, personally the game engine i am working on at the moment has the server running on linux which is think is a fairly good o/s for server type stuff, and also i am using mysql to store client information so its all
in a nice little bundle (yeah i know you can get windows mysql etc etc if you want to go down that path)

Although in answer to your actual question, a true dos server i wouldnt recommend because you''ll need to do quite a lot of messing around to get networking going which probably isnt worth the hassle, but more likely youre talking about a windows command line program anyway. the approach i would go for is to have a command line server rnuning with very simple output, but allow functionality into your server to have one of your client types as an admin console. I wouldnt build a gui directly into the server because i cant see any reason for it, especially if you have the framework in place to effectively allow the gui to connect from another computer. as for the data handling side of things i dont think it really matters which you choose to go with, the main server loops will basically be the same no matter what you choose to go with.

hope this helps out a little
j

Share this post


Link to post
Share on other sites
Since a first major attempt at this kind of thing, I will be using what knowledge I have with WinSock (I really, really should have mentioned that). I guess I was hoping to figure out which method of going through connections to use, i.e. checking them for incoming data. I am still not sure at this point how the non-blocking version of sockets work, so a nice little list of the types would be very helpful, I think. Thanks for your time and information!

return Neff;

Share this post


Link to post
Share on other sites
non blocking is basically allows you to send/recieve without waiting. the way that non-blocking works isnt by calling something like SetNonBlocking. The reason why it doesnt block, is because you check to if data even exists on a socket before you try to get it. And you do that with the select() function. The select() function is the KEY to non-blocking servers.

--Fireking

Owner/Leader
Genetics 3rd Dimension Development

Share this post


Link to post
Share on other sites
I think you''re a bit mixed up, Fireking. The select() method is to ensure that you don''t block, which is not the same as having the sockets set to non-blocking, which is perfectly possible and just requires a different approach. Usually you use select with blocking sockets, and select itself is a blocking call - just one that you can easily set a timeout of zero for.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]

Share this post


Link to post
Share on other sites
If by DOS you mean like the OS used before Windows came out, then don''t use DOS.

If you mean a console program that would pop up in a ''DOS'' window and give you a command prompt then that would work fine as long as you don''t need a GUI on your server. You can always create a server management client with a GUI to run on a separate machine as was suggested above. Run your server on Windows NT, Windows 2K or Windows XP. Or go to Linux but if you don''t know Linux that could be a long hard learning experience.

You will want to use non-blocking network code for your server. I think it would be a bad bad thing for the server to be waiting on any of the clients.

Share this post


Link to post
Share on other sites
IMHO you should use NT for the server platform, and write the server with IOCP. No other connection method comes close...
Jesse...

Share this post


Link to post
Share on other sites
quote:
Original post by Kylotan
I think you''re a bit mixed up, Fireking. The select() method is to ensure that you don''t block, which is not the same as having the sockets set to non-blocking, which is perfectly possible and just requires a different approach. Usually you use select with blocking sockets, and select itself is a blocking call - just one that you can easily set a timeout of zero for.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost | Asking Questions | Organising code files | My stuff ]



you just confused me by contradicting your self twice in your post...

you use select when you want to get the state of a socket, nuff said. you use select with non-blocking. non-blocking means it doesnt block.


--Fireking

Owner/Leader
Genetics 3rd Dimension Development

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You can use select with blocking or non-blocking sockets, but it makes more sense to use it with blocking sockets as it''s not as necessary to check the state of a non-blocking socket (because it won''t block when you try to read/write it anyway).
Kylotan didn''t contradict himself at all, you just don''t understand sockets as well as Kylotan does fireking.

Share this post


Link to post
Share on other sites