Archive

Archive for August, 2015

Firebird, daft or fab?

August 24, 2015 5 comments

Programmers and their databases have always been a pickle. In many ways it’s like music where everyone has their favorite band and stick to them well beyond expiration date or technical excellence. I will be frank from the start and say that I have very little experience with firebird (or interbase for that matter), but what I have seen so far is quite impressive.

Let the flame-wars begin

Firebird, the tardis of database engines!

Firebird, the tardis of database engines!

The other day I posted a link to firebird on our Delphi Developer forum at Facebook. I didn’t think much of it as it was just a case of “support our native tools” type post. I made the huge mistake of using the word “enterprise” in the title – which spawned an avalanche of criticism. Apparently firebird is (in view of some) not an enterprise storage solution, at least not in the modern sense of the word. Or at least that was the impression I was left with.

Since I have little experience with firebird I was not really in a position to defend or accept what people told me. Many of the “facts” that were aired seemed reasonable – things like clustering and automated replication are indeed features we expect from an enterprise solution these days. Not to mention fallback safety for power-cuts (which I must admit I always leave to a dedicated UPS). That said, there are also other aspects of deploying database technology in large corporations which must be taken into account. It all depends on the need, pricing and demand for scaling i suppose.

But I must also say that I find firebird quite pleasant to work with. I know of at least two companies that use it large scale, both hosted on Amazon and through a dedicated in-house server; processing thousands of requests every hour. With Amazon EC2 you at least dont have to worry about power-cuts, and replication is .. well, we knocked out a dedicated backup system for firebird using Delphi in roughly 2 days. Wrapping the FireDac services in neat specialized classes for our purposes, adding zip compression and ftp all in one go.

IBExperts

Late in the debate the founder of IBExperts, which I guess all of us have heard about at one point or another, entered the debate. His company have specialized on Interbase and Firebird technology and the thread quickly turned from doom-and-gloom to a more optimistic view of firebird and what it could do when setup correctly. And that is the key concept: we expect firebird to act and behave as a small-time embedded database, but it actually has a much wider scope. The official firebird book is actually 3 massive bibles. Could perhaps be a case where people actually need to study a bit harder to use it properly. Just look at the books produced for MSSQL about tuning, indexing and clustering.

Other users likewise came into the debate in with their experiences, from handling terabytes of data to dealing with real-life problems such as (drumroll) clustering and replication. One user had operated a massive firebird database in the worst possible electrical environment for years without so much as a hitch. Power-out’s were almost a daily occurrence, yet firebird kept on going with no big issues. Naturally I cant defend if that is indeed true, but I see no reason why a well known Delphi developer should lie about a product which is essentially free, open and available to all.

Embedding

Embedded databases have become a market in themselves over the past 10 years. My personal favorite has always been Elevate Software’s ElevateDB, the successor to DBISAM which is probably one of the fastest and robust Delphi components ever written. I stuck with Elevate for many years and have only recently, around XE3, held on to renewing my subscription. Not because I dont like it any more, but because my work shifted from purely Win32/64 client-server development to JavaScript/RTL architecture during the development of Smart Mobile Studio.

Another factor is that more and more really good databases are available, database engines which are free. MySQL embedded is really cool – albeit something of a black art to work with directly (on C level). At the same time Embarcadero have brought Interbase back from the dead and are now shipping the embedded version with Delphi itself. And a database which works universally on Windows, OS X, Android and iOS makes a lot of sense. And last but not least there is MSSQL embedded which ships pre-installed on Windows 8 and Windows 10. But for me that is the last possible option.

Added: SQLite was mentioned in a comment, this is indeed true – but my initial text here is about mid-range to high-end databases. Postgres is another system, but I must admit I’m a complete agnostic about that engine. I’ve so far only worked with Oracle, MSSQL, MySQL and for mid-range work: ElevateDB, DBISAM and DBase (way back in the day).

Daft or fab? Not quite sure yet

It’s going to be interesting to get Firebird under my skin in the coming months. It does suffer the problems of all open-source projects in that it’s completely at the mercy of it’s contributors. Some of the tools are a bit rustic, like GBack which is the tool you use to create incremental or full backups. Using this from Delphi does require a bit of manual labour — but hey, it’s a free database engine! Last I checked MySQL didnt get good tools before someone decided to build it. The engine provider’s own tools are typically command-line oriented because the audience is DB administrators, not programmers, which script everything. Firebird is no different — which is a good thing!

I think we live in exciting times. Delphi is getting back on track, we see a growth of Delphi based products – especially client/server stuff which is what Delphi is really good at. At the same time technologies which stem from the Borland/Delphi miljø and sub-culture is getting more attention. There is a lot of cool stuff going on and it’s a great time to be a Delphi, Smart Mobile Studio or Freepascal developer!

Vacation over, let’s get cracking!

August 2, 2015 Leave a comment

My blog has been silent for the past 2 months or so now. Not because I have secluded myself to a cave to ponder the mysteries of Delphi, but because I’ve moved into a cool new flat, been on holiday and spent time with my kids and friends. It’s been hectic, painful (slipped disc), fun, exciting and well worth every second!

Norwegian summers.. some may call it

Norwegian summers.. some may call it “mild winter”

As always is the case during the summer there is Norway Cup, which is an international soccer arrangement held up here. My son’s club was there and as expected they did exceptionally well (we have an ex pro player as coach). Very proud of my boy which scored 4 goals in a total of 5 games 🙂 It’s a great international event with soccer teams traveling from as far away as Korea, Brazil, Spain and the UK.

Norway cup, memory for life!

Norway cup, memory for life!

This year however they managed to put an amusement park right next to the soccer event, which may have been a good idea on the drawing board – but caused havoc for parents with more than one child. Trying to support my son’s games while keeping track of my daughter, who naturally wanted to visit the amusement park, turned out to be a full contact sport in itself. But I managed to make them both happy using every trick in dad’s book (yeah we went to the amusement park after the matches). And what better way to enjoy people scraming than a spot of sushi!

Sushi time!

Sushi time!

Since our landlord doesnt allow cats or dogs as pets, I came up with a novel solution. We are now the proud owners of to chickens. Yes, chickens. I grew up in the countryside with horses, cows and god knows what around me all day long, so a couple of chickens is a must. My daughter seem to enjoy petting them — and hey, free eggs in the morning 🙂

Chicken #1

Chicken #1 “Citrus Nicole Hercules”

Oh and I now live 100 meters from the beach! Which reminds of a cliché programmer’s advert back in the 90’s, where you see a coder sunbathing while coding on his laptop. But at least we dont have to deflate the kid’s bathing toys when we go home, we just walk straight into our own garden and that’s it 🙂

2 minute walk for a nice view

2 minute walk for a nice view of the ocean and bathing!

And of-course, a visit to the sanatan dharma temple outside of Oslo was in order!

Haribol!

Haribol!

Well — it’s been a great summer! But now vacation is over — so back to work, back to Delphi and let’s get cracking!

ThISzz Izz Shpharhtha!

ThISzz Izz Shparhtha!