a java server
Moderator: Moderators
-
monohouse
a java server
since do you use java for real-time applications ?
especially as critical as networking ?
I don't understand the approach, this is not a good idea I think, you should use C for network code as well, make a new tasserver in C, bacause that's really lame. that's the source for all lag.
you don't use the right language for the right purpose.
is there a way to bypass that ? I don't want to do that, can I manually specify command line arguments to spring.exe ?
or does spring.exe has only client code and no server code ?
especially as critical as networking ?
I don't understand the approach, this is not a good idea I think, you should use C for network code as well, make a new tasserver in C, bacause that's really lame. that's the source for all lag.
you don't use the right language for the right purpose.
is there a way to bypass that ? I don't want to do that, can I manually specify command line arguments to spring.exe ?
or does spring.exe has only client code and no server code ?
Java is more secure then C.
Also, lag is not really important for the Lobby server. Stability and security probably are.
Yes, you can manually specify arguments to spring. That works by making a script.txt and then running spring with one argument, the name of the script:(Start a game through Lobby and look at script.txt)
spring.exe is game server and client. Only the lobby master server is Java.
Also, lag is not really important for the Lobby server. Stability and security probably are.
Yes, you can manually specify arguments to spring. That works by making a script.txt and then running spring with one argument, the name of the script:
Code: Select all
spring.exe script.txtspring.exe is game server and client. Only the lobby master server is Java.
I'm not a big fan of Java myself, but Tobi is pretty much right here... The "peformance critical" bits (namely, the actual engine) are already in C++ etc... and Java *is* more secure, at least; it is more secure than C++ for the amount of time that's been devoted to it...
See the way it works is that the server basically atcs as a matchmaker than more or less withdraws fro mthe game completely, and passes the servering on to the actual "game" server.
See the way it works is that the server basically atcs as a matchmaker than more or less withdraws fro mthe game completely, and passes the servering on to the actual "game" server.
- Dr.InfernO
- Posts: 223
- Joined: 18 Nov 2005, 13:55
Yeah you're basically right. But with the proper coding style you can prevent buffer overruns in C++ too. The point is just that in Java, it's impossible to make certain mistakes because Java would throw an exception, while in C/C++ if you're unlucky, the program just continues to run but with undefined behaviour if, for example, you dereference a dangling pointer (pointing to garbage) or accidentally overwrite some unrelated part of your process memory.
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18
Re: a java server
I would personally go with a web based asp.net/oracle/iis thing.
With some hacking we could inject the netcode in postdata!
All you would need is a plug-in to load the Spring engine.
I will write a design document and roadmap for it asap.
Anyway,
monohouse I understand you are confused but we have many skilled coders working within the project.
Please take the time to understand the code before you decide to rewrite half of it.
We are in the process of making design documents and roadmaps maybe you could comment on them?
They are intended for people that are new to the project and like to contribute.
With some hacking we could inject the netcode in postdata!
All you would need is a plug-in to load the Spring engine.
I will write a design document and roadmap for it asap.
Anyway,
monohouse I understand you are confused but we have many skilled coders working within the project.
Please take the time to understand the code before you decide to rewrite half of it.
We are in the process of making design documents and roadmaps maybe you could comment on them?
They are intended for people that are new to the project and like to contribute.
Re: a java server
Do you realise that there are, in a sense, two diffierent servers?monohouse wrote:I don't understand the approach, this is not a good idea I think, you should use C for network code as well, make a new tasserver in C, bacause that's really lame. that's the source for all lag.
The one that is written in java is the lobby server. I'm not sure, but I think that the lobby server would almost ever max out someone's CPU before it maxed out their upload connection. I would guess that it is about as CPU intencive as an IRC server with 100-200 users.
The second server is the game server. That one is written in C++ and is part of spring.exe. This is where all the lag that most people complain about takes place, (when it is a server's fault). Aside from Zaphods suggustion,
-
monohouse
.net ? in that case I'd prefer java alone, on top of that you want to involve IIS and some DB ? this is already 6 times worse (.net counts for 3), I'm with the ASM direction.
but would settle for C, I have already read a big part of the code of the java server, it's not the code what I have a problem with, it's the language, if the code was to run so simply as it was written, I would never have commented on anything in the first place, the java VM system itself is at least 4 or 5 times bigger by all means (cpu and memory and overhead) compared to the written code, and that is only the good case, there are bad ones too.......
look at all the recent server down times, and see what I mean, there is a reason java is used for web browsing, and now you know what it is.
I just don't understand the difficulty of the people that wrote the network system of the spring engine, to write the network system of the simple thing as a simple server for text data transfer, some account informations even without encryption it would be ok, there is hardly any information that requires the attention of an encryption algorithms, I mean, the code of the java server does not look anything like being *THAT* hard to port to C, just copy and paste the C++ code from the spring engine that delivers player messages to eachother and continue from there, it is almost as simple as that.
of corse if there is anything I can do I'd be willing to provide my assistance, im sure I can arrange more assitance, I will check on that subject as well.
but would settle for C, I have already read a big part of the code of the java server, it's not the code what I have a problem with, it's the language, if the code was to run so simply as it was written, I would never have commented on anything in the first place, the java VM system itself is at least 4 or 5 times bigger by all means (cpu and memory and overhead) compared to the written code, and that is only the good case, there are bad ones too.......
look at all the recent server down times, and see what I mean, there is a reason java is used for web browsing, and now you know what it is.
I just don't understand the difficulty of the people that wrote the network system of the spring engine, to write the network system of the simple thing as a simple server for text data transfer, some account informations even without encryption it would be ok, there is hardly any information that requires the attention of an encryption algorithms, I mean, the code of the java server does not look anything like being *THAT* hard to port to C, just copy and paste the C++ code from the spring engine that delivers player messages to eachother and continue from there, it is almost as simple as that.
of corse if there is anything I can do I'd be willing to provide my assistance, im sure I can arrange more assitance, I will check on that subject as well.
ASM was a joke, no one should write a networking server in asm because it is unmaintainable and prone to security errors.
The lobby server is about security and maintainability, so you would always pick a secure language like java or C# to write it in. Performance is not an issue here, it's equivalent to an IRC server with 150 users.
That there are currently some server problems is not because the java server code isn't doing it's job, it's because of other problems.
The lobby server is about security and maintainability, so you would always pick a secure language like java or C# to write it in. Performance is not an issue here, it's equivalent to an IRC server with 150 users.
That there are currently some server problems is not because the java server code isn't doing it's job, it's because of other problems.
- Tim Blokdijk
- Posts: 1242
- Joined: 29 May 2005, 11:18
I don't like java much either due to its slowness, but it has a nice syntax and classes and you can write apps fast withouth worrying about freeing memory and security issues. But the only reason I picked java is because it is easily portable (so far I ran lobby server on windows, linux and freebsd and I didn't have to change a single line of code to make it work) and I guess also because I am familiar with it :)
I don't know how much resources it takes, but according to Fnordia not much (he said something about an hour of CPU time on 500 MHz cpu after running it for 11 days). I never use java for GUI apps but I think it works just fine for console apps. I did use java.nio classes and they claim that they have tested it with 13k clients and it worked fine.
I am no java or c++ expert though, but perhaps you are and can enlighten me on why to use c/c++ rather than java for the server?
And no, it can't be that easily ported to c/c++.
I don't know how much resources it takes, but according to Fnordia not much (he said something about an hour of CPU time on 500 MHz cpu after running it for 11 days). I never use java for GUI apps but I think it works just fine for console apps. I did use java.nio classes and they claim that they have tested it with 13k clients and it worked fine.
I am no java or c++ expert though, but perhaps you are and can enlighten me on why to use c/c++ rather than java for the server?
And no, it can't be that easily ported to c/c++.
-
monohouse
Java as a language isn't actually all that slow - its the overhead of the JVM. There were changes in 1.5 to attempt to reduce it somewhat. Java is well suited to the lobby server, imo.Betalord wrote:I don't like java much either due to its slowness, but it has a nice syntax and classes and you can write apps fast withouth worrying about freeing memory and security issues. But the only reason I picked java is because it is easily portable (so far I ran lobby server on windows, linux and freebsd and I didn't have to change a single line of code to make it work) and I guess also because I am familiar with it :)
I don't know how much resources it takes, but according to Fnordia not much (he said something about an hour of CPU time on 500 MHz cpu after running it for 11 days). I never use java for GUI apps but I think it works just fine for console apps. I did use java.nio classes and they claim that they have tested it with 13k clients and it worked fine.
I am no java or c++ expert though, but perhaps you are and can enlighten me on why to use c/c++ rather than java for the server?
And no, it can't be that easily ported to c/c++.

