Slashdot Mirror


MySQL Falcon Storage Engine Open Sourced

An anonymous reader writes "The code for the Falcon Storage Engine for MySQL has been released as open source. Jim Starkey, known as the father of Interbase, is behind its creation; previously he was involved with the Firebird SQL database project. Falcon looks to be the long-awaited open source storage engine that may become the primary choice for MySQL, and along the way offer some innovation and performance improvements over current alternatives." This is an alpha release for Windows (32-bit) and Linux (32- and 64-bit) only, and is available only in a specially forked release of MySQL 5.1.

46 of 235 comments (clear)

  1. Please explain by Shimmer · · Score: 2, Interesting

    I'm a developer, but I've never used MySQL.

    Isn't MySQL already open source? If so, how does the Falcon storage engine differ from the "regular" storage engine that comes with MySQL?

    --
    The most rabid believers in American Exceptionalism are the exact same people whose policies are destroying it.
    1. Re:Please explain by Anonymous Coward · · Score: 3, Funny

      It doesn't suck.

    2. Re:Please explain by Anonymous Coward · · Score: 5, Informative

      MySQL itself is Open Source. But that only gives you a few storage Engines. The specific storage engines have different licenses. It is perfectly possible to have commercial storage engine for MySQL.

      MySQL has no "native" way to store or obtain data - everything goes through plugins, some of which ship with MySQL some don't.

      MyISAM - the most common and fastest. But no transactions, no ACID, etc. Good for many read-only or non critical tables.
      InnoDB - licensed from InnoSoft (now oracle). GPL for non commercial, extra dollars for commercial. Transactions, ACID, but a bit slow. .... other storage engines also exist

    3. Re:Please explain by SirThomas · · Score: 5, Informative

      Stolen directly from the mysql website:

      Falcon has been specially developed for systems that are able to support larger memory architectures and multi-threaded or multi-core CPU environments. Most 64-bit architectures are ideal platforms for the Falcon engine, where there is a larger available memory space and 2-, 4- or 8-core CPUs available. It can also be deployed within a standard 32-bit environment.

      The Falcon storage engine is designed to work within high-traffic transactional applications. It supports a number of key features that make this possible:

              * True Multi Version Concurrency Control (MVCC) enables records and tables to be updated without the overhead associated with row-level locking mechanisms. The MVCC implementation virtually eliminates the need to lock tables or rows during the update process.
              * Flexible locking, including flexible locking levels and smart deadlock detection keep data protected and transactions and operations flowing at full speed.
              * Optimized for modern CPUs and environments to support multiple threads allowing multiple transactions and fast transaction handling.
              * Transaction-safe (fully ACID-compliant) and able to handle multiple concurrent transactions.
              * Serial Log provides high performance and recovery capabilities without sacrificing performance.
              * Advanced B-Tree indexes.
              * Data compression stores the information on disk in a compressed format, compressing and decompressing data on the fly. The result is in smaller and more efficient physical data sizes.
              * Intelligent disk management automatically manages disk file size, extensions and space reclamation.
              * Data and index caching provides quick access to data without the requirement to load index data from disk.
              * Implicit savepoints ensure data integrity during transactions.

    4. Re:Please explain by AslanTheMentat · · Score: 3, Informative

      This is a real quick, detailess explanation, but explanation nonetheless... Essentially there are several options for "storage engine", each with its own set of features... The vanilla engine w/ MySQL is MyISAM, which among other things doesn't support transactions. In lieu of these shortcomings there is also the InnoDB engine, which does do transactions, etc.

      The Falcon engine is from a renowned database developer, and as such has all sorts of neat features.

    5. Re:Please explain by namityadav · · Score: 2, Informative

      Are you serious? Do you think that MySql for a developer is equivalent to wrench for a mechanic? What about people who develop device drivers? What about people who write the kernel? I can go on and on for fields that have just no need / use for MySql or any other database. Not everybody in this world is doing *exactly* what you are doing.

    6. Re:Please explain by Entrope · · Score: 2, Informative

      This is probably a FAQ, and wandering off-topic, but exactly how the cheese do you have "GPL for non commercial, extra dollars for commercial" and expect it to work? Even InnoDB's licenses page implies that the limitation is "GPL, extra dollars for non-copyleft".

    7. Re:Please explain by NineNine · · Score: 2, Insightful

      Apparently, MySQL is a mish-mash of all kinds of different code. Heck, even the part that handles esoteric stuff such as stored procedures (note tongue in cheek) is part of some external module. I can't imagine that having multiple layers of API's is a good thing, considering how critical databases can be. Personally, I want my database to be consistent, and thoroughly tested, but the best being when the whole thing is designed to work together. Call me crazy, but it certainly does not give me a warm fuzzy feeling to know that stuff as critical as my database's file system is tacked on as an afterthought. (No, I don't use MySQL, primarily for these reasons).

    8. Re:Please explain by rongage · · Score: 3, Insightful

      This is easy and one of the tenants of so-called dual licensing setups...

      Basically, if you don't want to pay to use the software, you are bound to the terms of the GPL. If you don't want to be bound to the terms of the GPL, you gotta pay.

      --
      Ron Gage - Westland, MI
    9. Re:Please explain by Entrope · · Score: 2, Informative

      I mentioned a valid dual-licensing offer in my post. The original post said that the GPL version came with a restriction on commercial use, which would be contrary to the terms of the GPL as they are generally understood. Thanks for reading the details before you reply!

    10. Re:Please explain by OverDrive33 · · Score: 2, Insightful

      MySql for a developer is equivalent to wrench for a mechanic? What about people who develop device drivers? What about people who write the kernel? I was unaware that mechanics only had one wrench to work with.
    11. Re:Please explain by kv9 · · Score: 4, Interesting
    12. Re:Please explain by kosmosik · · Score: 2, Interesting

      > GPL for non commercial, extra dollars for commercial.

      Well you can use GPL version for commercial projects and The Other license for totally uncomercial projects.

    13. Re:Please explain by Torst · · Score: 2, Informative

      My understanding is that the Falcon engine, like MyISAM and SQLite, supports the SYNTAX for defining foreign keys, but do NOT actually enforce the foreign key constraints! That's quite an important difference. I'll stick to PostgreSQL for when I care about relational integrity.

    14. Re:Please explain by Mysticalfruit · · Score: 2, Interesting

      The company I work for uses MySQL for mission critical stuff and it works just fine. We even have a slave node and mirror our data in realtime without issue.

      --
      Yes Francis, the world has gone crazy.
    15. Re:Please explain by nuzak · · Score: 2, Funny

      You might want to inform MySQL AB and tell them to update their page at http://www.mysql.org/doc/refman/5.1/en/se-falcon-l imits.html which says "Foreign key support is currently not available." I'm sure they'll be thrilled to hear the news.

      --
      Done with slashdot, done with nerds, getting a life.
    16. Re:Please explain by jadavis · · Score: 2, Insightful

      It doesn't support foreign keys

      Here's what gets me about MySQL. They say they have "pluggable" storage engines, but there's no clean abstraction. Each engine supports some things and not others.

      Pluggable engines might be useful if the only differences are in the implementation, storage requirements, performance, and other administrative aspects. However, a constraint violation that will cause an error in one storage engine passes right through another storage engine. So, it's not like you can just swap one storage engine for another.

      --
      Social scientists are inspired by theories; scientists are humbled by facts.
  2. MySQL's counter-attack to Oracle's advances by atomic777 · · Score: 5, Informative

    I've been very excited since I first heard about this new storage engine adapted from Netfrastructure. Not only does it give MySQL a transactional storage engine that is not controlled by a hostile company, but the engine appears to be designed from the bottom up to support web traffic. Jim gave a great talk at the Boston MySQL meetup that you can watch here http://video.google.com/videoplay?docid=1929002440 950908895

  3. Re:InnoDB by Just+Some+Guy · · Score: 2, Insightful
    What does Falcon do that the InnoDB engine doesn't currently do?

    Get developed by a company that doesn't hate MySQL, for starters.

    --
    Dewey, what part of this looks like authorities should be involved?
  4. Re:Okay, I'm stupid. What is a storage engine? by rhavenn · · Score: 2, Informative

    Ugh, no you haven't. The storage engine is how MySQL stores the actual data on disk. There are different formats, each have their own benefits, issues and work arounds. Think of MySQL as a SQL interpreter talking to different storage engines on the back. The default is MyISAM, but InnoDB and ISAM are others.

  5. Why not PostgreSQL? by Just+Some+Guy · · Score: 2, Insightful

    OK, although I don't agree with it, I know that a lot of people use MySQL because it's the most common database supported by web hosts. Isn't it almost as likely for a hosting company to have PostgreSQL, though, as to upgrade to a bleeding-edge version of MySQL when this is finally readied for public consumption? Will this new backend give any extra functionality that PostgreSQL doesn't offer?

    --
    Dewey, what part of this looks like authorities should be involved?
    1. Re:Why not PostgreSQL? by unoengborg · · Score: 4, Interesting

      As a I see Falcon is mainly an attempt to:

      1) Get better performance on multiprocessor systems

      2) Get a decent storage engine that is not controlled by MySQL competitors

      As far as I can tell there is nothing in it that you can't get in Postgresql.
      Postgresql already performs better than the standard MySQL on multiprocessor systems.
      It remains to be seen if Falcon will be better than Postgresql once its production
      ready. Well, there is one thing, Falcon compresses data while Postgresql doesn't. can't help wondering what this will do to performance.

      On the other hand there seam to be a lot missing from Falcon that you find in Postgresql.
      If you read the Falcon limits page on the mysql site you find that it lacks e.g:

      - SELECT FOR UPDATE

      - No online backup

      - No foreign keys

      All in all, I would say Postgresql would be a better choice, if your web hosting company allows you to use it.

      MySQL have a tendency to slow down on many concurrent or complex queries. Postgresql is far better at handling triggers and can be programmed in many different programming languages. Support for domains and much more. MySQL also lacks EXCEPT, this makes some types of queries (relational division) much more complex than they have to be.

      Still for people that aren't free to choose their database, it is nice to see that MySQL
      makes some progress. Besides a little competition never hurts.

      --
      God is REAL! Unless explicitly declared INTEGER
  6. Re:Please explain part 2 by Anonymous Coward · · Score: 5, Funny

    Actually, a good question would be : What is the difference between Mysql and Mysql falcon?

    Mysql maximizes rich channels and empowers cross-platform convergence letting you drive mission-critical niches whereas Falcon utilizes scalable initiatives by scaling end-to-end networks for reintermediate granular platforms (win32 and linux 32/64).

  7. Re:InnoDB by namityadav · · Score: 2, Insightful

    Like others said already .. First of all, Falcon allows MySQL to not be as dependent on InnoDB as it is right now. When Oracle got hold of InnoDB, people had serious doubts about MySQL's future. For a solution like MySQL, it's always good to have competing (Even if similar) engines for it's own survival / growth.

  8. VACUUM? by dskoll · · Score: 2, Interesting

    So if Falcon uses MVCC, does it require something like PostgreSQL's VACUUM? Or does it have some other way to detect and remove dead tuples?

    Also, has anyone looked at making PostgreSQL a storage plugin for MySQL? :-)

    1. Re:VACUUM? by gavinroy · · Score: 3, Funny

      That's like putting a Volkswagen Bug body on top of a tank ;-)

    2. Re:VACUUM? by GroovinWithMrBloe · · Score: 2, Informative

      Seeing as it has its base in Interbase, I would be running away as quick as possible. Interbase/Firebird(?) has a SWEEP process (read: Vacuum), however it was far more sluggish than Postgres. Also, the MVCC has a transaction count limit on Interbase where you hit ~2 billion transactions you MUST do a backup/restore -- a simple sweep won't cut it. I was working with a database that eventually required bi-monthly restores and each restore took over 12 hours. I also always found it funny that Interbase's row version was stored as a signed int (hence 2 billion version), rather than an unsigned int (giving 4 billion versions). When we moved to Postgres, on the same hardware, the backup went from over 12 hours to under 50 minutes. This is also due in part to the better tweaking capabilities available in postgres. Interbase is designed to be an easy to use/setup database system, which works fine for small cases, but when you start dealing with tens of millions of transactions per day, it becomes more work than it is worth. So if Falcon is anywhere like Interbase/Firebird, I'd be keeping well clear of it.

  9. I had to drop MySQL by caluml · · Score: 2, Informative

    I was forced to learn Postgres because I wanted to do a SELECT * FROM foo WHERE bar NOT IN ( SELECT x FROM y WHERE z > 4 ) type query - basically a negative subselect. I couldn't do (or couldn't work out how to) use table JOINs to perform the same thing, and at the time, MySQL didn't do it.

    I'm so thankful. Postgres is so much better. And the table JOIns I did have ran so much faster in PG. s/mysql_/pg_/g *.php

    1. Re:I had to drop MySQL by RobKow · · Score: 2, Informative

      Well, for your particular example:

      SELECT * FROM foo LEFT OUTER JOIN y ON foo.bar = y.x AND y.z > 4 WHERE y.x IS NULL ;)

      But I'm sure there are nasty cases where you can't substitute joins readably or maybe at all.

  10. Re:MySQL versus PostgreSQL by Just+Some+Guy · · Score: 4, Insightful
    is evidence that easier trumps better when it comes to the early adoption curve, something I wish the PGSQL folks had understood (or rather cared about).

    But in something as mission-critical as a database, of all things, reliability trumps everything. I don't think they could have developed PostgreSQL any other way and still supported its primary goal of safety.

    PGSQL should have thrashed MySQL long ago. If you wait long enough, competing projects will gain parity and the game is over.

    What gave you the (wrong) impression that PostgreSQL folks have been sitting around twiddling their thumbs? Version 8.2 just came out within the month and includes several performance boosts that make it fly on our production systems.

    --
    Dewey, what part of this looks like authorities should be involved?
  11. Oh, please by Lisandro · · Score: 3, Informative

    Falcon looks to be the long-awaited open source storage engine that may become the primary choice for MySQL, and along the way offer some innovation and performance improvements over current alternatives.

    Come on. Give me PostgreSQL any day. After fiddling with MySQL at work for a few custom developments (both versions 4 and 5.0.2) i'm ready for anything else. Gave PSGSQL a shot at home and it runs very nice, with lots of advanced features. Anyone with real-world deploying feedback to share?

    1. Re:Oh, please by killjoe · · Score: 2, Informative

      Tried it. Found out there was no support for case insensitive collations and then dropped it. Every other database in the world supports case insensitive collations so now I am testing out firebird, mysql and db/2. All are OK, I probably don't need everything db/2 offers so I will most likely end up with one of the open sourced ones.

      --
      evil is as evil does
  12. Re:It might have potential... by TopSpin · · Score: 2, Informative

    for smaller databases, but limiting the tablespace to a single file per database/schema doesn't sound very flexible, and won't allow DBAs to maximize their disk throughput.

    That isn't necessarily the case. Recently it has become popular to aggregate spindles into single stripe/mirror volumes with large stripe widths. This spreads I/O operations uniformly across disks. All disks contribute their IOPS capacity to all operations. Large stripe widths attempt to leverage high sequential IO bandwidth.

    Oracle calls this policy SAME; Stripe and Mirror Everything. Their Automatic Storage Management (ASM) is an implementation of SAME, and it is recommended for use with both OLTP and OLAP applications.

    If I had to make a MySQL Falcon instance fast I would build a large stripe/mirror volume for the (single) tablespace file. The point is that isolating high load tables on separate spindles isn't necessarily the best policy, according to current thinking. Of course there are other reasons for isolating parts of a database, but you only mentioned throughput.

    --
    Lurking at the bottom of the gravity well, getting old
  13. Re:Eh. MySQL user, actually. by Bacon+Bits · · Score: 4, Interesting

    Nah, I'm just giving you a hard time. I've worked with a couple of people who have only ever worked on MySQL, and they tend to not know some pretty essential things for a DBA like ACID compliance and such.

    It's just a function of how easy MySQL is to set up. It's trivial to set up, but a lot of the default decisions are generally bad for an SQL database, and the documentation -- while good -- never encourages you to go beyond the defaults.

    It's like hearing someone say they can design websites, and then finding out they mean with FrontPage.

    Drupal is one example of something that works great with MySQL. I can argue about MySQL's faults over and over, but at the end of the day it's easy to use and it's good enough for most people. CMS systems and forums are where MySQL really shines.

    --
    The road to tyranny has always been paved with claims of necessity.
  14. Re:MySQL versus PostgreSQL by swillden · · Score: 2, Informative

    But in something as mission-critical as a database, of all things, reliability trumps everything.

    That depends on the database.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  15. MVCC: Multi-Version Concurrency Control by DrJimbo · · Score: 4, Informative

    The big thing Falcon brings is MVCC which allows safe simultaneous reading and and writing without locks.

    Here is a good explanation of PostgreSQL's MVCC.

    --
    We don't see the world as it is, we see it as we are.
    -- Anais Nin
  16. Re:New Microsoft Sql Server by Thundersnatch · · Score: 4, Insightful

    Microsoft SQL Server has had almost all of these features since its first release in the early 90s. MVCC was just introduced in Microsoft SQL Server 2005. There is no row-level compression in SQL Server (or Oracle, or DB2, or PostGreSQL... which is probably a *good thing* from a performance perspective).

    This is a nice step forward for MySQL, but for the most part it is just a means for catching up to the other commercial DBs and PostgreSQL. ACID compliance, granular locking, MVCC, and multithreading are *not* differentiating features in the database world.

  17. Re:New Microsoft Sql Server by Anonymous Coward · · Score: 3, Informative

    Umm, Postgres has had automatic row-level compression (automatic compression of TOASTed) values for some time now.

  18. Re:New Microsoft Sql Server by sonofagunn · · Score: 2, Insightful

    Actually, compression can improve performance. Often disk I/O can slow you down more than the extra CPU work to compress/decompress. I have written some flat-file processing code at my work and it runs much faster reading from and writing to zipped text files instead of uncompressed text files. The space savings are just a bonus.

  19. Noobs and Access, oh my! by louzerr · · Score: 2, Funny

    I've ended up having to support and/or migrate several Access databases designed by end users ...

    These guys who've set up MySQL are gurus by all comparisons ... ;)

    --
    "The large print giveth, and the small print taketh away" -- "Step Right Up", Tom Waits
  20. Re:It's only a matter of time by Zontar+The+Mindless · · Score: 3, Informative
    mysql had better develop it's *own* engine


    MySQL *have* done so with Falcon. MySQL *do* own Falcon.

    [Jim has worked on other RDBMS in the past] != [MySQL do not own the one he's currently working on]
    --
    Il n'y a pas de Planet B.
  21. Re:New Microsoft Sql Server by 0racle · · Score: 2, Funny

    Meh, I liked it better when they called it Sybase.

    --
    "I use a Mac because I'm just better than you are."
  22. Re:Multiple different storage engines.... by killjoe · · Score: 2, Insightful

    Why would you be concerned about the license for a database? The licence is only important if you are modifying the code AND distributing the modified code. Most database users I know just install the binary and use that in which case you don't care if it's BSD or GPL licenced.

    --
    evil is as evil does
  23. Re:Eh. MySQL user, actually. by nacturation · · Score: 2, Insightful

    I can argue about MySQL's faults over and over, but at the end of the day it's easy to use and it's good enough for most people. So MySQL is like the Windows of databases?
    --
    Want to improve your Karma? Instead of "Post Anonymously", try the "Post Humously" option.
  24. Don't underestimate this one by dybdahl · · Score: 4, Informative

    I've read through all comments with 2 or more in rating, and it seems that people really underestimate what Jim is doing here.

    We're talking in-memory MVCC here. This means you can add 1000 records, do a rollback, and the harddisk hasn't been accessed. Even if you commit, performance will eventually be magnificent compared with on-disk MVCC systems. You can run larger systems on one server with this, than you would be able to run on a cluster with other database systems.

    This system has been designed to provide very good performance improvements for those who do know how to create SQL statements, but probably even better performance improvements for those who don't. And we don't have a tradeoff between performance and transactions any more - transactions and better performance are both included.

    Also, please note that this technology will make MySQL a trustworthy data storage for many commercial applications out there, giving added value to their apps and their businesses. It will also enable small but very skilled development teams able to use MySQL as a trustworthy database for specialized applications - previously only Firebird and Postgresql were able to provide this for free, and even though Firebird has a very high deployment in USA's top 500 companies, postgresql seems to be very much *nix only in deployment statistics.

    I have been programming database applications for more than 20 years, and have been programming Oracle, MSSQL, MySQL, postgresql, Firebird, dBase, Paradox, Access and other databases. I see Jim's contributions to MySQL as extremely important for the database market. Instead of having "just" a transaction layer on top of a storage layer, MySQL now provides mechanisms that give this design an advantage over those database systems where the transactions are stored on disk (like Firebird, Postgresql).

    And - by the way - this has NOTHING to do with "optimizing for web applications". Web applications are just as diverse as GUI applications and other systems, and GUI applications will benefit from this as much as web applications.

  25. Re:InnoDB by LizardKing · · Score: 2, Insightful

    InnoDB is licensed under the GPL. InnoDB is no more dependent on Oracle then Linux is on Red Hat. MySQL could if need be develop InnoDB themselves.

    Except that a large chunk of MySQL AB's revenue would disappear as they'd no longer be able to sell a commercial version of their database with InnoDB support. And believe me, few people are going to buy the commercial version if the preferred storage engine is MyISAM. MySQL pay InnoSoft for the right to distribute the InnoDB engine as part of their commercial version - whether Oracle allows them to renew this agreement when it expires is somewhat doubtful.