Implementing ACID
Asked Answered
M

3

9

I am starting research on a project that will need to provide ACID semantics on its database.

Due to the nature of the data it is not suitable for storage in common off-the-shelf systems (relational or key-value).

What are some good resources on how to implement systems which must provide ACID semantics?

My typical Google search returns more information about system which already provide ACID semantics rather than how to go about implementing such systems.

Mcchesney answered 23/1, 2009 at 19:9 Comment(0)
S
6

ARIES is a popular algorithm for implementing an ACID database (e.g. SQL Server uses this algorithm).

  1. Wikipedia on ARIES
  2. The ARIES paper
Septuplicate answered 23/1, 2009 at 19:13 Comment(1)
I will definitely take a look at these resources. This seems like a good starting point. -- ThanksMcchesney
M
1

If you know German, I'd recommend

  • Alfons Kemperer: Datenbanksysteme - Eine Einführung, ISBN 3486576909

"Einführung", which means "introduction", is a gross understatment. The book has several chapters on how you would physically lay out the data, WAL (write ahead logging), serializable vs. non-serializable histories, restart after failures, and much more.

I doubt, though, that you really want to write something like that. Do I need to remind you that in theory you can model any data-structure on top of the relational model?

Maratha answered 23/1, 2009 at 20:55 Comment(2)
Interesting. I certainly would like it if I could read German right about now. Sure it is nice that you can model anything on a relational database, but what if you have a very specific dataset in mind, what if it has a very specific read pattern? The flexibility of a relational database is wasted.Mcchesney
Better to waste the flexibility of a relational database than 6 months of your life...Michelsen
M
1

Have a look at optimistic concurrency. Use an STM (software transactional memory) approach instead of locking. Much faster and easier to implement. You can have 10,000 or 100,000 ACID transactions per second using SERIALIZABLE isolation level. No need to relax isolation property of transactions.

Also, I suggest considering using a partially persistent data structure for the in-memory cache and possibly also for the on-disk data. It allows for readers that are never ever blocked by write operations.

See http://bergdb.com/ for the database I am working on. Feel free to contact me for discussing this interesting topic. / Frans Lundberg

And for my take on the ill-defined ACID properties:

http://blog.franslundberg.com/2013/12/acid-does-not-make-sense.html

Moseley answered 13/12, 2013 at 12:48 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.