Saturday, July 2, 2011

10yearsSER - things done right - database api

Besides throwing a party and being happy about it, a celebration remembers you how old you are. Same applies to SIP Express Router (aka SER) project. It started 10 years ago and the world was so different at that time (imagine: no twitter, no facebook!!!).

Targeting large IP telephony deployments with even millions of subscriber on same instance, using text files to store user profiles was out of discussion. Natural choice by year 2001: SQL database. Which one? Several options out there, so choosing one could have been proven wrong over the years.

The solution was on implement an abstract layer that allows to switch to a different database system without affecting the rest of the code. ODBC is something similar and UnixODBC is one open source implementation of it. The decision not to use unixodbc had to do with the target of going beyond SQL-like database, complexity of the ODBC system and willingness to control the component completely considering that database interaction is a critical factor for performance.

Jan Janak designed and implemented the internal DB API, which exists currently in two versions: v1 implemented mainly in Kamailio-specific modules and v2 implemented mainly in SER-specific modules.

Unlike ODBC, the internal DB API is looking to offer a limited set of features to interact with database, only those required from SER point of view.

These days, the list of database API connectors includes a significant number of implementations:
  • MySQL
  • PostgreSQL
  • SQLite
  • UnixODBC
  • DBText
  • BerkeleyDB
  • Oracle
  • LDAP
  • Flatstore
Practically, SER modules are not affected by what type of database connector you want. Besides that, different modules can connect to different database systems.

The abstract database API was a component that attracted many users to SER over the time. In the year of 10th anniversary, it is the time of sending kudos to Jan for his work.

No comments:

Post a Comment