Is it possible to access serialized objects at the same time using different processes and how do they behave, if so?

I have data that is best represented by a tree. Serializing the structure makes the most sense, because I don’t want to sort it every time, and this will allow me to make permanent changes to the data.

On the other hand, this tree will be accessible from different processes on different machines, so I worry about the details of reading and writing. The main search queries did not pay much attention to this topic.

  • If two users try to restore a tree and read it at the same time, can they both be served simultaneously, or will one happen first?
  • If two users open the tree (provided that they can), and one does the editing, the other sees that the change is completed? (I assume that they are not because each of them received what constitutes a copy of the source data.)
  • If two users modify an object and close it at the same time, again, does someone come first or try to make both changes at the same time?

I was thinking of creating a queue of changes that will be applied to the tree, and then the tree will execute them in the sending order. I thought I was asking my problems before trying to solve any of them.

0
source share
2 answers

Without trying, I'm sure the answer is:

  • , , , .
  • , . , , . , - .
  • , , , .

, . :

/ . ( .) , , . Unix , Unix .

, Redis, .

+1

klepto, sql ( sqlalchemy ). mysql, postgresql ( sqlite), / - -. klepto , . , klepto , - klepto "copy-on-write", ", concurrency . ( ) 1-2-3 - klepto, . , klepto , , / ( ) , .

: (1) . (2) , - "", . (3) , klepto NFS sql "copy-on-write", "".

klepto.archvives , LRU ( LFU ), , , / , - .

klepto . klepto (, md5) pickler (, json, pickle dill)).

klepto : https://github.com/uqfoundation/klepto

0

All Articles