schimanski Well-Known Member Licensed User Longtime User Dec 13, 2016 #1 Related to this, KeyValueStore class - Simple and efficient key/value data store where does B4J save the data in the key_value_temp.dat and is it possible to change the place, where the file is saved? We use more server-entities parallel under linux and it seems, that every server-app needs access to the /temp/key_value_temp.dat. I don't know what happens, if more than one server writes to this file at the same time...
Related to this, KeyValueStore class - Simple and efficient key/value data store where does B4J save the data in the key_value_temp.dat and is it possible to change the place, where the file is saved? We use more server-entities parallel under linux and it seems, that every server-app needs access to the /temp/key_value_temp.dat. I don't know what happens, if more than one server writes to this file at the same time...
Erel B4X founder Staff member Licensed User Longtime User Dec 13, 2016 #2 Why are you using an old version? Use the latest version: https://www.b4x.com/android/forum/threads/b4x-keyvaluestore-2-simple-powerful-local-datastore.63633/ Upvote 0
Why are you using an old version? Use the latest version: https://www.b4x.com/android/forum/threads/b4x-keyvaluestore-2-simple-powerful-local-datastore.63633/
schimanski Well-Known Member Licensed User Longtime User Dec 13, 2016 #3 Thanks, Erel for your answer! In most cases, i use kvs2, but related to this thread: https://www.b4x.com/android/forum/t...ater-has-been-closed.67186/page-2#post-427303 concurrent access doesn't work with kvs2, not even if journal_mode is set to wal. Only kvs1 does it. But now, after your reply, I remembered, that my server uses kvs2 and 1 and now i saw, that the directory of the key_value_temp.dat is inizialize in the kvs-class and could be changed.... I'm an amateur.... Upvote 0
Thanks, Erel for your answer! In most cases, i use kvs2, but related to this thread: https://www.b4x.com/android/forum/t...ater-has-been-closed.67186/page-2#post-427303 concurrent access doesn't work with kvs2, not even if journal_mode is set to wal. Only kvs1 does it. But now, after your reply, I remembered, that my server uses kvs2 and 1 and now i saw, that the directory of the key_value_temp.dat is inizialize in the kvs-class and could be changed.... I'm an amateur....
Erel B4X founder Staff member Licensed User Longtime User Dec 14, 2016 #4 It is simple to make it thread safe. You need to delete the global B4XSerializator object and make it a local variable in any sub that needs it. Upvote 0
It is simple to make it thread safe. You need to delete the global B4XSerializator object and make it a local variable in any sub that needs it.
schimanski Well-Known Member Licensed User Longtime User Dec 14, 2016 #5 You need to delete the global B4XSerializator object and make it a local variable in any sub that needs it. Click to expand... The global declaration of the B4XSerializator is the reason for the inflater-exception in this discussion? https://www.b4x.com/android/forum/t...nterexception-inflater-has-been-closed.67186/ Upvote 0
You need to delete the global B4XSerializator object and make it a local variable in any sub that needs it. Click to expand... The global declaration of the B4XSerializator is the reason for the inflater-exception in this discussion? https://www.b4x.com/android/forum/t...nterexception-inflater-has-been-closed.67186/