MySQL 5.0

Penrose and MySQL 5.0

One of the new feature of MySQL 5.0 is triggers. Triggers are event-driven stored procedures that are attached to a specific table; the trigger code will fire for any write, even one that occurs on that table.

Paired with a new polling connector from Penrose (starting from 0.9.9 release), it allows a bi-directional synchronization between Penrose cache and MySQL tables.

Create Demo Database;

Populate the sample database by following this setup

Create Database Triggers

Populate the sample database with the triggers SQL script provided in PENROSE_HOME/samples/triggers.sql. Exececute the following commands inside a MySQL client:

use penrose_demo;
source PENROSE_HOME/samples/sql/triggers.sql;

Screencast of two way synchronization

Reference