Ayende @ Rahien

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


+972 52-548-6969

, @ Q c

Posts: 6,335 | Comments: 47,041

filter by tags archive

Kazien Conf Workshops

time to read 1 min | 94 words

Yesterday I gave two workshops, Advanced NHibernate and Building DSL with Boo. I finished the day absolutely crushed, but I think they went very well.

Both were recorded, although I am not sure when they will be online.

Ryan Kelley has a blow by blow description of the NHibernate talk, and you can get the code for that here:


I'll post the code for the DSL talk shortly afterward.

I got some really positive feedback about the NHibernate Profiler, and I am very interested in demoing that and getting additional feedback when the real conference starts.

Microsoft kills Linq to SQL

time to read 2 min | 216 words

In a typical management speak post, the ADO.Net team has killed the Linq to SQL project. I think this is a mistake from Microsoft part. Regardless of how this affects NHibernate (more users to us, yeah!), I think that this is a big mistake

Doing something like this is spitting in the face of everyone who investment time and money in the Linq to SQL framework, only to be left hanging in the wind, with a dead end software and a costly porting process if they ever want to see new features. Linq to SQL is a decent base level OR/M, and I had had several people tell me that they are willing to accept its current deficiencies, knowing that this will be fixed in the next version. Now, there isn't going to be a next version, and that is really bad for Microsoft reputation.

From my point of view, this is going to be an example that I will use whenever someone tries to sell me half baked solutions from Microsoft (just to note, I don't consider Linq to SQL half baked) and tell me to wait for vNext with all the features in the world.

It doesn't matter how I turn this decision, I can't find any way in which it make sense from Microsoft perspective.

Why I hate traveling

time to read 1 min | 158 words

Just arrived at the motel after just over 25 hours on the road. Yuck!

Some random thoughts along the way:

  • The US remain at the top of the list of countries with the most obnoxious entry procedure.
  • If the hotel says its address is on main street, I expect to find the bloody entrance on main street, not hidden in some side street.
  • Driving an SUV is fun from the comfort side of things, but a PITA from the point of view of driving, parking or managing them.
  • I like the ability to lose my way to wallmart, get a GPS, and get to the motel.
  • Drug addicts make for really good guides.
  • One way streets in the US are marked in a really confusing manner to me, and I keep driving against the direction of traffic.
  • I am so tired, and on top of jet lag, I start working tomorrow morning.

Visual Studio 2010

time to read 4 min | 619 words

I got the chance to get an early CTP of Visual Studio 2010. 


This is the post I use to record my first impressions. There is no order to this post, it is just impressions jotted down as I see them.

We seem to have a new start page:


Following the MS & OSS new approach, one of the samples is Dinner Now using Lucene, which is the first project that I found to test.

TFS is still broken:


I really don't like to see this kind of issues in a source control system. It means that it cannot be trusted.


Looks like we have something new here. On first impression, it looks like we have UML integrated into VS.



I took a look at the generated XML, which is the backing store for the diagrams, and it looks like it should work with source control much better than the usual modeling stuff in visual studio.

Another feature that is very welcome for anyone doing presentations is the use of CTRL+Scroll Wheel for zooming.


We are also promised performance improvements for large files, which is nice. Part of the walkthroughs talk about integrating functionality using MEF, which is good.

Looking at the walkthrough for creating syntax highlighting, tagging and intellisense, it looks like a lot of ceremony still, but it seems significantly easier than before.

WPF - It looks like VS is moving to WPF, although this CTP is still midway.

C# has dynamic variables!

dynamic doc = HtmlPage.Document.AsDynamic();

dynamic win = HtmlPage.Window.AsDynamic();

This was talked about in the MVP Summit, a dynamic object is an object that implements IDynamicObject:


Note that we accept an expression parameter (using Linq expressions) and we return a meta object. Show below.


This looks like C# + DLR integration, which is cool. I am looking forward to see what we can do with it.

VS also get some R# like features:


There is also a quick search, apparently, but I am not really impressed. Again, show me something that I don't have.

There is CLR 4.0, so we somehow skipped CLR 3.0. I am glad to know that we have a new runtime version, instead of just patching the 2.0 very slowly.


System.Threading.Tasks is new, and looks to be very interesting. It also seem to have integration with Visual Studio. It is also interesting because we seem to have a lot more control over that than we traditionally had in the ThreadPoll.

Parallel extensions are also in as part of the framework, not that this would be a big surprise to anyone.

In the CTP that I have, there is nothing about Oslo, models or DSL, which I found disappointing. I guess I'll have to wait a bit more to figure out what is going on.

That was a quick review, and I must admit that I haven't dug deep, but the most important IDE feature, from my perspective, is the CTRL+Scroll wheel zooming. The diagrams support is nice, but I am not sure that I like it in my IDE. Threading enhancements are going to be cool, and I am looking forward to seeing what kind of dynamic meta programming we can do with it.

Every DSL ends up being Smalltalk

time to read 1 min | 139 words

I had this though in my head for a while now. I built an IDE for a DSL, and somewhere toward the end of the first revision I understood something very interesting. My IDE wasn't actually using the textual representation of the language. The scripts that the user was editing were actually live instances, and they were fully capable of validating and saving themselves.

The IDE worked with those instances, used them to do its operations, and allowed to edit them on the fly. It was quite challenging to do, I must say, and I kept thinking about the image model of smalltalk, where everything is a live instance.

This brings to mind Greenspan's tenth rule, which state: Any sufficiently complicated C or Fortran program contains an ad hoc, informally-specified, bug-ridden, slow implementation of half of Common Lisp.

Yet another good interview test

time to read 1 min | 140 words

Yes, this is another challenge that I ran into which I consider well suited for an interview.

  • It is short
  • It doesn't require specific knowledge
  • There are a lot of ways of solving that
  • I can give the develop access to Google and the test is still valid

The test itself is very simple:

  • Detect if another instance of the application is running on the network which is registered to the same user
  • It doesn't have to be hack proof, and it doesn't have to be 100% complete. The purpose it to stop casual copying, not serious hackers.
    • A great example of the feature in action is R# detecting that two users are using the same license at the same time.

Oh, and for real world scenarios, use a licensing framework instead of rolling your own.

A messaging problem: Order in the bus

time to read 2 min | 206 words

In NH Prof, I have structured the application around the idea of message passing. I am not yet in the erlang world (which requires a framework that would keep hold of the state), but I am nearer than before.

The back end of the profiler is listening to the event streams generated by NHibernate. We get things like:

  • Session opened on thread #1
  • SQL Executed on thread #1
    • SELECT * FROM Customers
  • Session closed on thread #1

I am taking that and turning it into something that is more easily understandable.

Now, as you can imagine, order is pretty important here.

Currently I am dealing with this by assuming order in the stream, and ensuring that the bus will dispatch messages in order (and that recursive message dispatch is handled in place). This works, but I don't think that I like it much. Especially in light of the previous problem that I outlined.

Another option would be to avoid the order assumption, and use the timestamp in order to reorder the stream. That might be a challenge to solve, though.



  1. Performance as a feature - 7 hours from now
  2. Externalizing the HttpClient internals for fun & profit - about one day from now
  3. Reducing the cost of occasionally needed information - 2 days from now
  4. Why we aren’t publishing benchmarks for RavenDB 4.0 yet - 3 days from now
  5. Deleting highly performant code - 4 days from now

And 3 more posts are pending...

There are posts all the way to Apr 05, 2017


  1. RavenDB Conference videos (12):
    03 Mar 2017 - Replication changes in 3.5
  2. Low level Voron optimizations (5):
    02 Mar 2017 - Primitives & abstraction levels
  3. Implementing low level trie (4):
    26 Jan 2017 - Digging into the C++ impl
  4. Answer (9):
    20 Jan 2017 - What does this code do?
  5. Challenge (48):
    19 Jan 2017 - What does this code do?
View all series


Main feed Feed Stats
Comments feed   Comments Feed Stats