SlideShare ist ein Scribd-Unternehmen logo
1 von 53
Using Q4M
a message queue storage engine for MySQL


              Kazuho Oku
Who am I?

   Name: Kazuho Oku (奥一穂)
   Original Developer of Palmscape / Xiino
        The oldest web browser for Palm OS
   Worked Cybozu Labs in 2005-2010
        Research subsidiary of Cybozu, Inc. in Japan
        Developed Japanize / Mylingual, Q4M, etc.
   Now working at DeNA Co., Ltd.
        with the developers of the HandlerSocketplugin

Mar 26 2011                 Using Q4M                     2
What is Q4M?

   A message queue
        runs as a storage plugin of MySQL 5.1
   Why is it a MySQLplugin?
        accessible by using existing MySQL clients
              no need for a new client library
        administrable by using SQL
              friendly to DB admins




Mar 26 2011                        Using Q4M          3
Design Goals of Q4M

   Robust
        Does not lose data on OS crash or power failure
              necessary for Tokyo wo. nuclear power plants… orz

   Fast
        Transfer thousands of messages per second
   Easy to Use
        Use SQL for access / maintenance
        Integration into MySQL
              no more separate daemons to take care of
Mar 26 2011                       Using Q4M                        4
Users of Q4M

   Many leading web services in Japan
        DeNA Co., Ltd.
        livedoor Co., Ltd.
        mixi, Inc.
        Zynga Japan (formerly Unoh, Inc.)




Mar 26 2011                Using Q4M         5
Agenda

   What MQ is in General
   Applications of Q4M
   Brief Tutorial




Mar 26 2011         Using Q4M   6
What is a Message Queue?




Mar 26 2011            Using Q4M         7
What is a Message Queue?

   Middleware for persistent asynchronous
    communication
        communicate between fixed pairs (parties)
        a.k.a. Message Oriented Middleware
   MQ is intermediate storage
        RDBMS is persistent storage
   Senders / receivers may go down


Mar 26 2011                 Using Q4M                8
Minimal Configuration of a MQ

   Senders and receivers access a single
    queue




               Sender                Receiver

                         Queue



Mar 26 2011              Using Q4M              9
MQ and Relays

   Separate queue for sender and receiver
   Messages relayed between queues



                                Relay
              Sender                               Receiver

                       Queue               Queue



Mar 26 2011                    Using Q4M                      10
Merits of Message Relays

   Destination can be changed easily
        Relays may transfer messages to different
         locations depending on their headers
   Robustness against network failure
        no loss or duplicates when the relay fails
   Logging and Multicasting, etc.



Mar 26 2011                  Using Q4M                11
Message Brokers

   Publish / subscribe model
        Separation between components and their
         integration
        Components read / write to predefined queues
        Integration is definition of routing rules between
         the message queues
        Messages are often transformed (filtered) within
         the relay agent



Mar 26 2011                  Using Q4M                        12
What about Q4M?

   Q4M itself is a message queue
   Can connect Q4M instances to create a
    message relay
   Provides API for creating message relays
    and brokers




Mar 26 2011             Using Q4M          13
Performance of Q4M

   over 7,000 mess/sec.
        message size: avg. 512 bytes
        syncing to disk
   Outperforming most needs
        if you need more, just scale out
        Can coexist with other storage engines without
         sacrificing their performance


        see http://labs.cybozu.co.jp/blog/kazuhoatwork/2008/06/q4m_06_release_and_benchmarks.php

Mar 26 2011                                   Using Q4M                                            14
Applications of Q4M




Mar 26 2011          Using Q4M      15
Asynchronous Updates

   DeNA uses Q4M for sending notifications
    to users asynchronously
              http://engineer.dena.jp/2010/03/dena-technical-seminar-1-
                                                                 2.html




Mar 26 2011                  Using Q4M                               16
Delay Peak Demands

   Mixi (Japan's one of the largest SNS)
    uses Q4M to buffer writes to DB, to
    delay peak demands
                           from http://alpha.mixi.co.jp/blog/?p=272




Mar 26 2011            Using Q4M                                 17
Connecting Distant Servers

   Pathtraq uses Q4M to create a relay
    between its database and content
    analysis processes
                         → Contents to be analyzed →



                                                        Content
              Pathtraq          MySQL conn.             Analysis
                DB              over SSL,gzip          Processes



                         ← Results of the analysis ←

Mar 26 2011                        Using Q4M                       18
Prefetch Data

   livedoor Reader (web-based feed
    aggregator) uses Q4M to prefetch data
    from database to memcached
   uses Q4M for scheduling web crawlers
    as well
                 from http://d.hatena.ne.jp/mala/20081212/1229074359




Mar 26 2011                 Using Q4M                             19
Scheduling Web Crawlers

   Web crawlers with retry-on-error
   Sample code included in Q4M dist.
                                       If failed to fetch, store URL in retry queue
              Store Result

                                       Read URL
                             Spiders
              URL
              DB

                                        Request Queue              Retry Queue
                                                           Re-
                                                        scheduler



Mar 26 2011                            Using Q4M                                      20
Delayed Content Generation

   Hatetter(RSS feed-to-twitter-API
    gateway) uses Q4M to delay content
    generation
        Source code: github.com/yappo/website-hatetter




Mar 26 2011                Using Q4M                      21
Installing Q4M




Mar 26 2011       Using Q4M    22
Installing Q4M

   Compatible with MySQL 5.1
   Download from q4m.github.com
        Binary releases available for some platforms
   Installing from source:
        requires source code of MySQL
        ./configure && make && make install
        run support-files/install.sql



Mar 26 2011                 Using Q4M                   23
Configuration Options of Q4M

   --with-sync=no|fsync|fdatasync|fcntl
        Controls synchronization to disk
        default: fdatasync on linux
   --enable-mmap
        Mmap’ed reads lead to higher throughput
        default: yes
   --with-delete=pwrite|msync
        msyncrecommended on linux>=2.6.20 if you
         need really high performance
Mar 26 2011                  Using Q4M              24
Q4M Basics




Mar 26 2011     Using Q4M   25
The Model

        Various publishers write to queue
        Set of subscribers consume the entries in queue



                        Publisher




         Publisher                  Q4M table


                                                 Subscribers

                     Publisher
Mar 26 2011                          Using Q4M                 26
Creating a Q4M Table

    ENGINE=QUEUE creates
                                mysql> CREATE TABLE qt (
                                  -> id int(10) unsigned NOT NULL,

     a Q4M table
                                  -> message varchar(255) NOT NULL
                                  -> ) ENGINE=QUEUE;
                                Query OK, 0 rows affected (0.42 sec)
    No primary keys or
     indexes
    Sorted by insertion
     order (it’s a queue)




Mar 26 2011             Using Q4M                                      27
Modifying Data on a Q4M Table

    No restrictions for
                                mysql> INSERT INTO qt (id,message)
                                  -> VALUES

     INSERT and DELETE
                                  -> (1,'Hello'),
                                  -> (2,'Bonjour'),
                                  -> (3,'Hola');
    No support for UPDATE      Query OK, 3 rows affected (0.02 sec)

                                mysql> SELECT * FROM qt;
                                +----+---------+
                                | id | message |
                                +----+---------+
                                | 1 | Hello |
                                | 2 | Bonjour |
                                | 3 | Hola |
                                +----+---------+
                                3 rows in set (0.00 sec)




Mar 26 2011             Using Q4M                                      28
SELECT from a Q4M Table

   Works the same as
                                  mysql> SELECT * FROM qt;
                                  +----+---------+
                                  | id | message |
    other storage                 +----+---------+
                                  | 1 | Hello |
    engines                       | 2 | Bonjour |
                                  | 3 | Hola |
                                  +----+---------+
   SELECT COUNT(*) is            3 rows in set (0.00 sec)


    cached                        mysql> SELECT COUNT(*) FROM qt;
                                  +----------+
                                  | COUNT(*) |
                                  +----------+
                                  |      3|
                                  +----------+
                                  1 row in set (0.00 sec)




              How to subscribe to a queue?
Mar 26 2011               Using Q4M                                 29
Calling queue_wait()

    After calling, only one
                                       mysql> SELECT * FROM qt;
                                       +----+---------+
                                       | id | message |
     row becomes visible               +----+---------+
                                       | 1 | Hello |

     from the connection               | 2 | Bonjour |
                                       | 3 | Hola |
                                       +----+---------+
                                       3 rows in set (0.00 sec)

                                       mysql> SELECT queue_wait('qt');
                                       +------------------+
                                       | queue_wait('qt') |
                                       +------------------+
                                       |             1|
                                       +------------------+
                                       1 row in set (0.00 sec)

                                       mysql> SELECT * FROM qt;
                                       +----+---------+
                                       | id | message |
                                       +----+---------+
                                       | 1 | Hello |
                                       +----+---------+
                                       1 row in set (0.00 sec)



Mar 26 2011                    Using Q4M                                 30
OWNER Mode and NON-OWNER Mode

   In OWNER mode, only the OWNED row
    is visible
              OWNED row becomes invisible from other connections
              rows of other storage engines are visible


    NON-OWNER Mode            queue_wait()    OWNER Mode

    1,'Hello'                                 1,'Hello'
    2,'Bonjour'
                              queue_end()
    3,'Hola'
                             queue_abort()

Mar 26 2011                      Using Q4M                      31
Returning to NON-OWNER mode

    By calling queue_abort,
                                  mysql> SELECT QUEUE_ABORT();
                                  +---------------+

     the connection returns
                                  | QUEUE_ABORT() |
                                  +---------------+

     to NON-OWNER mode
                                  |          1|
                                  +---------------+
                                  1 row in set (0.00 sec)

                                  mysql> SELECT * FROM qt;
                                  +----+---------+
                                  | id | message |
                                  +----+---------+
                                  | 1 | Hello |
                                  | 2 | Bonjour |
                                  | 3 | Hola |
                                  +----+---------+
                                  3 rows in set (0.01 sec)




Mar 26 2011               Using Q4M                              32
Consuming a Row

    By calling
                                mysql> SELECT queue_wait('qt');
                                (snip)
                                mysql> SELECT * FROM qt;
     queue_end, the OWNED       +----+---------+
                                | id | message |

     row is deleted, and        +----+---------+
                                | 1 | Hello |

     connection returns to
                                +----+---------+
                                1 row in set (0.01 sec)

     NON-OWNER mode             mysql> SELECT queue_end();
                                +-------------+
                                | queue_end() |
                                +-------------+
                                |        1|
                                +-------------+
                                1 row in set (0.01 sec)

                                mysql> SELECT * FROM qt;
                                +----+---------+
                                | id | message |
                                +----+---------+
                                | 2 | Bonjour |
                                | 3 | Hola |
                                +----+---------+
                                2 rows in set (0.00 sec)


Mar 26 2011             Using Q4M                                 33
Writing a Subscriber

    Call two functions: queue_wait, queue_end
    Multiple subscribers can be run concurrently
         each row in the queue is consumed only once


   while (true) {
     SELECT queue_wait('qt'); # switch to owner mode
     rows := SELECT * FROM qt; # obtain data
     if (count(rows) != 0) # if we have any data, then
       handle_row(rows[0]); # consume the row
     SELECT queue_end();         # erase the row from queue
   }

Mar 26 2011                         Using Q4M                 34
Writing a Subscriber (cont'd)

   Or call queue_wait as a condition
        Warning: conflicts with trigger-based insertions



   while (true) {
     rows := SELECT * FROM qt WHERE queue_wait('qt');
     if (count(rows) != 0)
       handle_row(rows[0]);
     SELECT queue_end();
   }


Mar 26 2011                      Using Q4M                  35
The Model – with code

                    INSERT INTO queue ...



                            Publisher
                                                         while (true) {
                                                           rows := SELECT * FROM qt
                                                               WHERE queue_wait('qt');
                                                           if (count(rows) != 0)
    INSERT INTO queue ...                                    handle_row(rows[0]);
                                                           SELECT queue_end();
                                                         }

              Publisher                     Q4M table


                                                                       Subscribers
                INSERT INTO queue ...


                      Publisher

Mar 26 2011                                  Using Q4M                                   36
Three Functions in Detail




Mar 26 2011            Using Q4M          37
queue_wait(table)

   Enters OWNER mode
   0〜1 row becomes OWNED
        Enters OWNER mode even if no rows were
         available
        Default timeout: 60 seconds
        Returns 1 if a row is OWNED (0 on timeout)
   If called within OWNER mode, the
    owned row is deleted

Mar 26 2011                 Using Q4M                 38
Revisiting Subscriber Code

   Calls to queue_end just before
    queue_wait can be omitted


   while (true) {
     rows := SELECT * FROM qt WHERE queue_wait('qt');
     if (count(rows) != 0)
       handle_row(rows[0]);
     SELECT queue_end();
   }



Mar 26 2011                      Using Q4M              39
Conditional queue_wait()

   Consume rows of certain condition
        Rows that do not match will be left untouched
        Only numeric columns can be checked
        Fast - condition tested once per each row

   examples:
    SELECT queue_wait('table:(col_a*3)+col_b<col_c');
    SELECT queue_wait('table:retry_count<5');




Mar 26 2011                       Using Q4M              40
queue_wait(tbl_cond,[tbl_cond…,timeout])

   Accepts multiple tables and timeout
   Data searched from leftmost table to
    right
   Returns table index (the leftmost table is
    1) of the newly owned row
        Returns zero if no rows are being owned

   example:
    SELECT queue_wait('table_A','table_B',60);

Mar 26 2011                        Using Q4M       41
Functions for Exiting OWNER Mode

   queue_end
        Deletes the owned row and exits OWNER mode
   queue_abort
        Releases (instead of deleting) the owned row and
         exits OWNER mode
        Close of a MySQL connection does the same thing




Mar 26 2011                 Using Q4M                   42
Relaying and Routing Messages




Mar 26 2011               Using Q4M           43
The Model

   Relay (or router) consists of more than 3
    processes, 2 conns
   No losses, no duplicates on crash or
    disconnection



              Q4M Table                   Q4M Table
               (source)   Relay Program    (dest.)


Mar 26 2011                 Using Q4M                 44
Internal Row ID

   Every row have a internal row ID
        invisible from Q4M table definition
        monotonically increasing 64-bit integer
   Used for detecting duplicates
        Use two functions to skip duplicates
        Data loss prevented by using queue_wait /
         queue_end



Mar 26 2011                  Using Q4M               45
queue_rowid()

   Returns row ID of the OWNED row (if
    any)
        Returns NULL if no row is OWNED
   Call when retrieving data from source




Mar 26 2011                Using Q4M        46
queue_set_srcid(src_tbl_id, mode, src_row_id)

   Call before inserting a row to destination
    table
        Checks if the row is already inserted into the
         table, and ignores next INSERT if true
   Parameters:
        src_tbl_id - id to determine source table (0〜63)
        mode - "a" to drop duplicates, "w" to reset
        src_row_id - row ID obtained from source table


Mar 26 2011                  Using Q4M                      47
Pseudo Code

   Relays data from src_tbl to dest_tbl
   while (true) {
    # wait for data
    SELECT queue_wait(src_tbl) =>src_db;



    # read row and rowid
    row := (SELECT * FROM src_tbl =>src_db);
   rowid := (SELECT queue_rowid() =>src_db);



    # insert the row after setting srcid
    SELECT queue_set_srcid(src_tbl_id, 'a', rowid) =>dest_db;
    INSERT INTO dest_tbl (row) =>dest_db;
Mar 26 2011                            Using Q4M                48
q4m-forward

   Simple forwarder script
        installed into mysql-dir/bin

   usage: q4m-forward [options] src_addrdest_addr
   example:
    % support-files/q4m-forward 
     "dbi:mysql:database=db1;table=tbl1;user=foo;password=XXX" 
     "dbi:mysql:database=db2;table=tbl2;host=bar;user=foo"
   options:
    --reset    reset duplicate check info.
    --sender=idx slot no. used for checking duplicates (0..63, default: 0)
    --help




Mar 26 2011                                         Using Q4M                49
Limitations and the Future of Q4M




Mar 26 2011                 Using Q4M             50
Things that Need to be Fixed

   Table compactions is a blocking
    operation
        runs when live data becomes <25% of log file
        very bad, though not as bad as it seems
              it's fast since it's a sequential write operation

   Relays are slow
        since transfer is done row-by-row
   Binlog does not work
        since MQ replication should be synchronous
Mar 26 2011                          Using Q4M                     51
Future of Q4M (maybe)

   Support for MySQL 5.5
        not request yet from current users :-p
   2-phase commit with other storage
    engines
        queue consumption and InnoDB updates can
         become atomic operation




Mar 26 2011                 Using Q4M               52
Thank you

              http://q4m.github.com/




Mar 26 2011          Using Q4M         53

Weitere ähnliche Inhalte

Was ist angesagt?

Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1sprdd
 
Training Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringTraining Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringContinuent
 
Leveraging Open Source Integration with WSO2 Enterprise Service Bus
Leveraging Open Source Integration with WSO2 Enterprise Service BusLeveraging Open Source Integration with WSO2 Enterprise Service Bus
Leveraging Open Source Integration with WSO2 Enterprise Service BusWSO2
 
Kafka in action - Tech Talk - Paytm
Kafka in action - Tech Talk - PaytmKafka in action - Tech Talk - Paytm
Kafka in action - Tech Talk - PaytmSumit Jain
 
CSM Storage Debugging
CSM Storage DebuggingCSM Storage Debugging
CSM Storage DebuggingzOSCommserver
 
Multi-Stage Clos Networks in Router Architecture
Multi-Stage Clos Networks in Router ArchitectureMulti-Stage Clos Networks in Router Architecture
Multi-Stage Clos Networks in Router Architecturelawuah
 
Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocolsAbhishek Kesharwani
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocolsIffat Anjum
 
VPC PPT @NETWORKERSHOME
VPC PPT @NETWORKERSHOMEVPC PPT @NETWORKERSHOME
VPC PPT @NETWORKERSHOMEnetworkershome
 
netapp c-mode terms
netapp c-mode termsnetapp c-mode terms
netapp c-mode termsAshwin Pawar
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization Ganesan Narayanasamy
 
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use Cases
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use CasesLayer 123 SDN World Congress OpenDaylight Service Function Chaining Use Cases
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use Casesabhijit2511
 
MULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALAMULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALASaikiran Panjala
 
OSSV [Open System SnapVault]
OSSV [Open System SnapVault]OSSV [Open System SnapVault]
OSSV [Open System SnapVault]Ashwin Pawar
 
INSTRUCTION PIPELINING
INSTRUCTION PIPELININGINSTRUCTION PIPELINING
INSTRUCTION PIPELININGrubysistec
 

Was ist angesagt? (19)

Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1Wheeler w 0450_linux_file_systems1
Wheeler w 0450_linux_file_systems1
 
Training Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten ClusteringTraining Slides: Basics 102: Introduction to Tungsten Clustering
Training Slides: Basics 102: Introduction to Tungsten Clustering
 
Leveraging Open Source Integration with WSO2 Enterprise Service Bus
Leveraging Open Source Integration with WSO2 Enterprise Service BusLeveraging Open Source Integration with WSO2 Enterprise Service Bus
Leveraging Open Source Integration with WSO2 Enterprise Service Bus
 
Kafka in action - Tech Talk - Paytm
Kafka in action - Tech Talk - PaytmKafka in action - Tech Talk - Paytm
Kafka in action - Tech Talk - Paytm
 
CSM Storage Debugging
CSM Storage DebuggingCSM Storage Debugging
CSM Storage Debugging
 
Multi-Stage Clos Networks in Router Architecture
Multi-Stage Clos Networks in Router ArchitectureMulti-Stage Clos Networks in Router Architecture
Multi-Stage Clos Networks in Router Architecture
 
Multicasting and multicast routing protocols
Multicasting and multicast routing protocolsMulticasting and multicast routing protocols
Multicasting and multicast routing protocols
 
Multicastingand multicast routing protocols
Multicastingand multicast routing protocolsMulticastingand multicast routing protocols
Multicastingand multicast routing protocols
 
IP Multicasting
IP MulticastingIP Multicasting
IP Multicasting
 
VPC PPT @NETWORKERSHOME
VPC PPT @NETWORKERSHOMEVPC PPT @NETWORKERSHOME
VPC PPT @NETWORKERSHOME
 
netapp c-mode terms
netapp c-mode termsnetapp c-mode terms
netapp c-mode terms
 
OpenPOWER Application Optimization
OpenPOWER Application Optimization OpenPOWER Application Optimization
OpenPOWER Application Optimization
 
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use Cases
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use CasesLayer 123 SDN World Congress OpenDaylight Service Function Chaining Use Cases
Layer 123 SDN World Congress OpenDaylight Service Function Chaining Use Cases
 
Ip multicast
Ip multicastIp multicast
Ip multicast
 
MULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALAMULTICAST BY SAIKIRAN PANJALA
MULTICAST BY SAIKIRAN PANJALA
 
Aw25293296
Aw25293296Aw25293296
Aw25293296
 
IP Multicast Routing
IP Multicast RoutingIP Multicast Routing
IP Multicast Routing
 
OSSV [Open System SnapVault]
OSSV [Open System SnapVault]OSSV [Open System SnapVault]
OSSV [Open System SnapVault]
 
INSTRUCTION PIPELINING
INSTRUCTION PIPELININGINSTRUCTION PIPELINING
INSTRUCTION PIPELINING
 

Andere mochten auch

Authentic Assessment
Authentic AssessmentAuthentic Assessment
Authentic Assessmentirongirl
 
Presentation bulgaria o_drzavi
Presentation bulgaria o_drzaviPresentation bulgaria o_drzavi
Presentation bulgaria o_drzaviGavranica
 
Presenting malta etwinning project (dorianne agius)
Presenting malta    etwinning project (dorianne agius)Presenting malta    etwinning project (dorianne agius)
Presenting malta etwinning project (dorianne agius)Gavranica
 
彩蝶计划2008版
彩蝶计划2008版彩蝶计划2008版
彩蝶计划2008版mingxia
 
Q4M Microblogcon
Q4M MicroblogconQ4M Microblogcon
Q4M MicroblogconKazuho Oku
 
Вебинары как новая интерактивная форма обучения
Вебинары как новая интерактивная форма обученияВебинары как новая интерактивная форма обучения
Вебинары как новая интерактивная форма обученияMoscow State University
 
Beavers by Reagan
Beavers by ReaganBeavers by Reagan
Beavers by Reaganvebrya
 
Internet Security
Internet SecurityInternet Security
Internet Securitybruce761207
 
Connect the Dots: Set yourself apart in a saturated market.
Connect the Dots: Set yourself apart in a saturated market.Connect the Dots: Set yourself apart in a saturated market.
Connect the Dots: Set yourself apart in a saturated market.Footprint Consulting Group
 
CONVIVENCIA
CONVIVENCIACONVIVENCIA
CONVIVENCIAguisse21
 
en yüksek viyadük
en yüksek viyadüken yüksek viyadük
en yüksek viyadükhalid şen
 

Andere mochten auch (20)

Authentic Assessment
Authentic AssessmentAuthentic Assessment
Authentic Assessment
 
Vei til Nervei
Vei til NerveiVei til Nervei
Vei til Nervei
 
Thơ Dương Tường
Thơ Dương TườngThơ Dương Tường
Thơ Dương Tường
 
Presentation bulgaria o_drzavi
Presentation bulgaria o_drzaviPresentation bulgaria o_drzavi
Presentation bulgaria o_drzavi
 
Presenting malta etwinning project (dorianne agius)
Presenting malta    etwinning project (dorianne agius)Presenting malta    etwinning project (dorianne agius)
Presenting malta etwinning project (dorianne agius)
 
彩蝶计划2008版
彩蝶计划2008版彩蝶计划2008版
彩蝶计划2008版
 
Q4M Microblogcon
Q4M MicroblogconQ4M Microblogcon
Q4M Microblogcon
 
Вебинары как новая интерактивная форма обучения
Вебинары как новая интерактивная форма обученияВебинары как новая интерактивная форма обучения
Вебинары как новая интерактивная форма обучения
 
Beavers by Reagan
Beavers by ReaganBeavers by Reagan
Beavers by Reagan
 
Internet Security
Internet SecurityInternet Security
Internet Security
 
Eclipse@eBay
Eclipse@eBayEclipse@eBay
Eclipse@eBay
 
Del.Icio.Us
Del.Icio.UsDel.Icio.Us
Del.Icio.Us
 
網路安全
網路安全網路安全
網路安全
 
Kkkah
KkkahKkkah
Kkkah
 
Trip
TripTrip
Trip
 
Connect the Dots: Set yourself apart in a saturated market.
Connect the Dots: Set yourself apart in a saturated market.Connect the Dots: Set yourself apart in a saturated market.
Connect the Dots: Set yourself apart in a saturated market.
 
24 Reasons...
24 Reasons...24 Reasons...
24 Reasons...
 
CONVIVENCIA
CONVIVENCIACONVIVENCIA
CONVIVENCIA
 
Project1 Example
Project1 ExampleProject1 Example
Project1 Example
 
en yüksek viyadük
en yüksek viyadüken yüksek viyadük
en yüksek viyadük
 

Ähnlich wie Using Q4M - a message queue for MySQL #osdc.tw

オープンソース開発者がDeNAを選ぶ理由
オープンソース開発者がDeNAを選ぶ理由オープンソース開発者がDeNAを選ぶ理由
オープンソース開発者がDeNAを選ぶ理由Kazuho Oku
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogJoe Stein
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMark Swarbrick
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...confluent
 
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...Databricks
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Continuent
 
Webinar Slides: MySQL Native Replication vs. Tungsten Clustering
Webinar Slides: MySQL Native Replication vs. Tungsten ClusteringWebinar Slides: MySQL Native Replication vs. Tungsten Clustering
Webinar Slides: MySQL Native Replication vs. Tungsten ClusteringContinuent
 
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...OpenNebula Project
 
Monitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaMonitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaNETWAYS
 
Sneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseSneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseNavita Sood
 
Sneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseSneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseSerena Software
 
Webinar-Linux Networking is Awesome
Webinar-Linux Networking is AwesomeWebinar-Linux Networking is Awesome
Webinar-Linux Networking is AwesomeCumulus Networks
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureMohammad Tahoon
 
1.4 System Arch.pdf
1.4 System Arch.pdf1.4 System Arch.pdf
1.4 System Arch.pdfssuser8b6c85
 
PLNOG 13: Michał Dubiel: OpenContrail software architecture
PLNOG 13: Michał Dubiel: OpenContrail software architecturePLNOG 13: Michał Dubiel: OpenContrail software architecture
PLNOG 13: Michał Dubiel: OpenContrail software architecturePROIDEA
 
Mpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-marchMpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-marchAricent
 

Ähnlich wie Using Q4M - a message queue for MySQL #osdc.tw (20)

オープンソース開発者がDeNAを選ぶ理由
オープンソース開発者がDeNAを選ぶ理由オープンソース開発者がDeNAを選ぶ理由
オープンソース開発者がDeNAを選ぶ理由
 
HA in OpenStack service - meetup #9
HA in OpenStack service - meetup #9HA in OpenStack service - meetup #9
HA in OpenStack service - meetup #9
 
Streaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit LogStreaming Processing with a Distributed Commit Log
Streaming Processing with a Distributed Commit Log
 
MySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats newMySQL Manchester TT - 5.7 Whats new
MySQL Manchester TT - 5.7 Whats new
 
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
Kafka Cluster Federation at Uber (Yupeng Fui & Xiaoman Dong, Uber) Kafka Summ...
 
Clustering
ClusteringClustering
Clustering
 
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
Using Spark Mllib Models in a Production Training and Serving Platform: Exper...
 
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
Training Slides: Basics 107: Simple Tungsten Replicator Installation to Extra...
 
Spring RabbitMQ
Spring RabbitMQSpring RabbitMQ
Spring RabbitMQ
 
Webinar Slides: MySQL Native Replication vs. Tungsten Clustering
Webinar Slides: MySQL Native Replication vs. Tungsten ClusteringWebinar Slides: MySQL Native Replication vs. Tungsten Clustering
Webinar Slides: MySQL Native Replication vs. Tungsten Clustering
 
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...
OpenNebulaConf 2013 - Monitoring Large-scale Cloud Infrastructures with OpenN...
 
Monitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebulaMonitoring Large-scale Cloud Infrastructures with OpenNebula
Monitoring Large-scale Cloud Infrastructures with OpenNebula
 
Sneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseSneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF Release
 
Sneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF ReleaseSneak Peek into the New ChangeMan ZMF Release
Sneak Peek into the New ChangeMan ZMF Release
 
Apache Basics
Apache BasicsApache Basics
Apache Basics
 
Webinar-Linux Networking is Awesome
Webinar-Linux Networking is AwesomeWebinar-Linux Networking is Awesome
Webinar-Linux Networking is Awesome
 
Teradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system ArchitectureTeradata introduction - A basic introduction for Taradate system Architecture
Teradata introduction - A basic introduction for Taradate system Architecture
 
1.4 System Arch.pdf
1.4 System Arch.pdf1.4 System Arch.pdf
1.4 System Arch.pdf
 
PLNOG 13: Michał Dubiel: OpenContrail software architecture
PLNOG 13: Michał Dubiel: OpenContrail software architecturePLNOG 13: Michał Dubiel: OpenContrail software architecture
PLNOG 13: Michał Dubiel: OpenContrail software architecture
 
Mpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-marchMpls conference 2016-data center virtualisation-11-march
Mpls conference 2016-data center virtualisation-11-march
 

Mehr von Kazuho Oku

HTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときKazuho Oku
 
QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7Kazuho Oku
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来Kazuho Oku
 
TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話Kazuho Oku
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondKazuho Oku
 
Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyKazuho Oku
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsivenessKazuho Oku
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsivenessKazuho Oku
 
Developing the fastest HTTP/2 server
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 serverKazuho Oku
 
TLS & LURK @ IETF 95
TLS & LURK @ IETF 95TLS & LURK @ IETF 95
TLS & LURK @ IETF 95Kazuho Oku
 
HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向Kazuho Oku
 
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先Kazuho Oku
 
Cache aware-server-push in H2O version 1.5
Cache aware-server-push in H2O version 1.5Cache aware-server-push in H2O version 1.5
Cache aware-server-push in H2O version 1.5Kazuho Oku
 
HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計Kazuho Oku
 
H2O - making the Web faster
H2O - making the Web fasterH2O - making the Web faster
H2O - making the Web fasterKazuho Oku
 
H2O - making HTTP better
H2O - making HTTP betterH2O - making HTTP better
H2O - making HTTP betterKazuho Oku
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP serverKazuho Oku
 
JSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedJSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedKazuho Oku
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法Kazuho Oku
 
JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013Kazuho Oku
 

Mehr von Kazuho Oku (20)

HTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないときHTTP/2で 速くなるとき ならないとき
HTTP/2で 速くなるとき ならないとき
 
QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7QUIC標準化動向 〜2017/7
QUIC標準化動向 〜2017/7
 
HTTP/2の課題と将来
HTTP/2の課題と将来HTTP/2の課題と将来
HTTP/2の課題と将来
 
TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話TLS 1.3 と 0-RTT のこわ〜い話
TLS 1.3 と 0-RTT のこわ〜い話
 
Reorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and BeyondReorganizing Website Architecture for HTTP/2 and Beyond
Reorganizing Website Architecture for HTTP/2 and Beyond
 
Recent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using rubyRecent Advances in HTTP, controlling them using ruby
Recent Advances in HTTP, controlling them using ruby
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsiveness
 
Programming TCP for responsiveness
Programming TCP for responsivenessProgramming TCP for responsiveness
Programming TCP for responsiveness
 
Developing the fastest HTTP/2 server
Developing the fastest HTTP/2 serverDeveloping the fastest HTTP/2 server
Developing the fastest HTTP/2 server
 
TLS & LURK @ IETF 95
TLS & LURK @ IETF 95TLS & LURK @ IETF 95
TLS & LURK @ IETF 95
 
HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向HTTPとサーバ技術の最新動向
HTTPとサーバ技術の最新動向
 
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
ウェブを速くするためにDeNAがやっていること - HTTP/2と、さらにその先
 
Cache aware-server-push in H2O version 1.5
Cache aware-server-push in H2O version 1.5Cache aware-server-push in H2O version 1.5
Cache aware-server-push in H2O version 1.5
 
HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計HTTP/2時代のウェブサイト設計
HTTP/2時代のウェブサイト設計
 
H2O - making the Web faster
H2O - making the Web fasterH2O - making the Web faster
H2O - making the Web faster
 
H2O - making HTTP better
H2O - making HTTP betterH2O - making HTTP better
H2O - making HTTP better
 
H2O - the optimized HTTP server
H2O - the optimized HTTP serverH2O - the optimized HTTP server
H2O - the optimized HTTP server
 
JSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons LearnedJSON SQL Injection and the Lessons Learned
JSON SQL Injection and the Lessons Learned
 
JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法JSX 速さの秘密 - 高速なJavaScriptを書く方法
JSX 速さの秘密 - 高速なJavaScriptを書く方法
 
JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013JSX の現在と未来 - Oct 26 2013
JSX の現在と未来 - Oct 26 2013
 

Kürzlich hochgeladen

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...panagenda
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 

Kürzlich hochgeladen (20)

Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
Why device, WIFI, and ISP insights are crucial to supporting remote Microsoft...
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 

Using Q4M - a message queue for MySQL #osdc.tw

  • 1. Using Q4M a message queue storage engine for MySQL Kazuho Oku
  • 2. Who am I? Name: Kazuho Oku (奥一穂) Original Developer of Palmscape / Xiino The oldest web browser for Palm OS Worked Cybozu Labs in 2005-2010 Research subsidiary of Cybozu, Inc. in Japan Developed Japanize / Mylingual, Q4M, etc. Now working at DeNA Co., Ltd. with the developers of the HandlerSocketplugin Mar 26 2011 Using Q4M 2
  • 3. What is Q4M? A message queue runs as a storage plugin of MySQL 5.1 Why is it a MySQLplugin? accessible by using existing MySQL clients no need for a new client library administrable by using SQL friendly to DB admins Mar 26 2011 Using Q4M 3
  • 4. Design Goals of Q4M Robust Does not lose data on OS crash or power failure necessary for Tokyo wo. nuclear power plants… orz Fast Transfer thousands of messages per second Easy to Use Use SQL for access / maintenance Integration into MySQL no more separate daemons to take care of Mar 26 2011 Using Q4M 4
  • 5. Users of Q4M Many leading web services in Japan DeNA Co., Ltd. livedoor Co., Ltd. mixi, Inc. Zynga Japan (formerly Unoh, Inc.) Mar 26 2011 Using Q4M 5
  • 6. Agenda What MQ is in General Applications of Q4M Brief Tutorial Mar 26 2011 Using Q4M 6
  • 7. What is a Message Queue? Mar 26 2011 Using Q4M 7
  • 8. What is a Message Queue? Middleware for persistent asynchronous communication communicate between fixed pairs (parties) a.k.a. Message Oriented Middleware MQ is intermediate storage RDBMS is persistent storage Senders / receivers may go down Mar 26 2011 Using Q4M 8
  • 9. Minimal Configuration of a MQ Senders and receivers access a single queue Sender Receiver Queue Mar 26 2011 Using Q4M 9
  • 10. MQ and Relays Separate queue for sender and receiver Messages relayed between queues Relay Sender Receiver Queue Queue Mar 26 2011 Using Q4M 10
  • 11. Merits of Message Relays Destination can be changed easily Relays may transfer messages to different locations depending on their headers Robustness against network failure no loss or duplicates when the relay fails Logging and Multicasting, etc. Mar 26 2011 Using Q4M 11
  • 12. Message Brokers Publish / subscribe model Separation between components and their integration Components read / write to predefined queues Integration is definition of routing rules between the message queues Messages are often transformed (filtered) within the relay agent Mar 26 2011 Using Q4M 12
  • 13. What about Q4M? Q4M itself is a message queue Can connect Q4M instances to create a message relay Provides API for creating message relays and brokers Mar 26 2011 Using Q4M 13
  • 14. Performance of Q4M over 7,000 mess/sec. message size: avg. 512 bytes syncing to disk Outperforming most needs if you need more, just scale out Can coexist with other storage engines without sacrificing their performance see http://labs.cybozu.co.jp/blog/kazuhoatwork/2008/06/q4m_06_release_and_benchmarks.php Mar 26 2011 Using Q4M 14
  • 15. Applications of Q4M Mar 26 2011 Using Q4M 15
  • 16. Asynchronous Updates DeNA uses Q4M for sending notifications to users asynchronously http://engineer.dena.jp/2010/03/dena-technical-seminar-1- 2.html Mar 26 2011 Using Q4M 16
  • 17. Delay Peak Demands Mixi (Japan's one of the largest SNS) uses Q4M to buffer writes to DB, to delay peak demands from http://alpha.mixi.co.jp/blog/?p=272 Mar 26 2011 Using Q4M 17
  • 18. Connecting Distant Servers Pathtraq uses Q4M to create a relay between its database and content analysis processes → Contents to be analyzed → Content Pathtraq MySQL conn. Analysis DB over SSL,gzip Processes ← Results of the analysis ← Mar 26 2011 Using Q4M 18
  • 19. Prefetch Data livedoor Reader (web-based feed aggregator) uses Q4M to prefetch data from database to memcached uses Q4M for scheduling web crawlers as well from http://d.hatena.ne.jp/mala/20081212/1229074359 Mar 26 2011 Using Q4M 19
  • 20. Scheduling Web Crawlers Web crawlers with retry-on-error Sample code included in Q4M dist. If failed to fetch, store URL in retry queue Store Result Read URL Spiders URL DB Request Queue Retry Queue Re- scheduler Mar 26 2011 Using Q4M 20
  • 21. Delayed Content Generation Hatetter(RSS feed-to-twitter-API gateway) uses Q4M to delay content generation Source code: github.com/yappo/website-hatetter Mar 26 2011 Using Q4M 21
  • 22. Installing Q4M Mar 26 2011 Using Q4M 22
  • 23. Installing Q4M Compatible with MySQL 5.1 Download from q4m.github.com Binary releases available for some platforms Installing from source: requires source code of MySQL ./configure && make && make install run support-files/install.sql Mar 26 2011 Using Q4M 23
  • 24. Configuration Options of Q4M --with-sync=no|fsync|fdatasync|fcntl Controls synchronization to disk default: fdatasync on linux --enable-mmap Mmap’ed reads lead to higher throughput default: yes --with-delete=pwrite|msync msyncrecommended on linux>=2.6.20 if you need really high performance Mar 26 2011 Using Q4M 24
  • 25. Q4M Basics Mar 26 2011 Using Q4M 25
  • 26. The Model Various publishers write to queue Set of subscribers consume the entries in queue Publisher Publisher Q4M table Subscribers Publisher Mar 26 2011 Using Q4M 26
  • 27. Creating a Q4M Table  ENGINE=QUEUE creates mysql> CREATE TABLE qt ( -> id int(10) unsigned NOT NULL, a Q4M table -> message varchar(255) NOT NULL -> ) ENGINE=QUEUE; Query OK, 0 rows affected (0.42 sec)  No primary keys or indexes  Sorted by insertion order (it’s a queue) Mar 26 2011 Using Q4M 27
  • 28. Modifying Data on a Q4M Table  No restrictions for mysql> INSERT INTO qt (id,message) -> VALUES INSERT and DELETE -> (1,'Hello'), -> (2,'Bonjour'), -> (3,'Hola');  No support for UPDATE Query OK, 3 rows affected (0.02 sec) mysql> SELECT * FROM qt; +----+---------+ | id | message | +----+---------+ | 1 | Hello | | 2 | Bonjour | | 3 | Hola | +----+---------+ 3 rows in set (0.00 sec) Mar 26 2011 Using Q4M 28
  • 29. SELECT from a Q4M Table Works the same as mysql> SELECT * FROM qt; +----+---------+ | id | message | other storage +----+---------+ | 1 | Hello | engines | 2 | Bonjour | | 3 | Hola | +----+---------+ SELECT COUNT(*) is 3 rows in set (0.00 sec) cached mysql> SELECT COUNT(*) FROM qt; +----------+ | COUNT(*) | +----------+ | 3| +----------+ 1 row in set (0.00 sec) How to subscribe to a queue? Mar 26 2011 Using Q4M 29
  • 30. Calling queue_wait()  After calling, only one mysql> SELECT * FROM qt; +----+---------+ | id | message | row becomes visible +----+---------+ | 1 | Hello | from the connection | 2 | Bonjour | | 3 | Hola | +----+---------+ 3 rows in set (0.00 sec) mysql> SELECT queue_wait('qt'); +------------------+ | queue_wait('qt') | +------------------+ | 1| +------------------+ 1 row in set (0.00 sec) mysql> SELECT * FROM qt; +----+---------+ | id | message | +----+---------+ | 1 | Hello | +----+---------+ 1 row in set (0.00 sec) Mar 26 2011 Using Q4M 30
  • 31. OWNER Mode and NON-OWNER Mode In OWNER mode, only the OWNED row is visible OWNED row becomes invisible from other connections rows of other storage engines are visible NON-OWNER Mode queue_wait() OWNER Mode 1,'Hello' 1,'Hello' 2,'Bonjour' queue_end() 3,'Hola' queue_abort() Mar 26 2011 Using Q4M 31
  • 32. Returning to NON-OWNER mode  By calling queue_abort, mysql> SELECT QUEUE_ABORT(); +---------------+ the connection returns | QUEUE_ABORT() | +---------------+ to NON-OWNER mode | 1| +---------------+ 1 row in set (0.00 sec) mysql> SELECT * FROM qt; +----+---------+ | id | message | +----+---------+ | 1 | Hello | | 2 | Bonjour | | 3 | Hola | +----+---------+ 3 rows in set (0.01 sec) Mar 26 2011 Using Q4M 32
  • 33. Consuming a Row  By calling mysql> SELECT queue_wait('qt'); (snip) mysql> SELECT * FROM qt; queue_end, the OWNED +----+---------+ | id | message | row is deleted, and +----+---------+ | 1 | Hello | connection returns to +----+---------+ 1 row in set (0.01 sec) NON-OWNER mode mysql> SELECT queue_end(); +-------------+ | queue_end() | +-------------+ | 1| +-------------+ 1 row in set (0.01 sec) mysql> SELECT * FROM qt; +----+---------+ | id | message | +----+---------+ | 2 | Bonjour | | 3 | Hola | +----+---------+ 2 rows in set (0.00 sec) Mar 26 2011 Using Q4M 33
  • 34. Writing a Subscriber  Call two functions: queue_wait, queue_end  Multiple subscribers can be run concurrently  each row in the queue is consumed only once while (true) { SELECT queue_wait('qt'); # switch to owner mode rows := SELECT * FROM qt; # obtain data if (count(rows) != 0) # if we have any data, then handle_row(rows[0]); # consume the row SELECT queue_end(); # erase the row from queue } Mar 26 2011 Using Q4M 34
  • 35. Writing a Subscriber (cont'd) Or call queue_wait as a condition Warning: conflicts with trigger-based insertions while (true) { rows := SELECT * FROM qt WHERE queue_wait('qt'); if (count(rows) != 0) handle_row(rows[0]); SELECT queue_end(); } Mar 26 2011 Using Q4M 35
  • 36. The Model – with code INSERT INTO queue ... Publisher while (true) { rows := SELECT * FROM qt WHERE queue_wait('qt'); if (count(rows) != 0) INSERT INTO queue ... handle_row(rows[0]); SELECT queue_end(); } Publisher Q4M table Subscribers INSERT INTO queue ... Publisher Mar 26 2011 Using Q4M 36
  • 37. Three Functions in Detail Mar 26 2011 Using Q4M 37
  • 38. queue_wait(table) Enters OWNER mode 0〜1 row becomes OWNED Enters OWNER mode even if no rows were available Default timeout: 60 seconds Returns 1 if a row is OWNED (0 on timeout) If called within OWNER mode, the owned row is deleted Mar 26 2011 Using Q4M 38
  • 39. Revisiting Subscriber Code Calls to queue_end just before queue_wait can be omitted while (true) { rows := SELECT * FROM qt WHERE queue_wait('qt'); if (count(rows) != 0) handle_row(rows[0]); SELECT queue_end(); } Mar 26 2011 Using Q4M 39
  • 40. Conditional queue_wait() Consume rows of certain condition Rows that do not match will be left untouched Only numeric columns can be checked Fast - condition tested once per each row examples: SELECT queue_wait('table:(col_a*3)+col_b<col_c'); SELECT queue_wait('table:retry_count<5'); Mar 26 2011 Using Q4M 40
  • 41. queue_wait(tbl_cond,[tbl_cond…,timeout]) Accepts multiple tables and timeout Data searched from leftmost table to right Returns table index (the leftmost table is 1) of the newly owned row Returns zero if no rows are being owned example: SELECT queue_wait('table_A','table_B',60); Mar 26 2011 Using Q4M 41
  • 42. Functions for Exiting OWNER Mode queue_end Deletes the owned row and exits OWNER mode queue_abort Releases (instead of deleting) the owned row and exits OWNER mode Close of a MySQL connection does the same thing Mar 26 2011 Using Q4M 42
  • 43. Relaying and Routing Messages Mar 26 2011 Using Q4M 43
  • 44. The Model Relay (or router) consists of more than 3 processes, 2 conns No losses, no duplicates on crash or disconnection Q4M Table Q4M Table (source) Relay Program (dest.) Mar 26 2011 Using Q4M 44
  • 45. Internal Row ID Every row have a internal row ID invisible from Q4M table definition monotonically increasing 64-bit integer Used for detecting duplicates Use two functions to skip duplicates Data loss prevented by using queue_wait / queue_end Mar 26 2011 Using Q4M 45
  • 46. queue_rowid() Returns row ID of the OWNED row (if any) Returns NULL if no row is OWNED Call when retrieving data from source Mar 26 2011 Using Q4M 46
  • 47. queue_set_srcid(src_tbl_id, mode, src_row_id) Call before inserting a row to destination table Checks if the row is already inserted into the table, and ignores next INSERT if true Parameters: src_tbl_id - id to determine source table (0〜63) mode - "a" to drop duplicates, "w" to reset src_row_id - row ID obtained from source table Mar 26 2011 Using Q4M 47
  • 48. Pseudo Code Relays data from src_tbl to dest_tbl while (true) { # wait for data SELECT queue_wait(src_tbl) =>src_db; # read row and rowid row := (SELECT * FROM src_tbl =>src_db); rowid := (SELECT queue_rowid() =>src_db); # insert the row after setting srcid SELECT queue_set_srcid(src_tbl_id, 'a', rowid) =>dest_db; INSERT INTO dest_tbl (row) =>dest_db; Mar 26 2011 Using Q4M 48
  • 49. q4m-forward Simple forwarder script installed into mysql-dir/bin usage: q4m-forward [options] src_addrdest_addr example: % support-files/q4m-forward "dbi:mysql:database=db1;table=tbl1;user=foo;password=XXX" "dbi:mysql:database=db2;table=tbl2;host=bar;user=foo" options: --reset reset duplicate check info. --sender=idx slot no. used for checking duplicates (0..63, default: 0) --help Mar 26 2011 Using Q4M 49
  • 50. Limitations and the Future of Q4M Mar 26 2011 Using Q4M 50
  • 51. Things that Need to be Fixed Table compactions is a blocking operation runs when live data becomes <25% of log file very bad, though not as bad as it seems it's fast since it's a sequential write operation Relays are slow since transfer is done row-by-row Binlog does not work since MQ replication should be synchronous Mar 26 2011 Using Q4M 51
  • 52. Future of Q4M (maybe) Support for MySQL 5.5 not request yet from current users :-p 2-phase commit with other storage engines queue consumption and InnoDB updates can become atomic operation Mar 26 2011 Using Q4M 52
  • 53. Thank you http://q4m.github.com/ Mar 26 2011 Using Q4M 53