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 7940595
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T23:26:11+00:00 2026-06-03T23:26:11+00:00

In the Websocket chat sample provided with the play framework, it seems to me

  • 0

In the Websocket chat sample provided with the play framework, it seems to me that only one actor is ever created/used; Also it uses “receive” which if I understood well, force the 1:1 mapping between an actor and a thread, effectively making this chat server mono-threaded ?

Check the code here: https://github.com/playframework/Play20/blob/master/samples/scala/websocket-chat/app/models/ChatRoom.scala

If this analysis correct? If yes, do you have pointers on how this server could be made highly scalable?

  • 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-03T23:26:12+00:00Added an answer on June 3, 2026 at 11:26 pm

    There are some details at http://www.playframework.org/documentation/2.0.1/AkkaCore on the default dispatcher configuration for websockets which are used in that example.

    Each WebSocket connection state is managed by an Agent actor. A new actor is created for each WebSocket, and is killed when the socket is closed.

    That web page also shows the default configuration:

    websockets-dispatcher = {
      fork-join-executor {
        parallelism-factor = 1.0
        parallelism-max = 24
      }
    }
    

    By default all dispatchers will run their set of actors on a thread pool. So for each client creating a websocket, an actor will be created. How many threads are allocated depends on which executor service is used. It seems the fork-join-executor will create threads on demand up to parallelism-max.

    On top of that there are also actors to process actions and promises.

    There seem to be many knobs in akka to fine tune performance. See http://doc.akka.io/docs/akka/2.0.1/general/configuration.html. Making a server “highly scalable” will probably involve lots of benchmarking and some hardware.

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

Sidebar

Related Questions

I used to have a small chat app(which was almost working), that uses PHP,
I have a little WebSocket chat demo that I am working on ( based
I'm looking for a websocket/node.js chat implementation which supports multiple rooms. I'm also going
I have a WebSocket connection set up for a basic web chat server. Now,
I am trying the Apache Tomcat Websocket Implementation . The Problem is, that the
I am developing a Cocoa application which involves a chat element. One approach I've
The new iOS websocket library, SocketRocket , looks really awesome, and the chat example
I have created a simple appmod that sends back the same message as it
Using Socket.IO's WebSocket I have successfully managed a chat application from my home computer
How to implement a real fast web chat with PHP? Has anybody ever wonder

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.