Are there any possibilities to use DO without RDBMS (SQL server etc) at all? Could we use XML as a back-end storage system?

Thank you in advance.

Original topic by maslukov.

asked Jan 21 '09 at 12:09

Editor's gravatar image


One Answer:

We will not support XML as storage format - here I'll try explain why:

We need to serialize not simply a table data, but indexes - data structures allowing to navigate from object to object and get sequences of them with specific property values quite fast. In fact, such operations must require just 1 file seek in our case. 1 - because we precisely know the offset of data we're looking for. This information is stored in top pages of this index, which are normally 100% cached in RAM. But XML files aren't good from this point: normally you don't reference XML elements in files by their byte offsets, you use identifiers instead. But finding an element with specified identifier in XML file requires t = O(fileSize) instead of t = O(1) for positioning to precisely known offset. So of we'd implement this, performance of such a solution would be simply incomparable.

There are some other reasons to avoid XML, e.g.:

  • XML isn't a compact data format, so we'd read\write much more; moreover, we couldn't use any compression. Dealing with ~ 20-30 times larger files itself means ~ 20-30 slower operation.

  • It's more complex (from the point of CPU time) to generate and parse XML - probably, 3-5 times more complex comparing to binary data.

So XML isn't attractive as storage format at all here.

Now some good news:

  • Nevertheless it's possible to implement XML-based storage for DO ;) But there are no any examples related to this now.

  • Although currently there is no any built-in storage except in-memory, they're upcoming. File system storage (with binary index storage format) must be available ~ in March 2009. Starting from this moment it will be possible to use DO without any RDBMS at all. But you can start the development relying on this almost right now (or after release with LINQ support).

  • We will definitely support XML as import \ export format in future.

P.S. We must update our Wiki on this week, and one of topics we're going to cover is how DO deals with indexes.

answered Jan 21 '09 at 15:44

Alex%20Yakunin's gravatar image

Alex Yakunin

Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
toggle preview

powered by OSQA