Re: Best Programming language for Network programming (serious server application



On May 24, 10:39 pm, Jon Harrop <j...@xxxxxxxxxxxxxxxxx> wrote:
anup.kalba...@xxxxxxxxx wrote:
Now for my server, I am confused between java and C/C++. I have heard
that writing networking applications is easier in Java

Yes.

and even as a
whole, writing and maintaining code in Java is much easier.

Yes, although other languages are much better than Java.

Which ones? So what should I go for?

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.

Java can be much slower than C++:

http://www.ffconsultancy.com/languages/ray_tracer/results.html

They say that JIT compilation (some
dynamic compilation funda) makes java actually faster than C++.

Java might be faster when lack of GC makes C++ prohibitively difficult to
write.

What does that mean? If we can write C++ then should we go for it?


Is it
true or just a theory?

This depends entirely upon what you're doing.

1. Receive and send response through Sockets. 2. Database Interactions
in each cycle. 3. Some memory calculations (Searching in memory lists
and updating them)


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?

C++ is not worth using anymore. A combination of high-level languages and C
works better.

Which high level languages are you recommending?

I have tried creating a sample server Java app, which will spawn one
thread for each client socket connection.

Again, there are much better languages for asynchronous processing, like F#.

I dont know much about that. What about the performance? And database
interfacing?

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?

No idea. There will be information out there on which techniques to use when
you need massive parallelism. You might try asking in an OS-specific ng.


Parallel threads was my idea of servicing client request separately.
Is there a way to avoid that like asynchronous I/O?

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.

Have you considered C#?

--

Not exactly. Dont know whether that shall be a good substitute or not.
Does that not limit the possibility of writing the app only on
windows?

Dr Jon D Harrop, Flying Frog Consultancy
The F#.NET Journalhttp://www.ffconsultancy.com/products/fsharp_journal/?usenet

Thanks for the response

.



Relevant Pages

  • Re: Basic inheritance question
    ... used 'this' in C++ and Java. ... but in Python it doesn't. ... you meant "in languages that has implicit instance reference available in methods"? ...
    (comp.lang.python)
  • Re: how to wait for socket communications
    ... the JVM when the Java program gets closed, and ending up with memory leaks. ... Unfortunately, in connection with getting advised not to use sockets, my ... in this context as memory allocation technique, not file I/O. ...
    (microsoft.public.win32.programmer.networks)
  • Re: Looking for programming examples in any programming language
    ... in an in-page applet. ... do that for such a broad range of languages. ... But note even Java applets ... If you're going to separate the specific I/O environment from ...
    (comp.programming)
  • Re: POSSIBLE SECURITY PROBLEM in Java 5!
    ... still worked -- but the network activity dropped to zero and it ... Naturally, suspecting a bug, I exited and went to rerun the app, this ... Task Manager showed two Java tasks, ... and killing it should have released the sockets. ...
    (comp.lang.java.programmer)
  • Re: parser
    ... and by no means is Java some obscure language... ... but I still feel that both C and C++ are good languages to use for ... leaving the backend interpreter/JIT as a simpler piece of machinery). ... that you believe that C lacks the ability to build parsers as masses of tiny ...
    (comp.programming)