#1 2014-05-23 13:44:36

AntonE
Member
Registered: 2012-02-03
Posts: 70

BigTable thread-safe and share objects in-memory?

Hi, after a long investigation and experimentation, it seems that all roads lead to mORMot.
I'm starting my first real app with it now and have some questions.

is :
1) BigTable (because it's in-memory) thread-safe? If so, locking, lock-free, wait-free?
2) Can I use it for shared-memory-objects? I.o.w. if threadA request object with ID=123 and threadB also, can the both get the same in-RAM copy and I supply my own locking/concurrency on top of that? I have complex objects with sub-structures (arrays/objects) perfect for JSON/BSON

Thanks
(looking forward to the journey)

Offline

#2 2014-05-23 19:37:28

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 13,270
Website

Re: BigTable thread-safe and share objects in-memory?

1) AFAIR BigTable should not be used in production.
I recommend to use SQlite3 with the fastest run mode (exclusive unlocked), or use our TObjectList-based very fast TSQLStorageInMemory, if speed is what you need.

2) The whole framework is thread-safe, including record level locking or concurrent read. Every thread on the server will have its own copy of the data, via JSON, so will be able to use it safely.
There are several mechanisms available, and properties to tune the multi-threading execution, so that you may supply your own locking design - but I suspect it won't be worth it.
Please search for this keyword in the SAD 1.18 pdf.

Offline

Board footer

Powered by FluxBB