Happy 2nd Year Anniversary

4 minute read

Published:

It was 2 years ago when the first version release of RepoDB was placed at Nuget.org.

Story

I started writing the first code last March 15, 2018. The first official class that has been written is BaseRepository. I developed the initial compiler via IL and found it extremely fast. By that time, I was obsessed with beating Dapper ORM when it comes to performance. I first wrote the following methods (ExecuteQuery, ExecuteNonQuery, ExecuteScalar and ExecuteReader). Then, I added some basic methods like (Insert, Delete, Update and Query). The implementation is very shallow and NOT-tested.

The IL code can be found here, but it is not being used by the library now. We are now using the Linq-Based compiler (can be found here).

The next day, I came to the office early and checked in the RepoDB code snippets in our internal repository. A few minutes after, I broadcasted an email to all the developers of Orsted A/S at Kuala Lumpur, Malaysia without knowing the effect of it.

I received much criticism from various architects the same day (i.e.: re-inventing the wheel, too ambitious, etc).

However, I got good feedback from my direct Team Lead.

Motivations

As a leading developer of the team by that time, we needed to deliver a solution that will calculate the power production in a real-time manner. I initially developed the solution by reusing the repository-based implementation of our existing project (using the Dapper ORM). I found it hard to develop a very dynamic repository like what BaseRepository and DbRepository can do now. I also encountered a lot of problems when using the Dynamics and ExpandoObject. I gave up when I needed to read data from a View with a different ColumnName as the primary key.

TBH, I am also very good at ADO.NET by mastering it since the start of my career 13 years ago (from today). I also have experience building CRM solutions that have a feature called Selection-Wizard which allows the user to pre-select the columns they would like to query from the complex relationships of the CRM, and provide reports on top of it. I know that I am capable of creating an ORM and with great motivation for new things to play with.

Reddit

I first posted RepoDB on Reddit 2 years ago. The first post was titled RepoDB - a very fast lightweight ORM and has the perfect spices of Micro-ORM. Faster than Dapper! Rooting for the experts about this., and the post can be found here.

A lot of people joined the discussion and the thread topped the r/csharp in just a few minutes. I saw a lot of up/down votes and some frustrations from the community. Honestly, I do not know how to diligently answer the questions from the community, could be the reason for the frustrations.

I remember one comment that brought me to RawDataAccessBencher ORM bencher of FransBouma. He wanted me to test the library there. The result was that RepoDB was the second slowest ORM and I was totally shocked, actually. I know that the IL I developed is very fast, but by that time, it was only very fast for extracting millions of rows (in a single iteration) (maybe the fastest), but is very slow if you bench it with its execution mean-deviation (includes multiple iterations by batch).

I analyzed the culprits in the code snippets and also tried to optimize the IL. I solved the problem and brought RepoDB as the fastest ORM a month after. The official technique was posted by me on my old blog (can be found here).

It was also 2 years ago (4 months after pushing the first version) that RepoDB was officially accepted by FransBouma to be a part of the RawDataAccessBencher ORM bencher. That is amazing and gave me more spirit to further develop the lib