Blog

  • New pre-release of the maxdb<->mysql bi-directional synchronization manager code

    Let me stress that this code is not complete and has not been tested. This is probably not something you want to get involved in. Move along. Thank you. Bye bye.

    Now that I am writing to an empty house….

    I’ve pushed a new version of the synchronization manager code to my subversion repository. It creates the shadow and version tables. It also has much of the trigger code in place. A few last tweaks to the version table insert and update triggers will likely set everything into place. I’m working on that now, but it’s been a while since I’ve committed any code. So here you are.

    http://colliertech.org/svn/mysql/maxdb/SyncMan/bidi/

  • A quick over-view of RDBMSs’ general place in the world, and ours in particular

    [1][2][3]
    
    RDBMSs (or for clarity, Databases) are a basic element of any
    computer-based appliance in the same way as are an Operating System,
    Web Server and software development platform.  As is common for
    developers of Open Source software, I am quite familiar with Linux as
    the Operating System, Apache as the Web Server, MaxDB and MySQL as
    Databases and Perl (and to a lesser degree, PHP) as the software
    development platform.  This combination is often called the "LAMP"
    stack [4].  Take the following as coming from that background.
    
    Databases are the storage mechanism of the content presented to the
    user of any computer-based appliance.  This content may be displayed
    via a desktop application or through a web browser.  The main display
    mechanisms I think of when writing applications are 1) Through the end
    users's computer in real-time via a desktop application, in an
    interactive manner.  2) Through a web server, not in real-time, via a
    user's web browser (I prefer to think of Firefox[5]), often in an
    interactive manner. 3) Through a portable computer device, be it a
    cell phone, pager, pda, or the like.  This is most commonly done in a
    "broadcast" or other non-interactive manner which does not require
    processing user feedback.  4) TV, Radio: rarely interactive.  Never in
    real-time.  Always broadcast.  In this email, I will discuss the
    communication medium I'm most familiar with, case #2.
    
    The web server is responsible for communication between your appliance
    and the user's web browser.  It is responsible for taking information
    from your appliance's database and delivering it to the user's
    computer, in many cases over a secure channel.  The need for a secure
    channel has been growing as more of the world's population begins
    using the Internet and other forms of inter-computer-networks.
    "Security," in this use of the word, is intended to indicate a
    guarantee that the information that your appliance sends is the same
    information that the user's browser receives.  The word can also be
    used to indicate that information "on the wire" between your appliance
    and the user's personal computer can not be read.  One more use of the
    word is more focused on the user's perspective, and indicates that
    users can validate that your appliance is who it claims to be. [6]
    
    The software development platform is the "glue" between the web server
    and the database.  A recent software development trend [7] is to
    separate logically the ideas of data "Model," user's "View," and
    "Controller."  In this case of a web appliance, the data Model would
    be a MySQL database, which stores content for display to the user.
    The client's browser would be used to View the content, and is
    responsible for initiating a connection to the web server.  The
    software development platform Controls the mechanism which transform
    the content of the database for presentation via the web server and
    browser to the user.  It is not, in my opinion, a perfect analogy, but
    it often fits.
    
    The Operating System is responsible for keeping all of these pieces
    playing together well on the hardware that is available.  For
    instance, MySQL databases use the operating system to transfer data
    between their cache, disk, and network stack.  Web servers ask the
    operating system for resources such as images, html files, database
    connections and network resources. [8]
    
    I hope this is a good overview of the topic.  If you have any
    questions about how either of our databases might fit in to your
    organization, don't hesitate to give me a call at the number below.
    
    C.J.
    
    [1] http://en.wikipedia.org/wiki/RDBMS
    [2] http://en.wikipedia.org/wiki/MaxDB
    [3] http://en.wikipedia.org/wiki/MySQL
    [4] http://en.wikipedia.org/wiki/LAMP_(software_bundle)
    [5] http://en.wikipedia.org/wiki/Firefox
    [6] http://en.wikipedia.org/wiki/Transport_Layer_Security
    [7] http://en.wikipedia.org/wiki/Model-view-controller
    [8] http://en.wikipedia.org/wiki/Operating_System
    
    <cjcollier@mysql.com>, MySQL/( AB|, Inc\.)/
    http://www.mysql.com/products/maxdb
    Support Manager MaxDB
    Phone: +1 206 226 5809 
    
  • MySQL AB :: The MaxDB series on PlanetMySQL.

    We’ve published the first few episodes of the weekly MaxDB series in .pdf form. Please take a look and let us know what you think!

    MySQL AB :: The MaxDB series on PlanetMySQL.

  • Anybody need some cycles on a sun machine?

    Hey you mono folks. Yeah, you. You know who I’m talking about. Do you need some cycles on a sun machine to run build tests?

  • Is gtkglarea-sharp ready for production?

    I don’t know. Probably not quite yet. But there has been interest using the toolkit in a production video game.

    Fun. But what do you all think?

  • Useful MaxDB commands

    To find a list of tables in a schema:

    $ sqlcli -u TEST,TEST -d SYNCMANA "SELECT * FROM TABLES WHERE SCHEMANAME = 'TEST'"

    To find a list of triggers on a table:

    $ sqlcli -u DBSERVICE,SECRET -d SYNCMANA "SELECT * FROM TRIGGERS WHERE TABLENAME = 'T'"

    To describe a table’s structure:

    $ cat me && echo "-----" && \
       loadercli -d SYNCMANA -u TEST,TEST -b ./me && echo "-----" && \
       cat tabledef.txt
    dataextract for dataload table T
    outstream file 'tabledef.txt'
    outstream file 'idontcare'
    
    -----
    Loader protocol: '/home/cjcollier/.sdb/loader/log/loader.prt'
    Loader packages: '/home/cjcollier/sdb/loader/packages'
    
    User TEST connected to database SYNCMANA schema TEST on local host.
    dataextract for dataload table T
    outstream file 'tabledef.txt'
    outstream file 'idontcare'
    Successfully executed
    
    -----
    //
    CREATE TABLE "T"
    (
            "I"  Integer  NOT NULL,
            "C"  Varchar (32) UNICODE,
            PRIMARY KEY ("I")
    )
     NO FIXED LENGTH COLUMN
    //
    DATALOAD TABLE "T"
    "I" 1 CHAR
    "C" 2 CHAR DEFAULT NULL
    INSTREAM  FILE  'idontcare'
     COMPRESSED UCS2
    DECIMAL '//./'
    SEPARATOR ','
    DELIMITER '"'
    DATE INTERNAL
    TIME INTERNAL
    TIMESTAMP INTERNAL
    NULL '?                   '
    BOOLEAN 'TRUE/FALSE'
    //
    
  • Synchronization Manager: MySQL as replication destination

    Earlier this week, I wrote about the Synchronization Manager and gave a step-by-step tutorial on getting an initial scenario implemented. In this article, I’ll expand on the previous tutorial by introducing the concept of uni-directional synchronization.

    Uni-directional participants act as destinations for replicated data. These participants are sometimes called “slaves,” because they are not capable of replicating changes to other members of the synchronization scenario. Theoretically, any RDBMS that provides an appropriate JDBC interface can participate as a replication destination with little effort on the part of the DBA. As an example of this, I have documented my experience creating a uni-directional MySQL participant.

    One situation DBAs might use databases synchronized as uni-directional participants is when they want to provide information to clients without trusting the recipient to update the master database. Another situation might be scenarios such as IMAP or POP mail stores, which are not updated through direct interaction, but modified at a central source, later propagating the changes to clients. Other examples of such a scenario are caching DNS servers and proxy servers.

    As you can see, much can be done using the Synchronization Manager along with uni-directional replication destinations. Those of you interested in implementing such a uni-directional synchronization participant, please take a look at my walk-through and notes here:

    http://wiki.colliertech.org/index.php/MaxDB:SynchMan:MySQL_as_destination

  • Creating a Synchronization Management Scenario

    This is a follow-up to my earlier article on the MaxDB Synchronization Manager. In the months since my prior article, the Synchronization Manager has proved itself production ready and capable of replicating real-world databases in demanding scenarios.

    Take the following as theoretical and emperical examples of such scenarios (not necessarily in that order):

    i) For its yearly trade show, a company needs to process user registration. Because of the high volume of attendees, there must be more than one system through which registration takes place. Therefore, the registration software is to run on multiple separate laptops. At the end of each day, the laptops synchronize their registration information with each other and a master registration database.

    ii) In order to reduce human error and increase efficiency, a grocery store decides to automate their cash register’s reconciliation process. To that end, groceries are scanned and recorded in a database at the register. When the operator’s shift is over, cash drawer and console are taken to the back office where the contents of the cash drawer are compared with the records of the database. Also at this time, the console’s database is synchronized with the store’s master database.

    iii) A restaurant, in order to reduce the learning curve for its wait staff, decides to provide each wait person with an order-taking device. The wait person takes down orders using the device and returns to the kitchen. When the device is docked, the order is synchronized with the master database, which in turn presents the new orders to the cooks for preparation.

    In short, the Synchronization Manager performs well as a means for keeping track of data “in the field” and keeping distributed environments in synch with their disparate parts. For the virtual company comprised mainly of “road warriors” who are only connected for short periods of time, the Synchronization Manager can be used to automatically bring the rest of the enterprise abreast of recent happenings.

    For the gearheads in the audience who wish to kick the tires and check under the hood, I’ve created a wiki entry documenting some of my experiences with the Synchronization Manager. Please feel free to review and contribute:

    http://wiki.colliertech.org/index.php/MaxDB:SynchMan:Create_Synchronization_Scenario