B4J Question Messenger Server (like XMPP)

Discussion in 'B4J Questions' started by narek adonts, Mar 19, 2015.

  1. narek adonts

    narek adonts Well-Known Member Licensed User

    Hi,

    I am trying to develop a messenging server with B4J.
    few questions.

    for each connected user I am creating a new class and handle the socket and the Async in this class.
    1. Each class is a separate Thread?

    2. How many simultaneous users can handle with the server socket?

    thank you

    Narek
     
  2. Erel

    Erel Administrator Staff Member Licensed User

  3. narek adonts

    narek adonts Well-Known Member Licensed User

    JServer is using http or tcp ?
    How about the latency and scalability?
     
  4. Erel

    Erel Administrator Staff Member Licensed User

  5. narek adonts

    narek adonts Well-Known Member Licensed User

    I had a look on the sources that you advised.
    I think that.

    1. I dont want to use websockets for the server
    2. Jetty was a bit complicated for me.
    3. I am planning to use AsyncStreams

    Thus, I would like to know for example if I am using each connected socket in a spereate class, will it be multithreaded?

    How do you think, can I achive to create a server with ServerSocket which can handle 100,000 active connections?

    Narek
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    AsyncStreams uses background threads to manage the communication. The events are raised on the main thread. It doesn't matter whether you use a separate class.

    You will not be able to handle this number of connections with ServerSocket.

    A well written server based on jServer will also not be able to support 100,00 active connections. Though it will still support about 100 times more connections than ServerSocket.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice