Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7811717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:16:13+00:00 2026-06-02T04:16:13+00:00

I am implementing a distributed chat system, in this system we have the following

  • 0

I am implementing a distributed chat system, in this system we have the following options :

  1. Make the client and server running at each node run as separate threads. The server acting as the receiver will be running as the daemon thread and the client taking the user input as a normal thread.

  2. Fork two processes one for the client and one for the server.

I am not able to reason out with which one to proceed. Any insight would be great !

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:16:16+00:00Added an answer on June 2, 2026 at 4:16 am

    You can do it in a “scalable” way just by creating n workers in threads that receive data and put them into right queues, m workers that push data to clients and k workers that process data from queues.

    n workers getting data
    m workers pushing data
    k workers processing data and tracking state
    incoming message que
    outcoming message que

    this way you can find best (n, m, k) for you. Only problem here is that it will be not trivial to implement it without any bugs. You could potentially reduce amount of worker types to two, incoming message and process + push and use list’s in redis (redis.io) as queues. But still this will require a lot of test coverage 🙂 Good luck

    Actually you could use websockets for this. Something like socket.io http://socket.io/ or faye http://faye.jcoglan.com/

    And just create front for the chat 🙂 This will solve most of your problems in a really scalable and usable way.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the work of implementing a distributed system of nodes (like p2p nodes)
I'm implementing a distributed application, server with rails and mobile clients in objective c
Scenario I've written a distributed application in C# using WCF. It uses Client/Server architecture,
I'm currently working on implementing the Distributed Annotation System-standard for our project openSNP.org, however,
I have this task of designing a new interface for a distributed application (multiple
I'm implementing the circuit breaker design pattern for a large scale distributed system (on
For my bachelors thesis, I am implementing a distributed version of an algorithm for
I am implementing 2-phase commit for a distributed transaction(using 2 Databases). I simulate a
implementing publishActivity in PHP using the REST API using this code: $activity = array(
Implementing a simple Login screen using JSF and Spring and Hibernate. I have written

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.