1

I have one object and a lot of data associated with that object, you can think of it as something like facebook timeline where we have user and user has a lot of posts.

I cannot store data in JSON format since editing a JSON file on each insert would make the application really slow and there is a risk of losing data.

I have to store up to one million objects in a short period of time, which means that I'll have tens of requests per second, which means that I cannot retreive, edit, and store a JSON file quickly enough, not to mention that multiple application servers might request the file at the same time and part of the data would be lost.

I could store each object separately and then use them say object_1, object_2 ... but once again I have a problem because I don't know which ID to use as I have multiple inserts at the same time.

Logging all requests and processing them one by one is not an option as the application would be too slow.

Does anyone have any idea on how to design a database to handle this type of problem?

Hannah Vernon
  • 70,928
  • 22
  • 177
  • 323
Dave
  • 11
  • 1

0 Answers0