Tag Archives: General

Dojo examples from UC2009

I know, I know, loads of people have been waiting for these…

So here we go, I’ve finally sorted a downloaded version of the Dojo examples from the presentation I provided at the MySQL Users Conference 2009.

There are three examples:

  • The auto-paging table example, which uses the functionality of the Dojo Toolkit and the QueryReadStore to automatically load content from a table.
    tableautopagesample
  • The basic graphing example, which loads data dynamically and plots a graph.
    graphexample
  • And the zooming version of the same basic graph interface
  • There’s a README in the download that contains instructions on getting everything up to speed, although it should be fairly obvious. It’s attached to the bottom of this post too.

    Any questions for getting this to work, please go ahead and ask!

    Download the package here


    UC2009 Working with MySQL and Dojo
    ==================================

    MC Brown, 2009, http://mcslp.com and http://coalface.mcslp.com

    Components:

    There are three examples here:

    - Dojo table with auto-paging
    (table_autopage.html and table_autopage.cgi)

    - Dojo Basic Graph
    (graph_basic.html and graph_ajax.cgi)

    - Dojo Zooming Graph
    (graph.html and graph_ajaz_zoom.cgi)

    You will also need the Dojo/Dijit and DojoX toolkit package from here:

    http://www.dojotoolkit.org/downloads

    Download the combined package, and then extract the contents and place in the same directory as the CGI scripts

    Intructions for use:

    For the Table example, you can create a table (or use an existing DB) from WordPress using the wp_posts tabls.

    In practice you need only create and populate a table with the following columns:

    id (int)
    user_nicename (char)
    post_date (datetime)
    post_title (char)

    To be compatible with the example without any more modifications.

    For the Graphing examples, you need a table as follows:

    CREATE TABLE `currencies` (
    `currencyid` bigint(20) unsigned NOT NULL auto_increment,
    `currency` char(20) default NULL,
    `value` float default NULL,
    `datetime` int(11) default NULL,
    `new` int(11) default NULL,
    PRIMARY KEY (`currencyid`),
    UNIQUE KEY `currencyid` (`currencyid`),
    KEY `currencies_currency` (`currency`,`datetime`),
    KEY `currencies_datetime` (`datetime`)
    ) ENGINE=MyISAM AUTO_INCREMENT=170048 DEFAULT CHARSET=latin1

    And then populate with date/value data according to the information you want to store.

    Once done, make sure you change the database information in the CGI scripts to populate the information correctly during operation.

MySQL 5.1 in OpenSolaris

If you’ve attended just one of my recent talks, either at the UC, LOSUG or MySQL University, you should know that MySQL 5.1.30 will be in the next official drop of OpenSolaris.

In fact, you can find MySQL 5.1 in the current pre-release builds – I just download build 111 of the future 2009.06 release.

Key things about the new MySQL 5.1 in OpenSolaris:

  1. Contains the set of DTRACE probes that also exists in MySQL 5.4 (see DTrace Documentation)
  2. Like the 5.0, we have SMF integration, so you can start, stop, monitor and change some of the core configuration through SMF
  3. Directory layout is similar to 5.0, with a version specific directory (/usr/mysql/5.1), and the two can coexist if you want to handle a migration from 5.0 to 5.1

To install MySQL 5.1, use the pkg tool to perform the installation. We’ve split the components into three packages:

  1. SUNWmysql51 contains the server and client binaries, and associated scripts.
  2. SUNWmysql51libs contains the client libraries, which you’ll need for all external (i.e. MySQL) tools, like DBD::mysql for Perl connectivity)
  3. SUNWmysql51test contains the MySQL test suite

To install:

$ pfexec pkg install SUNWmysql51

Once installed, you can start MySQL server through SMF:

$ pfexec svcadm enable mysql:version_51

You can set properties, like the data directory, by using svccfg:

$ svccfg
svc:> select mysql:version_51
svc:/application/database/mysql:version_51> setprop mysql/data=/data0/mysql
svc:/application/database/mysql:version_51> setprop mysql/enable_64bit=1

Any questions, please ask!

Speaking at CommunityOne West

Sorry for the (relatively) short notice, but I will be talking at Sun’s CommunityOne conference in San Francisco on June 1st.

I’ll be talking about, and demonstrating, the DTrace probes we have put into MySQL in a joint presentation with Robert Lor who will be doing the same for Postgres.

CommunityOne West Badge

CommunityOne West Badge

Our presentation is on the Monday afternoon.

Check out the CommunityOne West Conference Site for more details and registration.

Presentations now on MySQL Conf Site Too

So I talked to the wonderful JB from O’Reilly who is responsible for all sorts of parts of the conference, and she’s now enabled my presentations on the MySQL Conference Presentations page.

While you’re there downloading mine, make sure you go and download some of the others.

In particular, you might want to try:

UC2009: Scale Up, Scale Out and High Availability: Solutions and Combinations

My presentation slides for the Scale Up, Scale Out and High Availability tutorial here at the MySQL Users Conference are now available for download:

Scale Up, Scale Out and High Availability: Solutions and Combinations

These have been on the MySQL Conference website for days now, but for some reason they don’t seem to have been freed yet.

To those waiting I’m sorry for the delay in getting these uploaded.

MySQL Conf 2009 Preview: Scalability and HA Tutorial

Like most people, and with just over a week to go before the conference, I’m putting the finishing touchs on my various presentations.

First up for me, on Monday afternoon, is my tutorial: Scale Up, Scale Out, and High Availability: Solutions and Combinations.

What will be doing?

Very simply: Looking at every potential solution for maximum scalability and availability for your database environment.

If you are attending, be prepared to:

  • Expand your mind as we think about scaling up.
  • Expand your horizons as we think about scaling out.
  • Divide and conquer, as we think about high-availability.

We’re not not hands on in this session – but I will expect you to be brains on!