﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Luc commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>My first question would be exactly the same as Torvin already wrote: In "Path.Combine(basePath, Path.GetFileName(Path.GetTempFileName()));", who is going to delete that empty file created in the TEMP directory by Path.GetTempFileName()? Despite its name, GetTempFileName() doesn't just generate a name, it creates an actual file you are supposed to delete...
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment15</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment15</guid><pubDate>Wed, 17 Nov 2010 12:06:07 GMT</pubDate></item><item><title>Ayende Rahien commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Dmyrii,
  
Not really. We tested it with millions of items, and it just works
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment14</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment14</guid><pubDate>Wed, 03 Nov 2010 08:10:47 GMT</pubDate></item><item><title>Dmytrii Nagirniak commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>If the indexes are kept in memory it will take significant amount of time to rebild them every time.
  
Can you comment on it please?
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment13</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment13</guid><pubDate>Wed, 03 Nov 2010 07:35:49 GMT</pubDate></item><item><title>moshe commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>I spent time going back into Ayende's archives starting from the beginning while he was on jail duty and coding.  It reminded me a little of a science fiction short story I once read about a child who was a gifted composer whom they kept apart from all other people in order that he should not hear any music composed by others and have his creativity tainted (whether through imitation or by consciously trying to avoid imitation).
  
I think Ayende is the type who should try and rewrite everything from scratch. 
  
For example even microsoft re-implemented javascript regex for IE9, as mentioned here: 
  
[blogs.msdn.com/.../...-in-internet-explorer-9.aspx](http://blogs.msdn.com/b/ie/archive/2010/03/18/the-new-javascript-engine-in-internet-explorer-9.aspx?PageIndex=2)  
  
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment12</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment12</guid><pubDate>Mon, 01 Nov 2010 14:12:23 GMT</pubDate></item><item><title>Ayende Rahien commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Jesús,
  
Please note that the codebase there has underwent a lot of changes, I'll have a lot to say about this shortly, but you can look at the current codebase here:
  
[github.com/ayende/ravendb/tree/master/Raven.Munin/](http://github.com/ayende/ravendb/tree/master/Raven.Munin/)</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment11</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment11</guid><pubDate>Sun, 31 Oct 2010 09:26:30 GMT</pubDate></item><item><title>Jes&amp;#250;s L&amp;#243;pez commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Something sounds wrong in this code:
  
  
  
                WriteCommands(cmds, persistentSource.Log);
  
  
                persistentSource.FlushData(); // sync the data to disk before doing anything else
  
                WriteCommands(cmds, persistentSource.Log);
  
                persistentSource.FlushLog(); // flush all the index changes to disk
  
  
  
You are writting commands to log twice. When do you write commands to data?
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment10</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment10</guid><pubDate>Sun, 31 Oct 2010 09:24:22 GMT</pubDate></item><item><title>Peter Morris commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>I don't recall exactly how it works but this link looks as though it explains it quite well.  It might give you some additional ideas...
  
  
[conferences.embarcadero.com/.../32280](http://conferences.embarcadero.com/article/32280#HowDoesVersioningWork)</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment9</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment9</guid><pubDate>Sat, 30 Oct 2010 11:20:02 GMT</pubDate></item><item><title>Ayende Rahien commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Rickrock,
  
Mostly, because I am not trying to target the same feature set.
  
And by not trying to hit the same feature set, I have drastically simplified my problem set.
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment8</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment8</guid><pubDate>Sat, 30 Oct 2010 11:12:14 GMT</pubDate></item><item><title>Ayende Rahien commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Tovin,
  
That is done in the ReplaceAtomically function
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment7</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment7</guid><pubDate>Sat, 30 Oct 2010 11:11:17 GMT</pubDate></item><item><title>Ayende Rahien commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Peter,
  
I am not aware of the Interbase model, but an append only model make MVCC trivial to work with.
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment6</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment6</guid><pubDate>Sat, 30 Oct 2010 11:10:08 GMT</pubDate></item><item><title>Rickrock commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>Dear Ayende,
  
  
what exactly makes you think that you as a (unquestionable exceptionally talented) developer and architect will not into the same troubles that all those huge clumsy databases ran after a while? There is a big codebase not only because all other coders suck.
  
  
Don't get me wrong: Sometimes small projects change the whole way we see things (Ruby is the most prominent example).
  
How about though starting with a more "humble" idea like: "Let's skip some things a see how far we get with it and whether it is usable for some scenarios."
  
  
Simplifying DBs is good, I support that. Conveying or implying the message that they are complicated without any reason is misleading.
  
  
Or is a bit of "Not Invented Here" again?
  
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment5</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment5</guid><pubDate>Fri, 29 Oct 2010 22:55:53 GMT</pubDate></item><item><title>Torvin commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>looks cool!
  
i have a question though
  
  
public Stream CreateTemporaryStream()
  
{
  
      string tempFile = Path.Combine(basePath, Path.GetFileName(Path.GetTempFileName()));
  
      return File.Open(tempFile, FileMode.Create, FileAccess.ReadWrite);
  
}
  
  
who gonna delete that file?
  
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment4</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment4</guid><pubDate>Fri, 29 Oct 2010 20:07:21 GMT</pubDate></item><item><title>Patrick Huizinga commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>cont. (heh heh..)
  
  
CouchDB uses an append-only file to store your changes. At the end of the file, your data, the new leaf and all the new branches will be written.
  
  
'Snapshotting' doesn't require an immutable structure and an immutable structure doesn't require append-only, but with my feeble mind I wouldn't want to implement them any other way.
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment3</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment3</guid><pubDate>Fri, 29 Oct 2010 12:17:26 GMT</pubDate></item><item><title>Patrick Huizinga commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>@Peter Morris
  
  
I don't know anything about Interbase, and just a little bit of CouchDB, but this is how I understand CouchDB works.
  
  
CouchDB uses immutable trees for their tables. When you modify the table, a new tree is created (creating only one new leaf and only the branches from the leaf up to the root). This way you can/could ask CouchDb for the current root and then at your own pace browse through that snapshot, while the rest of the world races by, creating updates by creating new trees.
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment2</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment2</guid><pubDate>Fri, 29 Oct 2010 12:08:44 GMT</pubDate></item><item><title>Peter Morris commented on The building blocks of a database: Transactional &amp; persistent hash table</title><description>I remember years ago reading how Interbase does versioned transactions so that people can read existing data with repeatable read whilst someone else is still in a transaction that has updated the data.
  
  
Is that the approach you meant when you said "an append only model"?
</description><link>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment1</link><guid>http://ayende.com/4677/the-building-blocks-of-a-database-transactional-persistent-hash-table#comment1</guid><pubDate>Fri, 29 Oct 2010 11:35:08 GMT</pubDate></item></channel></rss>