Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 16:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Why not to use Java for Conquer

Discussion on Why not to use Java for Conquer within the CO2 Private Server forum part of the Conquer Online 2 category.

Closed Thread
 
Old   #1
 
Super Aids's Avatar
 
elite*gold: 0
Join Date: Dec 2012
Posts: 1,761
Received Thanks: 950
Why not to use Java for Conquer

Quote:
Originally Posted by KraHen View Post
FOR FUCKS SAKE. I`m not saying I like Java, but talking shit about Java doesn`t make Java look bad, it makes you look like you haven`t done your homework. Java has it`s uses, but you wouldn`t use a screwdriver to nail something, fail, and then blame the screwdriver, would you? Programming languages are just tools. (For instance on Android, Java actually works very well, and if you use it combined with the JNI it can achieve pretty damn good performances. You wouldn`t use C# in this case, because it`s simply utterly moronic to do so.) Then again the Java API is a bit weird (for example, boolean.getBoolean(string toGet) is not parsing a string, that`s what boolean.parseBoolean(string xy) is for, it gets a system property. Can`t they just name it getSystemProperty??)
FYI C# on MONO runs 8x faster than Java on Android.
C++ beats them both though.

So Java for Android is fail as well, it's only popular on it because Google uses it as their main language for Android, but in reality it's still shit.


At last Java cannot do anything that another language can't do better also Java has a minimal set of features and the biggest downside of using Java for Conquer development is that Java does not support unsigned integers, which by the way plays a huge role in Conquer Online.. Of course you can achieve it with nasty work-arounds...

Quote:
Originally Posted by Fаng View Post
I was hoping that nobody would reply to Arco's post so it could be deleted. Arco's intentions aren't to provide the community with good advice, but to do his part in ruining the community for others. Simply ignore him so we can all ignore him.
Well he is totally correct though and the community was ruined way before he started to troll.

Quote:
Originally Posted by Fаng View Post
I understand that your intentions weren't to provide the community with good advice, but I'm going to correct you neither the less for the people who want to understand the topic you brought up (now it's there for good). Facts are facts - and yours are just flat-out wrong.
He were pretty much accurate in his post there. Java is a programming language for idiots.

Quote:
Originally Posted by Fаng View Post
It would be horrifically ignorant to claim that Java is inferior to all other languages. If that was the case, companies wouldn't go out of their way to rewrite the garbage collector to use it for high-end performance applications, they'd simply use another language. For things like server management, it might not be the best option in comparison to other managed languages; however, for work with binary trees and similar data structures, java is absolutely superior to C#. In fact, it's at most 6 times faster if I recall correctly (depending on the machine running it). Java is also great for consumer applications because it can run and be hosted on any operating system that supports JVM (which is what the server I created would be intended for).


+ the post right above that proves C# is better than Java ON ANDROID.

*cough*

Quote:
Originally Posted by Fаng View Post

Anyways, this is not the place to argue about Java vs. C#. I hope this has cleared it up for everyone enough so we can leave the topic alone. Going back to this server, I haven't worked on it - but it does have an asynchronous socket system and an efficient print method for the GUI (taken from my C# project). If I work on it again (on a day I can't access my C# project), I'll definitely work on it. It targets patch 4294, but that can be changed later on. I still have my other C++ Win32 project that I'd like to work on too, so don't expect anything soon. There's a lot I'd like to get done. Cheers.
It's not really much about Java VS C#, but Java VS Conquer. Java is not suitable for this.

Problem now Fang and John?
Since it's now not in the thread, you can't blame it.
Super Aids is offline  
Old 04/14/2013, 09:52   #2
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
You are attempting to bait members and start an argument. I assume that your post is being removed because of that. You are also using posts that have been deleted due to argumentation. It has been well established that Java isn't appropriate for high performance servers, but appropriate in specific circumstances. Continuing on the subject with additional argumentation without let up or recognition of the other side is completely inappropriate. You are not debating by behaving as such, but arguing and encouraging other members to argue against you for your amusement.
Spirited is offline  
Old 04/14/2013, 09:56   #3
 
elite*gold: 0
Join Date: Apr 2013
Posts: 4
Received Thanks: 0
First, let me just say that arguing over which language is better or faster is a very quick and easy way to show how immature and ill-equipped you are to even make such an assessment. As KraHen points out, programming languages are just tools and, as such, why would someone prefer a screwdriver over a hammer? It just depends on what the right tool for the job is; it also very much depends on the person using the tool.
Quote:
Originally Posted by Super Aids View Post
At last Java cannot do anything that another language can't do better also Java has a minimal set of features and the biggest downside of using Java for Conquer development is that Java does not support unsigned integers, which by the way plays a huge role in Conquer Online.. Of course you can achieve it with nasty work-arounds...
If you truly believe that Java has a very minimal API and a similarly small list of features, then you simply aren't familiar enough with the language. One of the main reasons the use of C++ in business environments has and continues to be supplanted by other languages such as C# and Java is ultimately due to these languages' vast API's, their support for newer technologies, and their ability to rapidly produce complex applications; what's more is that most or all of these features are available straight out of the box. Further, C# and Java are proactively used to develop technology, applications, and architectures for the web, whereas one might find it more difficult to do so with C++. Again, it simply boils down to choosing the right tool for the job.

Further, the decision to not include the ability to specify signedness does not impact the language one way or another in this regard; and the "nasty" work-arounds you speak of are ultimately minimal and unobtrusive for anyone who has a decent understanding of bit-wise arithmetic.
Quote:
Originally Posted by Super Aids View Post
Java is a programming language for idiots.
You're speculating, and you have no proof of this one way or the other. It's also important to note that Java is used throughout the world in a number of different devices with a variety of different applications. Perhaps you simply had a bad experience with the language, but that's still no reason to disregard the language in its entirety.

Quote:
Originally Posted by Fang View Post
For things like server management, it might not be the best option in comparison to other managed languages; however, for work with binary trees and similar data structures, java is absolutely superior to C#.
There's no evidence to suggest this either. Both languages offer a number of data structures, as well as the ability to extend them out of pure necessity. As an aside, Java doesn't expose a binary tree in its Collections API, and if it makes use of them, then it's probably just an implementation detail, but not the actual data structure itself.


Quote:
Originally Posted by Super Aids View Post
It's not really much about Java VS C#, but Java VS Conquer. Java is not suitable for this.
Now I'd say this argument has more merit than anything else you've said thus far, and yet it's still very far from the truth. Indeed, C# supports a number of features that Java doesn't, which ultimately makes the development of a server in C# easier and less time-consuming. However, it's been demonstrated on numerous occasions that Java is most certainly suitable and capable of being used to write a very scalable client/server architecture. The fact that it simply takes a little more effort to do the same in Java shouldn't act as a deterrent. Of course, if you'd said something more along the lines of, "It would be more reasonable to write a program that hooks another application's function calls or directly accesses its memory in a language such as C++ or ASM than Java." then I'd be much more inclined to agree with you; but presenting an argument in the way you've done here really only serves to diminish what little reputation it would seem you have.

Nowadays, speed is rarely ever a cause for concern, and is typically an artifact of how the application was programmed. As such, one can always resort to optimization, but only when it's absolutely necessary. I would reckon that, for the moment, the benefits to using one language over another for this particular application are far and few in number. As a word of advice, the only thing that should fuel your desire to use a certain language is whether or not you're already comfortable with that language, or whether you feel like learning a new one. Toward that end, learning and/or trying a new language will only ever result in an increase in knowledge and ultimately a better understanding of the tools you have at your disposal.
Aegolius is offline  
Old 04/14/2013, 10:48   #4
 
_DreadNought_'s Avatar
 
elite*gold: 28
Join Date: Jun 2010
Posts: 2,225
Received Thanks: 868
Quote:
Originally Posted by Fаng View Post
You are attempting to bait members and start an argument. I assume that your post is being removed because of that. You are also using posts that have been deleted due to argumentation. It has been well established that Java isn't appropriate for high performance servers, but appropriate in specific circumstances. Continuing on the subject with additional argumentation without let up or recognition of the other side is completely inappropriate. You are not debating by behaving as such, but arguing and encouraging other members to argue against you for your amusement.
While he's typing far more than perhaps anyone will care to read; he has a valid point.
_DreadNought_ is offline  
Old 04/14/2013, 11:00   #5


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Java just isn't suited to conquer, the endian issue is a big one (heh), either you have to convert every value whenever you send it to the client to use the correct endian, or you need to use a special class to store the data instead of a simple array.

And unsigned values, again its not suited to it, you have to perform bitshifting to do this, a completely unnecessary additional step to use what should be a fundamental structure.

The biggest issue I have is that you are physically limited to the resources granted to the virtual machine which Java runs in. Again its not suited, if more people join than your expecting you'll just run out of memory, its as simple as that. The virtual machine also interprets the code running and then executes the resulting on the processor, its another unnecessary step which hampers performance.

I would go on but this discussion isn't going to go anywhere, the argument is done before its started, Java isn't for conquer, its as simple as that.
Korvacs is offline  
Old 04/14/2013, 11:55   #6
 
elite*gold: 0
Join Date: Apr 2013
Posts: 4
Received Thanks: 0
Quote:
Originally Posted by Korvacs View Post
Java just isn't suited to conquer, the endian issue is a big one (heh), either you have to convert every value whenever you send it to the client to use the correct endian, or you need to use a special class to store the data instead of a simple array.
I see what you did there . Either way, there are already mechanisms in place to handle this conversion for us.

Quote:
Originally Posted by Korvacs View Post
And unsigned values, again its not suited to it, you have to perform bitshifting to do this, a completely unnecessary additional step to use what should be a fundamental structure.
Only masking is required. Other than that, I agree.

Quote:
Originally Posted by Korvacs View Post
The biggest issue I have is that you are physically limited to the resources granted to the virtual machine which Java runs in. Again its not suited, if more people join than your expecting you'll just run out of memory, its as simple as that.
Indeed, the VM is configured to run with a predetermined number of resources allocated to it. However, there's nothing stopping us from increasing that amount; of course, that should only ever be done if absolutely necessary. Further, an efficiently programmed server would surely have a difficult time running out of resources due to a few more people playing on it than usual.

Quote:
Originally Posted by Korvacs View Post
The virtual machine also interprets the code running and then executes the resulting on the processor, its another unnecessary step which hampers performance.
Java is not an interpreted language, it is JIT compiled (there's a big difference). IIRC, C# is compiled to CIL, which must undergo a similar process. In either case, startup times can be a bit slower, but actual execution times rarely suffer any penalties. However, both Java and CIL can be AOT compiled, which makes this a moot point.

Quote:
Originally Posted by Korvacs View Post
I would go on but this discussion isn't going to go anywhere, the argument is done before its started...
It seems that a lot of people are more interested in reinforcing old stereotypes and their own opinions rather than participating in a meaningful and logical debate backed by evidence.
Aegolius is offline  
Old 04/14/2013, 12:26   #7


 
Korvacs's Avatar
 
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
Regardless of Java being JIT the code is still executed in a virtual machine, so there is still an unnecessary step, and while there's nothing stopping you from increase the JVM resource limit before execution, its not possible to do it at run time. There are enough other issues that stop Java being a serious consideration for Conquer.
Korvacs is offline  
Thanks
1 User
Old 04/15/2013, 07:44   #8
 
divi<3's Avatar
 
elite*gold: 0
Join Date: Mar 2013
Posts: 210
Received Thanks: 247
Jacob, we get that java sucks, but making a thread to point it out? really?
divi<3 is offline  
Old 04/15/2013, 15:14   #9
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Java offers nothing that C# does not in regards to developing a server-based applications, therefore it is not the ideal choice, not to mention C# offers a higher level of abstraction than Java does which easily allows larger projects to scale well.

They really need to fix that bug with the Java GC so it just collects itself.

Btw, lots of mistakes on that Wiki4D link, or its just old.
InfamousNoone is offline  
Old 04/15/2013, 16:32   #10
 
elite*gold: 0
Join Date: Jun 2009
Posts: 787
Received Thanks: 314
JIT ran programs are not necessarily doing "unnecessary work" compared to static compiled programs. While it's hard to beat well written C code, a JIT compiled program can do many more optimizations than most static compilers can because they have runtime information that static compilers lack. You can can read up for yourself, but the JVM is fairly sophisticated as far as JIT compilers go.

While Java may not have a huge feature set (closures? anyone?), the API is fairly extensive (assuming we're talking about the standard Java implementation, not android). There's a difference. C# has a large feature set with LINQ, dynamics, generics that are worth anything (Java generics are an embarrassment), etc. Java has some awful design decisions in some of their API classes, but they do have a fairly large API, definitely enough for a Conquer server. They even have some extremely useful things that C# doesn't have (eg: A PriorityQueue class, unless C# has added that since like 4.0).

C# is definitely a better language in terms of design (and usually performance), but Java isn't really awful.
_tao4229_ is offline  
Old 04/17/2013, 17:28   #11
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Quote:
Originally Posted by _tao4229_ View Post
JIT ran programs are not necessarily doing "unnecessary work" compared to static compiled programs. While it's hard to beat well written C code, a JIT compiled program can do many more optimizations than most static compilers can because they have runtime information that static compilers lack. You can can read up for yourself, but the JVM is fairly sophisticated as far as JIT compilers go.

While Java may not have a huge feature set (closures? anyone?), the API is fairly extensive (assuming we're talking about the standard Java implementation, not android). There's a difference. C# has a large feature set with LINQ, dynamics, generics that are worth anything (Java generics are an embarrassment), etc. Java has some awful design decisions in some of their API classes, but they do have a fairly large API, definitely enough for a Conquer server. They even have some extremely useful things that C# doesn't have (eg: A PriorityQueue class, unless C# has added that since like 4.0).

C# is definitely a better language in terms of design (and usually performance), but Java isn't really awful.
C# doesn't have a priority queue, but you could effectively produce the same results with a SortedSet or use power collection's OrderedBag ()
InfamousNoone is offline  
Old 04/17/2013, 19:54   #12
 
elite*gold: 0
Join Date: Mar 2013
Posts: 118
Received Thanks: 95
I don't think there's anything stopping anyone in making a PriorityQueue in the C# language. It seems like people here are comparing frameworks, not languages.
Smaehtin is offline  
Thanks
1 User
Old 04/18/2013, 03:24   #13
 
InfamousNoone's Avatar
 
elite*gold: 20
Join Date: Jan 2008
Posts: 2,012
Received Thanks: 2,885
Well in terms of language features C# blows Java out of the water lol
InfamousNoone is offline  
Thanks
2 Users
Old 04/18/2013, 09:13   #14
 
Arco.'s Avatar
 
elite*gold: 0
Join Date: Feb 2011
Posts: 335
Received Thanks: 170
Obviously Java is the superior language
Arco. is offline  
Thanks
1 User
Old 04/18/2013, 12:43   #15
 
Spirited's Avatar
 
elite*gold: 12
Join Date: Jul 2011
Posts: 8,282
Received Thanks: 4,191
Quote:
Originally Posted by Arco. View Post
Obviously Java is the superior language
Your constant sarcasm really doesn't help this forum in the slightest. You place your sarcasm in the worst topics where members who actually care about the subject matter are going to get confused. Java is not a superior language for the kind of application you just linked to, and nobody is arguing that. Don't even suggest that, sarcasm or not, because it's only going to confuse members.

As for this thread, nothing is coming from this thread but argumentation on why C# is the better language for a server application (which nobody ever questioned in the topic this was originally posted in). This topic was only posted to start an argument, and that's what it did. This thread can seriously be closed or deleted now.
Spirited is offline  
Closed Thread


Similar Threads Similar Threads
[Java] Conquer blowfish cipher implementation
04/26/2011 - CO2 Programming - 5 Replies
Since tomas has been putting so much effort into building his proxy, I'll put up my codes for blowfish cipher so that I can help ttomas and any other java developers out there. The main class that you will need is the BlowFishCryptor. It's a easy to use wrapper that I wrote for the other 2 blowfish classes. The other 2 files are directly translated from openssl library, and i think it is done by some guru from this forum; sparkie knows who that person is; i do not think he will mind me...
New Conquer Server Project [Java]
02/18/2010 - CO2 Private Server - 63 Replies
Here Hybris, Project CoLeader from CoEurope team if you guys remember the old staff ;) Wishing to build a new source code for a Conquer Private Server, but in Java this time and all brand new ^^ Need to find one or two coders that knows Java very well and who can understand UML Diagrams that i'll make. I'll help coding (much) and giving infos. Need an expert in Socket connections ^^ and someone who can use a little Sniffer with some decryption and disassembling knowledge ;) Well a bit of...



All times are GMT +1. The time now is 16:41.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.