B4J Question TCP server on linux

MarcelloCSI

Active Member
Licensed User
Hello there,

I'm planning to migrate my company's tcp server from windows to linux machine.
The software that run in windows has been coded in vb.net with Visual Studio 2010. It has little lack of performance due to unknown problems.

This service has to work multithread with many tcp client connections (a teamviewer look-like application).

Can B4J software reach same or better performance on linux server then the VB.Net version?
Can i run a B4J console application in a CentOS non-ui environment?

Give me your opinions and experiences,
Thanks
 

wl

Well-Known Member
Licensed User
As far as I know, a TCP server in B4J is not multithreaded (unlike the HTTP servers in B4J - which use Jetty): it will allow multiple connections at the same time, but if any of the connections takes up the main threading time, the other connections will suffer (be blocked).

B4J console applications run just fine in a Linux non-ui environment.
 

Erel

Administrator
Staff member
Licensed User
As far as I know, a TCP server in B4J is not multithreaded (unlike the HTTP servers in B4J - which use Jetty): it will allow multiple connections at the same time, but if any of the connections takes up the main threading time, the other connections will suffer (be blocked).
Not true. You should use AsyncStreams and then each connection will be managed by a different thread.

You will get the best performance with jServer. However this means that the clients need to switch to Http instead of raw sockets.

Example of TCP server supporting multiple clients: https://www.b4x.com/android/forum/threads/mjpeg-cctv-server.73792/#content

And: https://www.b4x.com/android/forum/threads/74320/#content
 

MarcelloCSI

Active Member
Licensed User
Not true. You should use AsyncStreams and then each connection will be managed by a different thread.

You will get the best performance with jServer. However this means that the clients need to switch to Http instead of raw sockets.

Example of TCP server supporting multiple clients: https://www.b4x.com/android/forum/threads/mjpeg-cctv-server.73792/#content

And: https://www.b4x.com/android/forum/threads/74320/#content
Hello,
Unluckily i can't change the code of the clients, they're ARM based and i can't touch the code. So, i will try with stock tcp socket
 
Top