morrisjdev / FileContextCore

FileContextCore is a "Database"-Provider for Entity Framework Core and adds the ability to store information in files instead of being limited to databases.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Why not for production?

enricopay opened this issue · comments

Just a quick question, as it says in the title.
Thanks

FileContextCore basically just serializes data into files.

It has simple mechanisms to synchronize parallel access to same files but they only work in one instance of the application and you can or should not access the same data from multiple instances.

It also does not have mechanisms to optimize data access like indexing etc. Everything in a single file gets loaded, deserialized and stored in memory to access it. If you change one thing it writes everything back to files. This is especially important when working with lots of data because it causes many write operations.

If you only have a relatively small amount (<100.000 rows) of data and only use one instance of the application this should be totally fine.

That's very interesting. I have this scenario, maybe you can advice me on it.
I have a multi instance application, that manages a small amount of data (<<100.000). The data is very likely written on a single instance at a given time, but it can be read from multiple instances at the same time.
So there is no write concurrency issue, but i'm concerned with the caching mechanism that I assume you implemented. For example, when someone makes a change to a file, how will the other instances know that their cache is not valid anymore?
Thanks

That's exactly the problem. Never. And that's because it is made development purposes and not for production.

Ok that makes sense. Thanks for the explanation!