N
N
Nondv2013-12-15 08:30:38
Java
Nondv, 2013-12-15 08:30:38

Should I write a high-load server in Java?

Task: write a chat (it will NOT work via HTTP).
For starters, the target is 500-1000 people online at the same time (then it can increase greatly).
Itself practically did not face network applications. With servers generally zero.
The choice is small: Java or C++. I am silent about all sorts of pythons (although I would like to write in python3: D).
If you write on the pluses, then there will be a lot of hemorrhoids :(
In general, a subject. If there are alternatives, I will only be glad.

Answer the question

In order to leave comments, you need to log in

6 answer(s)
A
Alexey Kiselev, 2013-12-15
@alexeykiselev

1000 simultaneous connections is not a problem for python either. It is better to understand how many messages and what volume will be sent per unit of time.
If I were you, I would choose Java, at least based on the fact that the protocol can be implemented as a library and used on Android, and not re-implemented.
Secondly, I would choose Java because of the developed ecosystem of this platform and the huge number of open libraries and tools.

I
Ilya Evseev, 2013-12-16
@IlyaEvseev

Java is fine. Compared to C++, save a lot of time.
Try to use asynchrony instead of multithreading.

A
Andrew, 2013-12-15
@kaasius

What protocol? For RTMP, for example, you can find ready-made solutions.

S
sasha, 2013-12-15
@madmages

Node js

Y
Yuri Yarosh, 2013-12-15
@d00mko

There is Akka Netty (Typesafe Stack) Jooq ...
In the case of C ++, the main difficulty is tracking memory leaks and organizing the development process correctly. In general, you will spend more time profiling and fuzzing.
In Java, the main problem is the delay in garbage collection - treated by offheap caching and Stack Allocators.
In general, Java is 20-30% slower due to the extra layer of type safety.
Node.js is fine, but the code maturity, support, and backwards compatibility of solutions are usually terrible.
It is not clear what kind of loads we are talking about.
For 500-1000 people, you can write in python ...
How will you conduct load testing?
In principle, it does not matter what to write on ...
The main thing is the use of epoll() / kqueue() mechanisms.
From personal experience, I can say that processing 10Gb of traffic in Java is not a big problem.
In the case of erlang and node.js - just quiet horror. But again, it depends on the task.

N
Nikolai Turnaviotov, 2013-12-17
@foxmuldercp

The question is what is so tricky in this "chat" that you cannot take a ready-made jabber demon and add a hundred gills of clients to it for all known platforms and exotics, like a toad applet for ordinary mobile phones.
again - it integrates normally with ms ad, ldap

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question