﻿<?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>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Highly unlikely
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment21</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment21</guid><pubDate>Mon, 26 Jul 2010 18:56:03 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Demis,
  
The problem is simple, doubly linked list requires you to have mutable data structure.
  
I am trying to do this in an immutable, append only, manner
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment20</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment20</guid><pubDate>Wed, 23 Jun 2010 10:27:59 GMT</pubDate></item><item><title>Demis Bellot commented on Building a managed persistent, transactional, queue</title><description>Very interesting perspective indeed.
  
  
Out of curiosity, why would you go with the dual 'front and back' lists approach over say a double-linked list e.g. C# LinkedList collection datatype?
  
  
I would've thought that a double-linked list is the perfect collection type for adding items to the head and tail of a list in constant time.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment19</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment19</guid><pubDate>Wed, 23 Jun 2010 02:02:44 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>MikeS,
  
Yes, it would
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment18</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment18</guid><pubDate>Fri, 18 Jun 2010 14:47:20 GMT</pubDate></item><item><title>MikeS commented on Building a managed persistent, transactional, queue</title><description>So, reading between the lines, does this mean that RavenDB supports or will soon support highly performant snapshot isolation? That would be very cool - and in line with Couch &amp; Mongo.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment17</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment17</guid><pubDate>Fri, 18 Jun 2010 14:34:34 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>MikeS,
  
Yep, that is pretty much what is going on there.
  
In the code here, we pretty much have this situation. Readers &amp; Writers operate independently from one another.
  
We don't have to worry about a thing.
  
  
The actual name for that is MVCC (multi version concurrency control), append only system that support more than a single thread are naturally MVCC and support this natively
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment16</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment16</guid><pubDate>Fri, 18 Jun 2010 14:04:45 GMT</pubDate></item><item><title>MikeS commented on Building a managed persistent, transactional, queue</title><description>Correction: I should have said snapshot isolation, not serializable isolation.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment15</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment15</guid><pubDate>Fri, 18 Jun 2010 13:36:04 GMT</pubDate></item><item><title>MikeS commented on Building a managed persistent, transactional, queue</title><description>Ayende,
  
  
True, writers block writers but that's a lot better than writers blocking readers as well.
  
  
[en.wikipedia.org/.../InterBase](http://en.wikipedia.org/wiki/InterBase#Multi-generational_architecture)  
[en.wikipedia.org/.../Multiversion_concurrency_c...](http://en.wikipedia.org/wiki/Multiversion_concurrency_control)  
  
It's one of the things that attracted me to Interbase years ago and then Firebird after Borland open-sourced the code. Not requiring locking allows cheap serializable isolation. There has to be some garbage collection for versions that no longer have active transactions.
  
  
Oracle added it in v3 and SQL Server finally got around to it in 2005.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment14</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment14</guid><pubDate>Fri, 18 Jun 2010 13:31:07 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>FWIW,
  
This method means that readers don't block writers and writers don't block readers, but writers blocks writers.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment13</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment13</guid><pubDate>Fri, 18 Jun 2010 12:36:23 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Mike,
  
Any more information about that?
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment12</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment12</guid><pubDate>Fri, 18 Jun 2010 12:35:46 GMT</pubDate></item><item><title>MikeS commented on Building a managed persistent, transactional, queue</title><description>Nice, I like the speed :-)
  
  
I'm curious whether you considered versioning as an alternative solution? I believe Interbase was the first RDBMS systems to introduce it - they call it Multi-Generational Architecture. It allow readers not to block and writers not to block readers. I don't know whether it would apply to the requirements for which you built this solution, but it's an interesting alternative to logs and append-only WRT implementing transactional systems.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment11</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment11</guid><pubDate>Fri, 18 Jun 2010 11:56:22 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Tim,
  
A special value is written if the value is null.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment10</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment10</guid><pubDate>Thu, 17 Jun 2010 14:54:29 GMT</pubDate></item><item><title>Tim commented on Building a managed persistent, transactional, queue</title><description>Thanks for the reply. I've found the answer to writing integers with 7 bit encoding... but still the question remains:
  
  
"Reason I'm asking is that I'm uncertain what a method like WriteBitEncodedNullableInt64(long? value) would write to disk."
  
  
What do you write if the value is null?
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment9</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment9</guid><pubDate>Thu, 17 Jun 2010 14:42:23 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Corey &amp; William,
  
This is useful for the managed storage option for Raven.
  
  
William,
  
I think you meant, RAvenDB is going to have Append Only support
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment8</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment8</guid><pubDate>Thu, 17 Jun 2010 14:37:03 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Corey &amp; William,
  
This is useful for the managed storage option for Raven.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment7</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment7</guid><pubDate>Thu, 17 Jun 2010 14:36:39 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Tim,
  
The binary reader / writer just inherit BinaryWriter and BinaryReader and does 7 bit encoding, that is all.
  
You can look how they do that in Reflector, BinaryWriter.Write7BitEncodedInt
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment6</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment6</guid><pubDate>Thu, 17 Jun 2010 14:36:06 GMT</pubDate></item><item><title>Ayende Rahien commented on Building a managed persistent, transactional, queue</title><description>Rafal,
  
1) no, this is not multi threaded. In general, both transaction log &amp; append only need to ensure consistent flushes, so they serialize writes to the transaction log / append only stream.
  
  
2) It is actually pretty efficient. The perf test produced a file that was 701MB in size, with the raw data being 683 MB of that.
  
We are talking about 3% overhead, which is more than reasonable, I think.
  
  
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment5</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment5</guid><pubDate>Thu, 17 Jun 2010 14:35:12 GMT</pubDate></item><item><title>William commented on Building a managed persistent, transactional, queue</title><description>@Cory
  
  
Not sure myself but maybe RavenDB is going to have a Transaction Log support
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment4</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment4</guid><pubDate>Thu, 17 Jun 2010 14:14:22 GMT</pubDate></item><item><title>Corey commented on Building a managed persistent, transactional, queue</title><description>I always love your posts that explain how to do something but don't give context as to why you are doing it. Where are you going with this?
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment3</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment3</guid><pubDate>Thu, 17 Jun 2010 13:29:08 GMT</pubDate></item><item><title>Tim commented on Building a managed persistent, transactional, queue</title><description>Verry interesting... I've been reading this article a couple of times now but I keep wondering:
  
  
The two binary reader and writer classes you are new'ing up several times in your code: where's the code for the implementation of these (BinaryReaderWith7BitEncoding &amp; BinaryWriterWith7BitEncoding)?
  
  
Reason I'm asking is that I'm uncertain what a method like WriteBitEncodedNullableInt64(long? value) would write to disk.
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment2</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment2</guid><pubDate>Thu, 17 Jun 2010 13:24:36 GMT</pubDate></item><item><title>Rafal commented on Building a managed persistent, transactional, queue</title><description>1. Is it multithreaded? What about two threads writing to the same file at once?
  
2. What about the size of queue file? Won't it be too big?
</description><link>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment1</link><guid>http://ayende.com/4540/building-a-managed-persistent-transactional-queue#comment1</guid><pubDate>Thu, 17 Jun 2010 12:41:22 GMT</pubDate></item></channel></rss>