Advertisement

Linux vs. Windows?

Started by October 02, 2002 07:59 PM
23 comments, last by JakeL 22 years, 3 months ago
Don''t think you can port a server application between operation systems without a lot of difficultlies. If you''re writing a server application, pick an operating system, and stick to it. You''ll be much better off in the long run, because you can then use the features specific to that operating system to maximize performance.

It''s OK to write a portable client, because it''s mostly just operngl calls and stuff (which is portable anyway), but high-performance networking and threading code is generally not portable at all (because different operating systems have very different internal structures, and what works on one will not necessarily work on others)

Besides, you''re really only going to run a couple of instances of the server anyway (depending on how popular your MMOG is) so there''s no need to make it portable anyway.

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

There''s a neat thing called POSIX. Makes it easy to run servers on many different OSs.

kdIXfA.gamedev.10.coreyh@xoxy.net
www.ipeg.com/~rlfc
kdIXfA.gamedev.10.coreyh@xoxy.netwww.ipeg.com/~rlfc
Advertisement
bit64, not to offend you.

Check the Postmortem of Dark Age of Camelot please. They explicit say they''ve used Linux servers.
-----The scheduled downtime is omitted cause of technical problems.
quote:
Original post by Coreyh
There''s a neat thing called POSIX. Makes it easy to run servers on many different OSs.



POSIX is implemented on... what... Unix, and that''s about it. And even then, usually not all that well...

Anyway, that''s exactly my point. If you think of POSIX as a "platform" then you write for that platform. You don''t write it to be portable between platforms (For example, Windows and POSIX).

Oh, and while Windows does have a POSIX subsystem, there''s some serious limitations which make it totally worthless for writing server applications with. Here''s the list from MSDN:

  • POSIX applications only launch other POSIX applications. They can not launch DOS, OS/2, Win16 or Win32 applications.
  • POSIX applications can not call any Win32 APIs. They do not have any access to DDE, OLE, memory mapped files, named pipes, windows sockets and other Win32 features.
  • POSIX applications can not implicitly or explicitly load a Win32 DLL.
  • POSIX applications do not have access to any networking APIs such as pipes or sockets. They are not network aware, but they can access files over the network.
  • POSIX applications do not have any source level debugger support. You cannot use Windbg or the Microsoft Visual C++ debugger to debug POSIX applications on Windows NT
That second-to-last point is the most interesting - you can''t even write networked POSIX applications on Windows...

So yeah, my point still stands

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Well Windows NT''s have a POSIX compatbility layer, and the overwhelming amount of operating systems out there are Unix derivates/clones/compatibles and even Windows to some extent, POSIX is good, it''s a standard more people should conform to.
quote:
Original post by abdulla
Well Windows NT''s have a POSIX compatbility layer, and the overwhelming amount of operating systems out there are Unix derivates/clones/compatibles and even Windows to some extent, POSIX is good, it''s a standard more people should conform to.


I just said that POSIX on Windows is next to useless because it doesn''t even have access to the network layer.

Besides, just because a particular operating system implements the POSIX standard (or parts of it, as is the case most of the time) doesn''t mean that''s the most efficient way to do things on that OS.

And, like I said earlier, since you''ll only ever have one or two instances of an MMOG server, what''s the point of making it portable?

If I had my way, I''d have all of you shot!


codeka.com - Just click it.

Advertisement
This is my own opinion, but I thought Microsoft made their POSIX support suck because they didn''t want you using other servers. Personally that makes me pretty angry. POSIX makes porting insanely easy.

kdIXfA.gamedev.10.coreyh@xoxy.net
www.ipeg.com/~rlfc
kdIXfA.gamedev.10.coreyh@xoxy.netwww.ipeg.com/~rlfc
IIRC Windows NT has the minimum POSIX support to pass some US government purchasing policy, i.e. all machines must support POSIX.

Even a single instance of a MMORPG is likely to have multiple server machines, so Linux could well be a big cost saving.
Dark Age of Camelot uses Linux Servers. However, I would think that a WinNT server would be faster due to it''s IOCP features.
quote:
Original post by Alexandre Brien
I dont know about current mmorpgs but generally a well configured linux server is much more stable than a windows one. So for games like mmorpgs it would be more efficient to run on unix -> less downtime.


That is utter BS. We''ve had server applications running on Windows 2000 Advanced Server machines that have had uptimes approaching 12 - 14 months. The only thing that brings down these machines is scheduled maintenance, bad hardware, or bad drivers. I''ve never seen a poorly written server application bring down a Win2k box - ever unless it has badly written custom drivers which no OS is immune to.

Dean is correct though. Why worry about portability for an MMORPG? Core components of a MMORPG should be written to take advantage of native OS facilities for efficiency and performance reasons. If portability is a concern, look into using patterns like the Wrapper Facade (as defined in the ACE framework) and Bridge (among others.) These patterns allow you to abstract the details of native OS services into common interfaces. After that, it is simply a matter of writing modules that support various platforms.



[email=direwolf@digitalfiends.com]Dire Wolf[/email]
www.digitalfiends.com

This topic is closed to new replies.

Advertisement