Use same FileDB from multiple skills?


#1

Is it safe to use a FileDB with the same JSON file from multiple skills? I need read and write access.


#2

Hi there. Could you tell me more about your use case for this? We only recommend using the FileDB for prototyping (when developing locally with the Jovo Webhook).


#3

I have a webservice that is regularly called from an external source and that receives some data. This data is written into the File DB. My skill reads this data when it’s invoked.

I know FileDB is only meant for prototyping, but it’s easy to use, easy to set up and most importantly, easy to debug, because i can directly look into the JSON file.

I only want to know if a) it uses some kind of file locking, so that it’s possible that two process can write to it without corrupting the file.

And b) when the data is read or written from the actual file. If it’s some kind of in-memory DB that only writes the data back occasionally and serves read accesses from memory, it would be unsuitable for my use case.


#4

Don’t do it :slight_smile:

Every now and then it breaks the JSON file. I understand your points, but I strongly advise against taking this approach. :slight_smile:


#5

Noted :slight_smile:
Thanks.