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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T10:07:22+00:00 2026-06-10T10:07:22+00:00

While learning Java I have come across a lot of questions regarding how to

  • 0

While learning Java I have come across a lot of questions regarding how to program something ‘the best way’. An example is a chat program.

When a changes their status, display name, display picture or personal message it sends a request to the server and the server keeps all the server data in memory. My question is: Is it good practice to avoid database I/O and keep everything sync’d in memory. So if a user changes their display name should I update the users status in memory on the server AND update it in the database? Or wait till the user disconnects and then write their information to database?

I hope I am clear. This goes for all different kinds of programs, syncing settings ect..

I ask this because if the server crashes then all the data in memory wouldnt be saved in the database and user info would be rolled back.

Thanks guys.

  • 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-10T10:07:23+00:00Added an answer on June 10, 2026 at 10:07 am

    For this question, there is no single “best practice”. at best, there are probably a handful of “best practices” covering a variety of more specific use cases. as already pointed out in the comments on the OP, there are various questions that come up, e.g.:

    • frequency of data modification
    • app speed requirements
    • available memory
    • data size
    • acceptability of stale data
    • acceptability of lost data

    until you start answering these questions, no one can start giving concrete recommendations.

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

Sidebar

Related Questions

I am learning Java and have a rather simple program that returns a series
I've been learning and experimenting with Java Generics for a while but I have
I have just started learning Python & have come across namespaces concept in Python.
I'm learning Java and find myself sending methods around while asking for help but
While learning Rails, I found this example in the Sam Ruby's book: app/controllers/line_items_controller.rb def
While learning an example from learn-you-a-haskell which right triangle that has integers for all
i just got some more questions while learning PHP, does php implement any built
I've slightly modified the iPhone SDK's GLSprite example while learning OpenGL ES and it
I'm a Java Developer wich is learning VB.net for a small project. While coding
While poking around the questions, I recently discovered the assert keyword in Java. At

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.