Firebird Community Interview part 2 with Daniel Albushat
So let’s get going:
Tell me a little about yourself
My name’s Daniel Albuschat, I’m fascinated by computer technology and especially programming languages. I have my own unconventional ideas about how computing *should* look like and try to gradually build tools to realize this vision. Because of my daytime job and many hobbys apart from programming, I often only have time during my work-hours to work on those, hence it is constrained by what is vital and beneficial to the company I’m working at. My hobbies include computer games (we’re all still kids inside, right? :-D), Anime (japanese animation series and movies), learning Japanese and spending much time with my friends.
Where do you live/What you do?
I’m living in a small village near Cologne, Germany. I’m working at Treesoft (see http://www.treesoft.de), a small business with currently 24 employees. Treesoft develops, sells and supports CAD, CRM and ERP applications programmed in Delphi, C++ and Qt. Of course, the database of all three products is Firebird!
What school did you attend?
In Germany, we have a several school systems, depending on skill. Pupils with, let’s call it less ambitious learning behavior visit “Hauptschule”, while “Realschule” represents the average and smart people visit “Gymnasium” (no, it has nothing to do with sports). I attended Gymnasium until the 9th grade, dropped off and finished school on Realschule. After that I began my training at Treesoft and became Lead Software Engineer shortly after. I did not go to Uni although I’m very eager to learn new stuff, but since it is very easy to teach yourself everything you need to know about computers,
programming languages and technology using books and the internet, I decided to put my priority on earning money instead of education.
How do you use Firebird and how much?
Firebird was the first database I got in touch with and I am still convinced that it is the best choice for most purposes. When I started at Treesoft we were developing the ERP solution which was based on Firebird. Treesoft CRM, which I have initially been the main and only author for, evolved from that application and of course used Firebird as it’s database, too. I have roughly written 20.000 lines of SQL scripts during that time, not including the embedded SQL in the application. Virtually no day passes that I am not maintaining or programming for Firebird.
What do you like about Firebird/What you don’t and want to be improved?
There are quite a few things that I like about Firebird:
- The simple and lightweight deployment (no dependencies, small size, no hassles, Firebird never re-invented the wheel like Oracle or MS SQL)
- Speed and scalability (we are using Firebird for multi-GB and tiny hardly-a-MB-databases)
- Stability (we hardly ever have a corrupted database and never lost a single byte in the whole 5 years I’ve been working at Treesoft)
- SQL standards compliance
- Feature-set (Stored Procedures, Foreign Keys, Triggers, Events, Monitoring, Windows Authentication, Unicode, selectable Insert and Update)
- Support, e.g. on the mailing lists
- Compatibility to Interbase
But there are things that are a real hassle or I’d like to see being improved:
- (Real) Unicode support came faaar too late. When I had been in charge of selecting the database when Treesoft started developing the ERP software, my choice would’ve been against Firebird because it did not have Unicode support at that time. We’re still on a iso8859-1 database and it will take weeks to switch it to Unicode.
- While Events are a fine thing, the possibilities are too limited. Events should take parameters! Otherwise it’s nearly impossible to create an automatically updating view of a table in your application or propagate more complex events.
- It’s very strange that database backup and restore performance varies greatly between using the services API and using plain gbak (without the
- SERVICE switch). The services API has a bug that prevents it to work on database with spaces in the path, so we are forced to use the slower gbak call. Maybe this is fixed in Firebird 2.x already, we’re unfortunately still stuck on 1.5.
- Many API wrappers and database access libraries need to parse and/or understand SQL statements to offer some enhanced features. In my opinion, the parser that Firebird uses internally should be exposed in the client API to keep those wrappers and libraries future-proof (e.g. they still work when the SQL syntax changes in a future version). This would easily enable good and reliable auto-completion in SQL-editors, too.
- As for Firebird 1.5, the client library was not thread safe. This is extremely inconvenient, especially in GUI applications. The client/server-model enables your application to do complex operations without utilizing the local computer’s resources. When the resources are free, why on earth should the application stand still and *wait* for the server to finish? IMHO this is contrary to the very principals of client/server architectures. And because the Firebird API is not asynchronous, the only way to accomplish this is using threads. That the API even prevents this “workaround” is quite sad.
What do you like about Qt and what you don’t?
Qt is plain awesome. It is the slickest toolkit that I have ever seen. It’s performance is outstanding, the API is very well documented,
consistent and easy to use. The technology is state-of-the-art and does rarely use non-optimal approaches for certain problems. Two
examples are the model-view-framework and Qt Concurrency, which implements the Map/Reduce paradigm. Now that it is LGPL I really hope
it becomes the de-facto standard for GUI in C++ and maybe even Java and Python.
I’ve been working productively with Qt for a few months now and must say that it is so easy and intuitive to create very modern, clean user
interfaces and applications using it that I don’t want to miss it anymore. Even our trainees had a very easy time getting familiar with it, although one of them didn’t even know C++ at the time he started working at Treesoft.
The single bad thing about Qt is MOC and the hacked, string-based signal/slot mechanism. That’s really awful, especially since it’s such a central and frequently used feature. In Qt, you connect signals to slots via the method’s name. Qt adds real runtime meta object information and uses this to find slots that are connected to signals.
Furthermore, it uses dynamic dispatching of arguments to call those slots. The dynamic dispatching is not the most efficient way to do things, but it’s still fast enough for mostly everything I’ve done so far. What’s bad about Qt’s signal/slots is that it is not compile-time safe. The compiler does not spot incorrectly connected signals, which is very inconvenient and can become a real problem.
Great features such as easy integration of WebKit, platform independent GUI that respects custom styles on UNIX platforms, extremely fast graphics (maybe the fastest common-use graphics and GUI toolkit you’ll ever find), built-in database-access to every important database (including Interbase and Firebird, of course!) and many classes and tools that help you code platform-independently make more than up for this single “mistake”.
How do you like to be the Firebird C/C++ api
I must admit hat I never used the raw API myself. I had to debug libraries using it, though, and am therefore a bit familiar with it. I use IBPP (http://www.ibpp.org) for everything I need to do with Firebird. And because the Firebird API is so awkward to program, I’ve created a cleaner, more straight forward C-API that should be used when creating bindings to Firebird for other programming languages.
I’m sure this saves you many hours of debugging and reading documentation. fbsql is based on IBPP, too, by the way. I’m a big fan of not reinventing the wheel but use what already exists and is tested and stable. You can find fbsql, the clean client-library for Firebird and Interbase, on Google Code: http://code.google.com/p/fbsql/ Also see my blog-post about it:
It’s not 100% finished, but it’s functional and should be very stable. I’ve created a proof-of-concept Lisp binding using fbsql. I’m not a real Lisp programmer, I’m just playing around with it and like the basic structures and the idea of the language. Because there was no way at all to access Firebird using Lisp, I thought it was a good idea to extend the potential audience of Firebird-users. 😉
What do you like from C++ and list your must-read books and articles you keep around and recommend, I spotted that you like the Bjarne’s introductionhttp://www.research.att.com/~bs/programming.html
I have a small library of C++ books that are all very good. Among my favorites is “Modern C++ Programming” by Andrei Alexandrescu and the “Effective”-Series by Scott Meyers. “The C++ Programming Language” is definitely a must-have for everyone coding in C++. I haven’t ordered Bjarne’s new introductory book, yet (those programming books are always very pricy :(). It’s not like I need a new introductory book on C++, but I’d like to read it to know whether I can recommend it to
beginners or not. I’m quite frequently in touch with people trying to learn programming and am always asked for good tutorials or books to get started. Until now I recommended “Accelerated C++” by Andrew Koenig and Barbara E. Moo. Maybe my new recommendation will be Bjarne’s “Programming: Principles and Practice Using C++”.
Regarding online tutorials, that’s quite a saddening topic. There are many tutorials out there, but most are outdated, not standards-compliant
and/or teach bad coding style. That’s why I have launched a community effort to write a new C++ tutorial that will be *awesome*. The team consists of Germans and the tutorial’s first version will be German, too. I decided to do this because I wanted to recruit as many helpers from my friends as possible and writing in your native language is much easier for most people. We finished our planning state and have a rough table of contents. The tutorial’s main goal is to be very attractive to potential readers and to be as much fun and practical as possible. For example, we will not do Hello World in a console. Instead, we will start with graphical programming from the start. Something graphical is so much more appealing than a console application! The problem here is, of course, that graphical
programming always involves using some complex libraries. Because the reader obviously will not be able to understand and use such libraries, we’ve written our own that will be trimmed down to the bare minimum. Namely, there will be an object “playground::screen” that consists of two methods: The constructor taking a width and a height and a function put_pixel(x, y, r, g, b) to draw a pixel.
In the tutorial, this class will be extended to draw lines, squares, circles, bitmaps, etc. All using this simple put_pixel function. There’s a first draft of this library that will be shipped with the tutorial. We want to create an installation-wizard (and packages for the most common Linux-distributions) that will easily install a full C++
development environment for the reader, so he does not have the headache to install and set up a compiler. The tutorial is planned on http://cpptut.wikia.com and on IRC in #c++.de on quakenet. There’s one article on the internet that I regard a must-read, too. It’s from Joel on Software and about Unicode and character sets: http://www.joelonsoftware.com/articles/Unicode.html. I experienced that many users and even programmer don’t remotely get what character sets are and what Unicode and UTF-8 really means.
Could you add more words about your TsSqlDatabase? See the previous mini interview for an short intro http://www.firebirdnews.org/?p=2428#comments
TsSqlDatabase is a project that I started in my free-time that is now being worked on at Treesoft. The first goal is to circumvent the missing thread-safety of the Firebird API and enable multiple threads to work on the same Firebird connection. I do this by creating one thread per connection and build a synchronized thread-safe protocol between this database-thread and other threads. The overall topic of TsSqlDatabase is processing data asynchronously. You should never
execute a select-statement and wait for the server to prepare and execute it. Instead, you should send an “execute”-request and wait for a reply that includes the fetched data. This much more in accordance to the client/server model, as I already described above.
TsSqlDatabase provides such a request/reply-like API for Firebird, effectively making it possible to write non-blocking database applications. Being non-blocking enables you to create most vivid user experiences and will make your program feel much smoother and more professional. Another part of TsSqlDatabase is a data-model that can be used together with QListView, QTableView and QTreeView (and any other view that is compatible to Qt’s model/view-architecture). The model asynchronously fills itself with data and implements a few optimizations that make it extremely fast and responsive and reduces network-traffic and server-load to a minimum. Additionally it is possible to mix data that comes directly from the database with data that may be calculated on-the-fly. This is true not only for columns, as it is possible in most database libraries, but also for rows. All in all, I believe that TsSqlDatabase lets you use databases as they are supposed to be used, as opposed to the “old-fashioned” execute-fetch-loop that is in use in most applications.
There is one limitation, though. TsSqlDatabase makes heavy use of Qt and therefore depends on Qt. In a later state I will maybe build it as a DLL that exposes only a C and/or C++ interface without the need of Qt. I always hate dependencies, but in this case Qt was of so much help that I did not want to write it in plain C++.
Maybe we should do an demo in part 3 of interview with an video of it and how it works
I wanted to do a video-demo when publishing it anyways, so I’d appreciate that. But it may very well be still a few weeks until this will happen.
What browser do you use what os do you like use?
Browsers is a delicate topic… when Chrome came out, I began starting Chrome because I’m always attracted to new, innovative technology. I found Chromes one-process-per-tab and the tab-bar that is embedded into the window’s decoration very cool. But there are still too many incompatibilities, I very often get error messages when loading pages and YouTube (how ironic!) didn’t work at all. Then there’s Arora (see http://www.arora-browser.org) which is a Qt project based on Qt WebKit that is very, very cool. I even did some minor work and patches for it and am a regular in Arora’s IRC channel #arora on Freenode. Arora has a few things that I don’t like, the main two being the download manager to be horrible and storing filled in values for forms (e.g. user name and password) is missing. That’s why I’m currently back to Firefox, which might be bloated and all, but I have enough hardware to utilize this. 😉
I have been using Linux for 2 or 3 years on my desktop at home, but then I wanted to be able to play games on my PC again and switched back to Windows XP. I was using one instance of Gentoo Linux before that survived a multitude of hardware and harddisk changes, until my portage database broke and I was not able to update and install anything anymore. When Vista came out, I bought a license, installed it on my desktop and used it for a few months. But Vista is just such a pain! It was virtuallly incompatible to everything in the beginning, and Vista 64bit still is even nowadays. So back to XP again… until recently. I’m currently using Windows 7 Beta on my desktop and must admit that I am very surprised by it’s speed and stability. On my home-server I’m using Debian GNU/Linux and am very satisfied with it.
Ubuntu is very cool and user-friendly, too. I played with it on my desktop and it’s really miles away from what I was used to when I still used Gentoo in regards to easiness and user interface.
List of interesting projects/products do you use from the Firebird community?
Habitual I am using IBOConsole for my regular Firebird SQL tasks. We’ve bought a company license of Firebird Maestro, which looks pretty cool, but it’s missing important keyboard shortcuts for me. I don’t want to use the mouse for anything when doing database-work. Other than that, there are very few Firebird tools I am using. Most frequently used are IBOConsole, isql and gbak. I’m still looking for a good replication tool that I can use to copy selected data from one database to another, including complex, partially recursive dependencies. What I have seen so far is stone old and only half functional. Maybe someone has a recommendation for me?
I see that you are interested in embedded products; do you use any of them? Beagle Board? I would like to see Firebird on that and maybe i would order it http://daniel-albuschat.blogspot.com/2008/08/beagleboard-mini-pc-at-mini-price.html
Yes embedded systems are quite tempting to me and I loved coding microcontrollers in assembler in school. The thing is just this: I don’t have any idea what cool things I could do with one. If I had one, I’d immediately order a Beagle Board.
What is your current system and i see that you like to overclock it? How fast is it, any benchmarks? http://daniel-albuschat.blogspot.com/2007/10/overclocking-q6600-on-p5n32-e-sli.html and http://daniel-albuschat.blogspot.com/2008/07/new-watercooling-setup.html
I’m a big fan of parallelism, so I bought myself the first Quad Core CPU when it came out. I still have that Q6600 with two GeForce 8800 GTS 640MB in SLI mode and 2GB of RAM. As you can see from the pictures the CPU, both GPUs and the RAM are watercooled. When doing my next big upgrade I’ll include the motherboard’s north- and southbridge, too. But I have to admit that watercooling is not as quiet and effective as I hoped it to be…]
I did some benchmarks, but it’s been some time and I don’t have the results at hand. But except for Grand Theft Auto IV and Crysis, I don’t have any new game that I can’t play on maximum settings. 😉
[ED: I would replace my dual core with an quad and maybe an dual sli setup, I’m crazzy for using Firebird on vidcard one day]
Hehe yeah, GPGPUs (General Purpose Graphics Processing Units) are cool and it’s good to see how they’re put into use by many video decoders, SETI and Folding@Home, etc.
SQL extensions, do you have more examples with SQL improvements? http://daniel-albuschat.blogspot.com/2008/01/sql-proposal-select-deleted-and-updated.html
I was glad when I learned that what I proposed was actually already available in Firebird 2.0. Except from better events and a different approach to the Firebird API (including access to the engine’s SQL parser), there’s currently nothing on my mind that I’d need improved.
Maybe we should talk more on Firebird-Architect
I’m subscribed to Firebird-Architect, but rarely read the messages because of time constraints.
Future plans? what do you think of Firebird Roadmap what would you like to be added or pressing issues that needs to be solved?
There’s one big issue with Firebird that is not even technical.
It’s marketing. Firebird’s marketing is really lacking behind. As you can read here [http://ibdeveloper.blogspot.com/2008/10/is-firebird-poor.html]
the Firebird Foundation is a non-profit organization that does have income, but it’s very limited. And I’m always experiencing that Firebird is not as widely known as the free competition such as MySQL and PostgreSQL. A few years ago, Firebird had the chance to gain massive momentum because it was incredibly superior to MySQL. Back in the days when MySQL didn’t even support foreign keys, triggers or stored procedures. Now that those features have been added and the performance is not as bad as it used to be, Firebird’s chance to easily gain popularity simply through better quality is over, unfortunately. What needs to be done now is classical marketing to advertise Firebird and make it more popular and more widely known. It still has advantages over MySQL, for example standalone-file-databases, easy deployment, performance, etc. When the Firebird Foundation earns more money it can possibly recruit more developers or pay already active developers to work full time, which will increase the pace of Firebird’s evolution.
Any Dedications? 🙂
Not directly a dedication, but I would like to advertise the inofficial Firebird support chat on Freenode. Freenode is a free IRC server that provides chat-facilities for free and open-source projects, see http://www.freenode.net. You can join our discussion in #firebird on irc.freenode.net.
Thanks for giving me the chance to publish my views and opinions on various topics. I hope Firebird continues to evolve and gains popularity to finally be the #1 Free RDBMS.