Oren Eini

CEO of RavenDB

a NoSQL Open Source Document Database

Get in touch with me:

oren@ravendb.net +972 52-548-6969

Posts: 7,582
|
Comments: 51,212
Privacy Policy · Terms
filter by tags archive
time to read 1 min | 116 words

This is, without a single doubt, the best movie rendition that I've ever seen for any book. I'm talking about near 1:1 similarities between them. After being disappointed by the cut scenes in Harry Potter #4, this movie just made my day. I recognized everything, and I couldn't find a missing piece in the story. Everything was there, and the changes that were made were very small and reasonable (a living fly instead of a living one, Lucy falling asleep, Edward betraying the goat-man (sorry, I've no idea how he is spelled in English), etc).

Excellent!

The battle scene is simply wonderful, at the same level or better than any of the LotR scenes.

time to read 1 min | 162 words

Or so I have been told.

So, while I'm installing all the highly essential applications and configure Windows properly (running Windows Update now, which takes a while), I might as well spend some time talking about other stuff. My computer is down since Sunday, but only now I could get the time to do something about it. So, I'm having a wonderful time catching up on my feeds, I've ~400 messages to read, which is a bummer. I managed to keep up with my personal email, but not with the stuff that reached Gmail, so I'll have to look into that later. Oh, and 50 of those posts are Scoble's. Spooky.

Can someone please tell me why I have to reboot in order to install Windows Update?

I'll probably not finish it today, I now downloads the service pack, which would take forever and then a little bit more. That would teach me to install from an original CD.

 

time to read 2 min | 206 words

So, I've been quite in the last couple of days since I work where I don't have internet connection that I can easily use, and my home computer finally decided to kiss the pavement and dropped dead.

I'm pretty sure that the problem is that I used a SATA HD for this, since most of the problems with it started then. Seems to me that my BIOS is a bit freakish about SATA HD as a boot device, and the Windows installer needed a bloody floppy drive before it would recognize it.

I tried to fix it using the recovery console, but I couldn't fix it in five minutes, which mean that I could probably fix it in five hours, but that would take a lot more effort than I need. I'm currently installing Windows on an IDE drive, so hopefully I'll be able to restore most of my stuff quickly. Of the three applications that I use the most, Outlook & RSS Bandit can easily be set to their previous state, and my VS.Net installation isn't customized to any significant degree.

My sole worry is that I would have a hard time porting my SpamBayes settings, but that should be easy enough, considering that it is just flat files.

time to read 2 min | 205 words

Okay, I'm playing around with SqlClr (doing runtime DDL stuff, mainly), and I discovered that SqlClr and anonymous delegates don't play along very well. The issue is that code like this:

CallWithAction(delegate(DateTime dt) { return dt; } );

Is actually translated to something like this:

if(ClassName.<> HiddenFieldName == null) 
            ClassName.<> HiddenFieldName = new SomeDelegate(HiddenMethodName);
CallWithAction(ClassName.<> HiddenFieldName);

And that causes problem with the SqlClr, since the method is trying to store into a static field, which doesn't seem to be allowed on the safe level (which I really don't want to pass.)

It doesn't happen if the anonymous method uses local variables, since then the compiler generate a completely new class. Just a little gotcha that I would've never solved without Reflector.

time to read 1 min | 108 words

Seems like I made a mistake in the previous post. The problem with the Turkish I wasn't supposed to be solved on the Reflection API level, but earlier than that. The issue seem to be the string transformation done on a property name (for instance, if I want NHibernate to use the field and not the name) rahter than what I pass to GetField() and deriatives) where NHibernate didn't took into account that lowering the case of a character may result in a different letter on other locales. The issue was already fixed on NHibernate CVS, and I'm feeling stupid for crying wolf.

time to read 2 min | 367 words

I've just got an email about an interesting problem with NHibernate. After searching for a little while, I came up with the conclution that the problem is in the framework, and I can't see an easy solution for it.

First, let's start by explaining Turkish locale & its unique interpretation of the humble i letter. This MSDN article does it best, so I'll let them do the job:

For nearly all Latin alphabets, including U.S. English, the character i (\u0069) is the lowercase version of the character I (\u0049). This casing rule quickly becomes the default for someone programming in such a culture. However, in Turkish ("tr-TR"), there exists a capital "i with a dot,"  character (\u0130), which is the capital version of i. Similarly, in Turkish, there is a lowercase "i without a dot," or (\u0131), which capitalizes to I. This behavior occurs in the Azeri culture ("az") as well.

How does it has anything to do with NHibernate? Well, consider this code:

typeof(Blog).GetField("id")

This code will fail to return anything if the locale is set to Turkish. And the problem is worse because there doesn't seem to be a way to pass an InvariantCulture or Ordinal to the GetField method. The only solution that I can see now if to get all the fields on the method and iterate over them one by one, making a culture insensitive comparision.

Please tell me that I'm missing something, since this seems to indicate that any Reflection code will likely break if you're using the Turkish locale.

Oh, and that is the behavior for both .Net 1.0 & .Net 2.0

time to read 3 min | 495 words

I just read this post from an ex-googler, talking about how they tried to move from MySQL to another (presumbely Enterprise. Most likely DB2 or Oracle), and failed. I'll gloss over the fact that they implement such a critical system over a database with no trasaction support (and the comments about "it is easy to add on the application level" that made me cringe so hard that for a moment I looked like a fat bagel).

I want to talk about migrating a single application from one database to another. This is not something that you see done often when you're talking about Line of Business application. Especially not in-house one. But, and this is important, it's both possible and straight-forward in most cases if (and only if) you know something about layering and seperated the database from the rest of your application properly.

If my recent ActiveRecord & NHibernate would ever need to support anything beyond SQL Server, here are the list of steps that I would need to do:

  • Create an equivalent schema for the other database (most probably automatically via some tool).
  • Research on how the connection string looks like and put it in the config file.
  • Re-write a single trigger, which is done in T-SQL for efficently.
  • Run the tests against the new database.

Total time that this should take is two days, and I'm including in that the time that it will take me to install the database (even if it's an Oracle) and then learn its SQL deriative.

Now, that is not to say that I might get into places where the application relies on some SQL spesific behavior (identity columns, for instance), or something similar, but those should be isolated incidents. The application itself should move without anything major happening. You know, if I didn't have NHibernate, I would have had to re-write all the queries from scratch, and that might have added a week or so if I had really complex queries (I honestly don't know, NHibernate handles it all). But the application would still not know that anything had happened. The one caveat that may happen is if I needed to port it to something like MySQL 4.0, which doesn't support Transactions, Nested Queries, etc.

This is ABC in application design. The inability to move from one database to the other means that your application relies on way too much on database spesific stuff. There may be reasons for this, but I think that saying something like: "You get what you pay for, and with free you get much more..." is bullshit.

time to read 1 min | 95 words

Okay, the code is in the Subversion repository, but I'm not ready to release it yet. I've a shameful confession to make first:

I never used an IList with NHibernate (or ActiveRecord) before, so I'm not really sure whatever my code makes good sense or not. And, in addition to that, I haven't had the time to test it propertly. I would appriciate it if someone who had used it before could take it for a spin and tell me what they think the bad points are.

FUTURE POSTS

  1. fsync()-ing a directory on Linux (and not Windows) - about one day from now

There are posts all the way to Jun 09, 2025

RECENT SERIES

  1. Webinar (7):
    05 Jun 2025 - Think inside the database
  2. Recording (16):
    29 May 2025 - RavenDB's Upcoming Optimizations Deep Dive
  3. RavenDB News (2):
    02 May 2025 - May 2025
  4. Production Postmortem (52):
    07 Apr 2025 - The race condition in the interlock
  5. RavenDB (13):
    02 Apr 2025 - .NET Aspire integration
View all series

Syndication

Main feed Feed Stats
Comments feed   Comments Feed Stats
}