Ayende @ Rahien

Hi!
My name is Oren Eini
Founder of Hibernating Rhinos LTD and RavenDB.
You can reach me by phone or email:

ayende@ayende.com

+972 52-548-6969

, @ Q c

Posts: 18 | Comments: 87

filter by tags archive

Reviewing LevelDBPart I, What is this all about?

time to read 2 min | 285 words

LevelDB is…

a fast key-value storage library written at Google that provides an ordered mapping from string keys to string values.

That is the project’s own definition. Basically, it is a way for users to store data in an efficient manner. It isn’t a SQL database. It isn’t even a real database in any sense of the word. What it is is a building block for building databases. It handles writing and reading to disk, and it supports atomicity. But anything else is on you (from transaction management to more complex items).

As such, it appears perfect for the kind of things that we need to do. I decided that I wanted to get to know the codebase, especially since at this time, I can’t even get it to compile Sad smile. The fact that this is a C++ codebase, written by people who eat & breath C++ for a living is another reason why. I expect that this would be a good codebase, so I might as well sharpen my C++-foo at the same time that I grok what this is doing.

The first thing to do is to look at the interface that the database provides us with:

image

That is a very small surface area, and as you can imagine, this is something that I highly approve of. It make it much easier to understand and reason about. And there is some pretty complex behavior behind this, which I’ll be exploring soon.

More posts in "Reviewing LevelDB" series:

  1. (26 Apr 2013) Part XVIII–Summary
  2. (15 Apr 2013) Part XVII– Filters? What filters? Oh, those filters…
  3. (12 Apr 2013) Part XV–MemTables gets compacted too
  4. (11 Apr 2013) Part XVI–Recovery ain’t so tough?
  5. (10 Apr 2013) Part XIV– there is the mem table and then there is the immutable memtable
  6. (09 Apr 2013) Part XIII–Smile, and here is your snapshot
  7. (08 Apr 2013) Part XII–Reading an SST
  8. (05 Apr 2013) Part XI–Reading from Sort String Tables via the TableCache
  9. (04 Apr 2013) Part X–table building is all fun and games until…
  10. (03 Apr 2013) Part IX- Compaction is the new black
  11. (02 Apr 2013) Part VIII–What are the levels all about?
  12. (29 Mar 2013) Part VII–The version is where the levels are
  13. (28 Mar 2013) Part VI, the Log is base for Atomicity
  14. (27 Mar 2013) Part V, into the MemTables we go
  15. (26 Mar 2013) Part IV
  16. (22 Mar 2013) Part III, WriteBatch isn’t what you think it is
  17. (21 Mar 2013) Part II, Put some data on the disk, dude
  18. (20 Mar 2013) Part I, What is this all about?

Comments

nick

Violates ISP though haha

Rasmus Schultz

If this works out for you, is there a chance we would have a Linux version of RavenDB?

Ayende Rahien

Rasmus, That is a goal, yes.

Judah Gabriel Himango

Looking forward to this series of posts. My own C++ skills are outdated, so it might be helpful to see you analyze the LevelDb codebase.

Looking at Rob Ashton's posts on LevelDB, it sounds like LevelDB may work as a base for Raven.

If we get a working Linux version of RavenDB, I claim dibs on building the Linux-friendly HTML version of the Studio. ;-)

Edward

@judah

Buy a mac/pc ? :-)

At our company we converted our main app from html to silverlight. Its faster, nicer, more predictable, good updatable, access to system resources, everything works as expected, sexyer, C#, linq, RX, more work pleasere and with iphone app behaviours and perf We will never go back to html with the latest fashions js framework from hell (pardon my french).

Stephen Hardie

Does your meaning of "grok" originate from the book Stranger in a Strange Land?

Judah Gabriel Himango

Edward,

I'm a former leader in the Silverlight community in the US. I wrote articles about Silverlight development, stumped for Silverlight at user groups, and convinced developers we should stay away from native web development.

I'm no longer of that opinion.

As the author of the open source version of Silverlight wrote,

"I felt that Silverlight had a bright future, and that it could turn to fill an important void, not only for web development, but for desktop development in general. And this was largely one of my motivators. I am very sad that Microsoft strategy cut the air supply to Silverlight."

(http://lists.ximian.com/pipermail/moonlight-list/2011-December/001392.html)

Indeed, Silverlight is on life support. Raven Studio is fine for now; Silverlight will work (on Windows) for years to come. But if we're serious about Raven adoption on non-Windows platforms, we will eventually need an alternative, such as a native web version.

Comment preview

Comments have been closed on this topic.

FUTURE POSTS

  1. Buffer allocation strategies: A possible solution - 2 days from now
  2. Buffer allocation strategies: Explaining the solution - 3 days from now
  3. Buffer allocation strategies: Bad usage patterns - 4 days from now
  4. The useless text book algorithms - 5 days from now
  5. Find the bug: The concurrent memory buster - 6 days from now

There are posts all the way to Sep 11, 2015

RECENT SERIES

  1. Find the bug (5):
    20 Apr 2011 - Why do I get a Null Reference Exception?
  2. Production postmortem (10):
    03 Sep 2015 - The industry at large
  3. What is new in RavenDB 3.5 (7):
    12 Aug 2015 - Monitoring support
  4. Career planning (6):
    24 Jul 2015 - The immortal choices aren't
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats