140 likes | 227 Views
Fifth ACM SIGPLAN Erlang Workshop Portland, September 16 th , 2006. Evaluation of Massively Scalable Database Management Systems for Erlang. Emil Hellman emil@erlang-consulting.com. Contents. Mnesia DBMS survey Open Source Alternatives Conclusions. Mne s ia.
E N D
Fifth ACM SIGPLAN Erlang Workshop Portland, September 16th, 2006 Evaluation of Massively Scalable Database Management Systems for Erlang Emil Hellman emil@erlang-consulting.com
Contents • Mnesia • DBMS survey • Open Source Alternatives • Conclusions
Mnesia Primarily designed as a in-memory database Very fast lookup times Great connectivity/interface to Erlang Tight coupling to Erlang Limited to 4 GB table size (8GB on 64 Bit machines) Lacking in ability to maintain constraints Awkward to modify schemas
DBMS Survey Important attributes Safety Mechanisms Replication Large Storage Capabilities Maintaining Logical Constraints Erlang Interface
Open Source Alternatives Berkeley DB Embedded databases MySQL Web applications PostgreSQL Complex databases / Web applications Ingres Enterprise grade databases How do we know which one to use???
Berkeley DB • Pros: • Good for term storage • Fast lookups with memory cache • Cons: • Does not support constraints • Application involvement needed for replication • Limited in size capabilites (256 GB/DB and 4GB/record) • Lots of things left to the using application • Erlang: • Several open source drivers exist
MySQL • Pros: • MySQL clusters • Supports failover (however, additional scripting needed) • Cons: • Some storage engines may force invalid data into valid • Size limitations (different for different storage engines) • No partial recovery • Erlang: • The Erlang ODBC driver is available • A primitive driver exists through the YXA project. • Erlang Training and Consulting will soon be releasing its driver.
PostgreSQL • Pros: • Storage capabilities • Supports fail and switchover (with additional software) • Good constraint system • Soon an open source driver available • Cons: • Some limitations in replicating large objects • No partial recovery • Erlang: • Erlang Training and Consulting has released its driver • The Erlang ODBC driver is available
Ingres • Pros: • Supports failover • Support partial recovery of inconsistent tables • Can attempt automatic resolution of inconsistencies • Replication granularity • Great constraint system • Clustering capabilities • Cons: • Only interface is through Erlang ODBC application • Erlang • The Erlang ODBC driver is available
Conclusions • We evaluated the questionnaire results using a method called the Analytical Hierarchy Process • Evaluation method invented by Dr. Thomas Saaty in the 1970's • Based on pairwise comparison of alternatives to reduce complexity
Conclusions From the survey, we conclude Erlang Users are not giving up using Mnesia. Asked what survey participants use when Mnesia is not enough, two replies we got were… “We still use Mnesia, with care.” In order not to complicate design, “one of our applications uses Mnesia to store about 200,000,000 rows/record. The database consists of two logical tables: one set of 512 fragments is used for data, and another consisting of 128 fragments is used to store indexes.”
Conclusions Is a comparison of Berkeley DB and relational databases fair? What licenses are available for the DBMSs?
Summary • Mnesia • DBMS survey • Open Source Alternatives • Conclusions