WebFaction
Community site: login faq

Hi guys,
I'm writing the server for a Javascript app that has a syncing feature. Files and directories being created and modified by the client need to be synced to the server (the same changes made on the client need to be made on the server, including deletes).

Since every file is on the server, I'm debating the need for a database entry corresponding to each file. The following information needs to be kept on each file/directory for every user:

  1. Whether it was deleted or not (since deletes need to be synced to other clients)
  2. The timestamp of when every file was last modified (so I know whether the file needs updating by the client or not).
I could keep both of those pieces of information in files (e.g. .deleted file and .modified file in every user's directory containing file paths + timestamps in the latter) or in the database.

However, I also have to fit under my 80mb memory constraint. Between file storage and database storage, which would be more memory-efficient for this purpose?

asked 30 May '11, 14:08

jordonwii's gravatar image

jordonwii
125
accept rate: 0%

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×888
×331
×82

question asked: 30 May '11, 14:08

question was seen: 2,422 times

last updated: 30 May '11, 14:08

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM