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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:51:10+00:00 2026-05-25T21:51:10+00:00

My app receiving approximately 2000 string messages per second, each message is about 300

  • 0

My app receiving approximately 2000 string messages per second, each message is about 300 characters long.

I need to store all messages in a DB. I’m using SQL Express 2008, and .NET.

I’m thinking of holding all data in memory till it reaches a certain limit (10000 messages = 5 seconds , for example), and then write it down all at once.

This way the data will be written to the hard drive every 5 seconds, instead of every second.

Does my approach is good enough? What approach should I use in order to achieve the following results?

  1. messages are not piling up in memory
  2. Hard drive won’t commit suicide 🙂

Note: there is no need to parse the strings, the only thing is to store them by the order they arrived.

  • 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-25T21:51:11+00:00Added an answer on May 25, 2026 at 9:51 pm

    A quick calculation indicates that you may experience up to 50 GB of data per day. If there is no SQL specific processing to be done on this data then it doesn’t seem feasible to store it in a database.

    The next solution would be files on the disk and since you deal with simple text (not binary) then perhaps a quick compression would also help. However since the files would be so small (300 bytes), compression would not yield any sensible results. The data would need to be grouped in larger files, for instance one piece of data per line and one such file per day. This file would be sufficiently large so that compression would give satisfactory results if the disk space would become an issue.

    If the space is not an issue and/or frequent processing of this data or even simultaneous processing of data from different days is to be expected then one piece of data per file would be a better choice. This solution, in turn, will bring the issue of having a very large number of files inside a folder which will not only bump against file system limitations but also create performance issues when working with these files, and these issues will affect the entire machine performance.

    Storing and accessing a large number of files in a better manner is to use a partitioned folder storage. That is each file would have to have a unique name and will then be placed in a specific folder hierarchy according to its name. This approach has several advantages:

    • keeps the number of files per folder manageable (when this number increases, one only needs to go one folder hierarchy deeper to increase the “storage availability” exponentially)
    • easy to find a file’s location or where to store a file based on the naming convention

    Sample partitioning:

    • file names follow this format: yyyymmddhhss-<counter>.txt (e.g.: 201104252345-1.txt, 201104252345-2.txt, etc)
    • folder structure follows the time parts: \yyyy\mm\dd\ or yyyy\mm\dd\hh\ etc (as many levels as the solution would need to keep the number of files manageable)
    • results in: 201104252345-1.txt being stored as 2011\04\25\201104252345-1.txt, etc
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a 3 layer app. The second layer is receiving and object from
In my iOS app, I need to configure a socket server for receiving data
My app is receiving data from a BlueTooth device 4 times a second, parsing
I have an iPhone app. that is receiving data with IRFC 3339 timestamp format
My app keeps track of the state of about 1000 objects. Those objects are
My iPhone app will be receiving an xml feed from a Java web service.
I'm currently calling a web service from my J2ME app and receiving the xml
My universal iOS app dies upon receiving memory warnings. Actually it just do the
I am using Facebook authorization in our app and am receiving a different authorization
I'd like to build a feature into our web app that involves receiving and

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.