Storage-Engine/DB that logs all changes and allows selective rollback of specific changes

database-recommendation

Is there a storage-engine or database that naturally support this use-case:

1) Key-Value storage. Small Fixed Length Key, and value within [1KB, 64KB]
2) Access is read-mostly
3) Latency more important than throughput.
4) Use discs for values; not a memory-database, but keys could be kept in RAM.
5) Transactions (that involve several values) are NOT required
6) It should be possible to roll-back to a point-in-time (say, 1 week ago max).
7) All changes are attributed to some specific entity (a user)
8) It should be possible to roll-back changes done by a specific group of users
   within a certain time interval.
9) Rollback happens rarely, so transaction logs should not be kept in RAM.
10) Online backups are possible.
11) I should be directly or indirectly accessible from a JVM.

While I know several engines / DB that generally fit, point 7 and 8 are more problematic.

What would fit this use case best?

[EDIT] This is my first "independent"/private project and I don't have much money to invest for software. Also I'm not sure yet if I will charge for it, or open-source it when it is done, so I would prefer a free storage, or at least one with a free version. Here a clarification of some questions raised in the first answer.

3) I'm sold to SSD already.
4) I said "use disc" simply because the data will not all fit in the RAM I can
   afford. Also I suspect I will have a lot of "cold" data, that gets created once
   and never accessed again, so it would seem a waste to keep it all in RAM, as
   would be the case with VoltDB, for example.
7) Adding explicitly the UserID is not problem in most database. I just thought that
   some storage system might have some kind of "special" ID that makes rollback
   easier.
8) This is where the real problem is. Writing a traditional "undo/rollback" by hand
   is time-consuming and error-prone. I know I can do all the rest with most DB.
   What I'm looking for is one that implements the undo/rollback for me, given some
   transaction ID or similar. And most importantly, without undoing other
   independent transactions that happened before or after.
9) I think redis does that; not sure.
10) I was (implicitly) thinking about a free one, where it's not always a given.

Best Answer

Here's the problem that I'm struggling with, and that I think you will find when attempting to find this type of system. (Particularly when it goes to requirements 7 & 8.)

Let's say that you have User A who changes a value from 1 to 2. Then User B changes it from 2 to 26. If you attempt to rollback User A's value, what do you roll it back to? Do you change it back to 1 or do you leave it at 26? Do you do some strange business logic and make it 25?

There are several possible scenarios, but ultimately, there is no generic way of handling this type of data. If you don't roll back, then you fail to satisfy Rule 8. If you do roll back, then you fail to satisfy Rule 7 (allowing ONLY changes from a certain user to roll back). If you do some crazy math rules, then each rule will have to be very specific to the column that modify.

I don't think that there are any databases that can handle this on a general basis. It is possible to roll back on a point-in-time basis, but that completely breaks Rule 7 (allowing you to roll back changes from a certain group).

Outside of a custom-written, specific use application, I don't see how it's possible to implement 7 & 8 on a generic database system.