Re: Best Programming language for Network programming (serious server application
- From: Gene <gene.ressler@xxxxxxxxx>
- Date: 24 May 2007 19:57:18 -0700
On May 24, 12:41 pm, anup.kalba...@xxxxxxxxx wrote:
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.
Spawning a thread for each client connection is like using a sledge
hammer to pat a baby on the head. Not a good idea.
All the problems of high speed communication with huge numbers of
clients serviced in parallel have been considered and solved by
thousands of people in the development of web servers like Apache and
(even) IIS, which are available for free. As such, you should make
herculean efforts to map your problem onto one of these general
purpose engines.
You mentioned the need for UDP with no explanation for why UDP is
necessary. It's pretty likely that an application that starts out
with UDP facilities will end up with socket streams. Why? U =
UNRELIABLE, and it's very common for a spec that seems satisfied by
UDP to need reliability in the final analysis or else in the first
rev.
Continuous-seeming "real time" update connections can be maintained in
HTTP. See http://video.google.com/videoplay?docid=-3171582187051229467
on XML11.
Once you decide that the services you need can be mapped onto HTTP,
the implementation language is fairly unimportant. You can pick based
on good software engineering reasons like maintainability rather than
performance-dictated ones. Network services in assembly language.
Argh....
Good luck...
.
- 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: Re: Best Programming language for Network programming (serious server application
- Next by Date: Re: Radix 2 sort in one pass
- Previous by thread: Re: Best Programming language for Network programming (serious server application
- Index(es):
Relevant Pages
|
Loading