Node-solid-server: Locking files when writing to avoid concurrency issues

Created on 25 Sep 2015  路  4Comments  路  Source: solid/node-solid-server

The idea is to avoid two people writing at the same time

blocker bug

Most helpful comment

Reopening, as the future is now.

All 4 comments

I have done some thinking and I think there is only a way to achieve this and still being working async. In other words, reads are fine to be async as they are, but for writes, the server has to have a global state of what file is being written at the moment which has some sort of queuing (or even simpler nextTick) until the resource is free.

By bringing back sync, a possible attack could be loading a 10 GB file while two people are chatting (hence breaking their conversation)

Not a problem right now, can reconsider in the future.

Reopening, as the future is now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Ryuno-Ki picture Ryuno-Ki  路  5Comments

melvincarvalho picture melvincarvalho  路  6Comments

RubenVerborgh picture RubenVerborgh  路  4Comments

TallTed picture TallTed  路  4Comments

kjetilk picture kjetilk  路  7Comments