Re: Best Programming language for Network programming (serious server application
- From: Matthew Hicks <mdhicks2@xxxxxxxx>
- Date: Thu, 24 May 2007 17:05:07 +0000 (UTC)
First of all, before you start a fight between C++ and Java fans, which one is faster is inconsequential to your application. The reason is that Java is not well suited at all for real-time applications. One reason, the garbage collector. In fact, for truely real-time apps, your best option is C and assembly. Reading your post, I think that you really don't understand what real-time is especially as it concerns your system. Maybe some background reading on the subject would be helpful. Once you do that reading, you will probably come to the conclusion that what you want to develop is a system that maintains soft real-time (bounded response times) performance in the face of at most XXXXX clients (asynchronous tasks) with YYYY resources available. This may mean that you need a real-time operating system (RTOS), if you are pushing the limits of your hardware.
By the way, you can increase the amount of memory that the Java VM will have access to so your heap won't fill so quickly.
---Matthew Hicks
I need to build a real-time network (client-server) application, where
many clients will send data on a continual basis and the server will
process the data, dump into database and send response back to the
client. So the server needs to be a heavily multi-threaded application
with real-time database writes and with a capability of real time
response. I need to know which language and platform are best suited
to write my client and server application? Client will be a GUI
intensive complex application which will receive huge amount of UDP
packets and shall be required to display the same on a real-time
basis.
I m wondering of using java for my client application development as
it shall make my client platform independent as well as provide good
support for GUI development as well as network accessibility. But i m
not too sure abt the performance that java shall be able to provide as
it has to be a real time application.
Now for my server, I am confused between java and C/C++. I have heard
that writing networking applications is easier in Java and even as a
whole, writing and maintaining code in Java is much easier. Also
database interaction is a factor here. But performance-wise i m
extremely worried. Some googling told me that Java is no longer slower
than C++ but i m sceptical. They say that JIT compilation (some
dynamic compilation funda) makes java actually faster than C++. Is it
true or just a theory? I am not a geek and has been using delphi
sockets for so long. But there have been serious issues in delphi
sockets and I want to look for something else. Can anybody please
help. I am willing to go any extra mile to do the coding in C/C++ but
is it worth the effort. Will the performance difference be
significant?
I have tried creating a sample server Java app, which will spawn one
thread for each client socket connection. I tried connecting 5000
client sockets to this blocking server socket and got "Out of Heap
memory" error in Server! This was concerning as my server application
is expected to handle a much higher number of client connections.
Is it a Java's limitation or my ignorance of better java uasabilty? Is
there any other suggestion than sockets?
I know it was a very lengthy posting but any help shall be extremely
helpful as i m badly trying to battle it out in this technological
web. Thanks to anybody who cares to read this post.
.
- Follow-Ups:
- References:
- Best Programming language for Network programming (serious server application
- From: anup . kalbalia
- Best Programming language for Network programming (serious server application
- Prev by Date: Best Programming language for Network programming (serious server application
- Next by Date: Re: Best Programming language for Network programming (serious server application
- Previous by thread: Best Programming language for Network programming (serious server application
- Next by thread: Re: Best Programming language for Network programming (serious server application
- Index(es):
Relevant Pages
|