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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:24:18+00:00 2026-05-28T15:24:18+00:00

Play Framework looks very interesting but it encourages minimal state on the server side.

  • 0

Play Framework looks very interesting but it encourages minimal state on the server side. My question is how can I synchronize client state with server state easily? What if I want to have server state such as in the development of a chat application, how easy or difficult is it to keep server state and synchronize client and server state?

  • 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-05-28T15:24:19+00:00Added an answer on May 28, 2026 at 3:24 pm

    For standard web applications, state is held in either the cookie, in the database, or in a cache (remembering that cache is unreliable and must be accessible from the DB if the cache does not contain the data you want). Nothing is therefore held in state in server side sessions.

    However, there is a slight nuance here as far as what is defined as stateless for a Play application for a chat type application. If you look at the chat application in the early versions of the Play (before Websocket support), you would have found all ‘Message’ objects which are individual lines in a chat, stored in the database. However, in the most recent version, which includes WebSocket support, you will find that the state of the chat is stored in a Singleton object, which will last for the enter length of the chat.

    The argument from the Play devs is that a Websocket communication, therefore a full chat can be thought of as a single request, over many back and forth communications. Therefore, by keeping the state held in a singleton on the serverside does not break the rules of a stateless architecture. The reason why this is true, is because once a websocket communication is set up, the conversation along the socket will always be between the client and the single server, until the websocket is closed.

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

Sidebar

Related Questions

I have a Play Framework application that sends emails using SMTP server. Now I
I am able to debug scala controller in play framework using netbeans IDE but
Using play framework 1.2.4 with scala. I have few play jobs that looks like
I have a very old linux system and installed java and play framework. When
I'm using Play Framework and I have what I think is a very frequent
I recently started falling in love with the play! framework but now I am
play framework: 1.2.3 Hi, I am trying to purge my database by using play's
Does Play Framework 2.0 have any built-in equivalent to 1.2.x's jsAction ? If not,
In a play framework 1.2.4 Controller, is it possible to get the contents of
I'm following the Play Framework 2.0 tutorial for Java and get this error when

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.