Home |  MySQL Buzz |  FAQ |  Feeds |  Submit your blog feed |  Feedback |  Archive |  Aggregate feed RSS 2.0 English Deutsch Español Français Italiano 日本語 Русский Português 中文
Showing entries 1 to 30 of 31 Next 1 Older Entries

Displaying posts with tag: PlanetMySQL (en) (reset)

PECL/mysqlnd_ms: summer time, (connection) pool time – Fabric support internals
Employee +0 Vote Up -0Vote Down

The MySQL replication and load balancing plugin for PHP, PECL/mysqlnd_ms, aims to make using a cluster of MySQL servers instead of a single server as transparent as possible. Should you ever want to migrate your PHP app from a single MySQL server to any kind of MySQL cluster, install PECL/mysqlnd_ms and see how much breaks. A simple app, might need no code changes at all. Your APIs connect call remains unchanged, your query execution calls remain the same: one connection handle transparently switched to an appropriate cluster node (read-write splitting, weighted load

  [Read more...]
PECL/mysqlnd_ms: how failed XA transactions get fixed
Employee +0 Vote Up -0Vote Down

XA transactions are an open standard for distributed transactions. A distributed or global transaction can spawn multiple databases. XA transactions come handy, for example, when data sets are sharded over multiple servers and a business transaction affects multiple shards. The free MySQL Fabric tools help to setup and manage a sharded MySQL cluster. The development version of PECL/mysqlnd_ms 1.6 helps with XA transactions. It abstracts SQL details and acts as a transaction manager. The PHP MySQL driver kicks in when things go wrong and XA transactions show their nasty side: blocked servers. Good news: this is a rare case. Bad news: a

  [Read more...]
PECL/mysqlnd_ms: Distributed Transaction/XA support coming, e.g. for MySQL Fabric?
Employee +1 Vote Up -1Vote Down

The development version of PECL/mysqlnd_ms now has an very early version of distributed (2PC/XA) transaction support tailored for use with clusters of MySQL servers. XA transactions can span multiple servers in a cluster to ensure transaction guarantees among them. In real life, there is always, at some point, a sequence of work on your data for which atomicity, consistency, isolation, and durability must be given. The early generation of NoSQL sharding solutions has a weak spot here. How do you, as a developer, ensure a logical operation affecting two shards is either applied to both

  [Read more...]
PHP Unconference Europe, a legend. But lacking PHP…
Employee +1 Vote Up -0Vote Down

A legend is born: PHP Unconference Europe, Majorca. Nearly one hundred witnesses exist. The #phpuceu combines the proven concept of an unconference with the beauty of the island of majorca. Within a day after the end of the event, one third had bought a ticket for next years issue (May 9-10, 2015)! We all knew for years, unconferences work. We finally have one at a place that is easy to get and is just about perfect for any kind of visitor. Goal accomplished. Just a detail, PHP (partner happieness program) was missing…

The power of the people

Unconferences give power to the people. Participants gather in the morning to propose sessions and vote

  [Read more...]
Train your elePHPants for the PHP Unconf EU – Palma de Majorca!
Employee +1 Vote Up -0Vote Down

Majorca! May 2014 – 17./18! Could there be a better place and time on earth for the PHP EU Unconference: sun, fun, plenty of cheap flights, affordable accommodation? The PHP EU Unconference (tickets) is the international version of the national unconference. The national one frequently sells out quickly (>350 tickets) not only because it matches other conferences despite the ticket price of ~40 Euro only. Traditionally the international one, is more cosy with about 100 elePHPant lovers coming in the years before.

  [Read more...]
JS Unconf Hamburg 2014
Employee +0 Vote Up -0Vote Down

What happens when you take a well known receipt for unconferences, a group of young motivated and talented chefs, some 300 attendees is in the photos below. Some call it, the JavaScript Unconference Hamburg (JS Unconf). Some say, they had seasons in the sun. All I know is, I’ve been there and will come again!

The menu delivered by the chefs is as tasty and sophisticated as that of a commercial conference but it does not cost you a fortune. For some 40,– Euro you get two days packed with talks, intensive discussions and nice fellows. It is the people that drive an unconference and that becomes obvious the very moment you get involved. People know their jobs, they know your problems as they experienced the same. People have something to share and they want to share to with others!

How it works

Like the

  [Read more...]
PHP mysqlnd memory optimizations: from 49MB to 2MB
Employee +0 Vote Up -0Vote Down

Inspired by Antony, Andrey has implemented a memory optimization for the PHP mysqlnd library. Depending on your usage pattern and the actual query, memory used for result sets is less and free’d earlier to be reused by the PHP engine. In other cases, the optimization will consume about the same or even more memory. The additional choice is currently available with mysqli only.

From the network line into your script

Many wheels start spinning when mysqli_query() is called. All the PHP MySQL APIs/extensions (mysqli, PDO_MySQL, mysql) use a client library that handles the networking details and provides a C API to the C extensions. Any recent PHP will default to use the mysqlnd library. The library speaks

  [Read more...]
The performance penalty of the early MySQL Fabric support for PHP
Employee +1 Vote Up -0Vote Down

PECL/mysqlnd_ms 1.6 is currently being modified to support sharding and fully automatic server and client failover when using MySQL Fabric (slides) to manage a farm of MySQL servers. PECL/mysqlnd_ms is a mostly transparent load balancer that works with all PHP MySQL APIs (PDO_MySQL, mysqli, …). The idea is, that if, for example, a MySQL server fails, the plugin talks to MySQL Fabric to learn about alternative servers that Fabric has provisioned automatically. This “talks to” gives implies a performance penalty for applications. One worth looking at, to

  [Read more...]
The early MySQL Fabric sharding support for PHP
Employee +0 Vote Up -0Vote Down

The MySQL Fabric framework brings two major features: automatic client- and server-side failover and sharding. The manual hints, you need a “Fabric aware driver” for this but it does not list one for PHP. First, you don’t necessarily need new drivers! Second, the "driver" for PHP is the current development version of the PECL/mysqlnd_ms replication and load balancing plugin. The plugin covers the sharding but not the failover/HA quickstart example of Fabric: how the plugin works and why you should not use the plugin – yet.

Partial  [Read more...]

Using MySQL Fabric from any programming language
Employee +2 Vote Up -0Vote Down

MySQL Fabric is a framework for MySQL Replication high availability, automatic failover and sharding. Technically, a MySQL Fabric daemon monitors a set of MySQL servers and takes appropriate actions upon failure. Clients use Fabric aware drivers to learn about failed servers and shards to distribute queries accordingly. Simple to understand, simple to sell, simple to raise false expectations and simple to fail [, dear Sales]. With the usual blog posts telling only the story of the first three sentences, major parts of the story are covered in silence.

Development preview = announcement of a vision != ready

You first challenge will be to find the documentation for the MySQL Fabric development preview. From the documentation overview page it takes three clicks down to the server side documentation for Fabric:

  •   [Read more...]
    PHP Memcache access to MySQL 5.7, faster? Redis?
    Employee +2 Vote Up -0Vote Down

    PHP users can use two client protocols to query MySQL 5.6 and later. Not only standard SQL access but also faster key-value access to InnoDB tables is possible using the Memcache protocol. The MySQL benchmark team reports crazy figures. Of course, on hardware that makes the average PHP meetup visitor roll his eyes and say “yeah, Oracle, *yawn*…”. I’ve repeated my plain PHP benchmarks on an i3 desktop. And, I’ve added Redis to the game.

    Short recap

    Some ten years ago, colleaguages teached me that some 50% of the time processing a simple SELECT column_a, column_b FROM table

      [Read more...]
    Data massage: how databases have been scaled from one to one million nodes
    Employee +0 Vote Up -0Vote Down

    Despite the CAP theorem, databases have been scaled from one to one million nodes. Globally distributed, highly available and fast. Databases supporting ACID transactions. How? A story and slides from a three hours workshop at the PHP Summit 2013 (Berlin)…

    Data massage: How databases have been scaled from one to one million nodes from Ulf Wendel

    Please note: long, deep dive, quite some theory. And,

      [Read more...]
    MySQL Fabric’s initial decision on data models and transactions put into perspective
    Employee +1 Vote Up -0Vote Down

    When you design a distributed database you are faced with a variety of choices each having its well known pro’s and con’s. MySQL Fabric made an intial decision for one design. Let me try to put in context of NoSQL approaches to degree I understand the matter. Understanding the data model is key to understanding Fabric. There are limits: by design.

    Fabric?

    MySQL Fabric is an administration tool to build large “farms” of MySQL servers. In its most basic form, a farm is a collection of MySQL Replication clusters. In its most advanced form, a farm is a collection of MySQL Replication clusters with sharding on top.

    There are plenty of presentations on slideshare and blog postings on PlanetMySQL to get you started. If you

      [Read more...]
    MySQL 5.7: SQL functions for JSON
    Employee +2 Vote Up -0Vote Down

    For decades MySQL has considered BLOB a sink for data junk that didn’t fit the strictly typed SQL bill. As the outside world began voting for JavaScript, JSON and key-value/key-document stores, TEXT/BLOB was rediscovered as the only way to store JSON inside MySQL. But having no SQL support for the JSON serialization format, JSON remained junk for MySQL. Community developed SQL functions could not cure the issue. That said, MySQL 5.7 introduces SQL functions to work on JSON documents! MySQL slowly takes a different position on JSON.

    From the labyrinth: labs.mysql.com

    In the recent past, MySQL has developed a talent hiding feature previews at http://labs.mysql.com/. This is where you find

      [Read more...]
    MySQL 5.7 Fabric: any good?
    Employee +0 Vote Up -0Vote Down

    MySQL 5.7 has sharding built-in through MySQL Fabric (Lab Release). And, MySQL has scaled the marketing team to handle 500.000 customer requests/s – or, was it MySQL 5.7 query throughput? Whatever. MySQL Fabric frees you from implementing sharding yourself. MySQL Fabric simplifies the management of MySQL Replication clusters of any size.

    Is it any good? Yes, but MySQL must not stop here. This is not enough. MySQL is still a little too much behind trend setters.

    MySQL 5.7 Fabric: High Availability and Sharding from Ulf Wendel

      [Read more...]
    PoC: Using a Group Communication System (Isis2) to improve MySQL Replication HA
    Employee +2 Vote Up -0Vote Down

    Modern NoSQL solutions make good, old MySQL Replication appear weak on High Availability (HA). Basically, MySQL users have three choices for MySQL Replication HA: give up on HA, believe that doubling single points of failures means HA, or go for a proper but complex solution. Albeit, as NoSQL world and competition proves, solid HA can be dead simple: embed a Group Communication System (GCS) into MySQL! No single point of failure and near zero client deployment is doable. In parts, the proposal surpassed Pacemaker/Corosync. Read on: story, slides, experimental code.

      [Read more...]
    Connecting MySQL and the Dojo Toolkit: MySQL data store
    Employee +1 Vote Up -0Vote Down

    Based on my own limited experience with the Dojo Toolkit, you either love or hate it. First, I disliked the steep learning curve. After a few days, I began to enjoy it, for example, because of the Dijit interface vodoo: spreadsheet (data grid), auto-completion combobox, effects & animation… Many of these GUI elements can be connected to a dojo store. A store is responsible for accessing and manipulating data.

    Needless to say how easy it is to populate a sortable, … data grid using a store. Based on the proxy sketched in the previous post, I’ve

      [Read more...]
    Connecting MySQL and the Dojo Toolkit (JavaScript): basics
    Employee +2 Vote Up -0Vote Down

    Over the years JavaScript has become an integral part in every web developers life. The Dojo Toolkit is one of many JavaScript frameworks offering language goodies and interface voodo. It may not be the most used framework but it is a certain beauty to it – once you get used to it. The steep learning curve may be a bit in its way to success. However, to demo how to connect from browser-side JavaScript to MySQL it is about perfect as all its bells and whistles show what can be done, given enough time…

    Feel free to skip all the recap sections, if you are familiar with the very basics of AJAX/JSONP.

    Recap: JavaScript in a LAMP application

    If your web site is driven by MySQL, a mix of a script language

      [Read more...]
    PHP: PECL/mysqlnd_ms 1.6 – automatic retry loop for transient errors
    Employee +1 Vote Up -0Vote Down

    PECL/mysqlnd_ms is client-side load balancing driver plugin for PHP MySQL that aims to increase distribution transparency when using any MySQL based cluster: failover, read-write splitting, abstraction on consistency (e.g. read-your-writes), partitioning/sharding support, … it’s all there. Until a few minutes ago, we had no special handling of transient errors. Sometimes a database server replies “come back in a bit and retry, no need to fail over yet”. And, that’s what

      [Read more...]
    (Slides) DIY – A distributed database cluster, or: MySQL Cluster
    Employee +2 Vote Up -0Vote Down

    Ever wondered how a database cluster ticks? Here’s how! During my talk at the International PHP Conference (#ipc13) I tried to build a cluster. I brought a soldering iron, sold, pink, orange and brown cables with me. Then, I tried to sold the thick (reliable, high throughput) brown cable at my company notebook (video coming). Eventually, I failed. Probably, I lacked the theoretical background?! Luckily, I got very theoretical slides with me…

    DIY: A distributed database cluster, or: MySQL Cluster from Ulf Wendel

      [Read more...]
    PHP: PECL/mysqlnd_ms 1.5 alpha, mysqlnd_qc 1.1 alpha releases
    Employee +1 Vote Up -0Vote Down

    Just in time for a PHP 5.5 code freeze, we are brushing over the Replication and Load Balancing plugin (PECL/mysqlnd_ms) and the Query Cache plugin (PECL/mysqlnd_qc) for PHP mysqlnd. PECL/mysqlnd_ms 1.5 is a step up from the previous version whereas PECL/mysqlnd_qc 1.1 is nothing but a maintenance release.

    Replication and Load Balancing – better transaction awareness

    PECL/mysqlnd_ms 1.5 monitors all mysqli function calls that change transaction status. Since PHP 5.5, te mysqli API gives you the same level of transaction control as SQL does. Thus, if only using mysql function calls, the plugin can do fully transaction aware load

      [Read more...]
    PHP Summit presentation: NoSQL in MySQL
    Employee +2 Vote Up -0Vote Down

    Live from the PHP Summit conference in Munich: NoSQL in MySQL. A couple of hours ago I gave a talk about NoSQL in MySQL, contents: what is NoSQL, what is HandlerSocket, what is the InnoDB Memcached Plugin InnoDB and how to use with PHP, is this NoSQL? Slides are below.

    NoSQL in MySQL from Ulf Wendel

    (PDF download)

    The talk was called a night session. Night session means, its the last talk for the day. After eight hours packed with workshops everybody is a bit tired and exhausted. What else could I do but tell them

      [Read more...]
    PECL/mysqlnd_ms 1.5 + PHP 5.5.0 + MySQL 5.6 = better load balancing
    Employee +2 Vote Up -0Vote Down

    PECL/mysqlnd_ms is a client-side load balancer for PHP that supports any MySQL cluster. It does read-write splitting, failover, introduces a quality of service concept, supports partitioning and, of course, load balancing. New mysqli API (begin, *savepoint) calls in PHP 5.5.0 help to improve transaction awareness. New read only in MySQL 5.6 promise major performance gains (think 2x) and an option to reduce the load on a MySQL Replication master. Read how the features go together in PECL/mysqlnd_ms 1.5.

    Load balancing – transaction aware?

    A load balancer must not switch connections in the middle of a transaction. A load balancer must send all queries to the server a transaction has been started on until the transaction ends. Unfortunately, it is very hard to

      [Read more...]
    1.5x … 9x faster queries with PHP and MySQL 5.6, really?
    Employee +0 Vote Up -0Vote Down

    I am telling no secret saying MySQL 5.6 GA can be expected to be released soon, very soon. Time to test one of the improvements: MySQL 5.6 speaks SQL and Memcache protocol. In your PHP MySQL apps, try using the Memcache protocol to query MySQL. A key-value SELECT ... FROM ... WHERE pk = <key> can become 1.5x-2x faster, an INSERT INTO table(pk, ...) VALUES (<key> ...) can become 4.5x-9x faster, says the InnoDB team! Read on: background, benchmark, usage, PECL/mysqlnd_memcache,

      [Read more...]
    Searching document stores in 2013: from 1983 to SQL:2003 in a blink?
    Employee +2 Vote Up -0Vote Down

    I love the new NoSQL systems: more choices! After years of RDBMS dominance there are hundrets of NoSQL systems offering a wide range of data models, data distribution strategies and interfaces. Polyglot persistence describes the market change. I am most fascinated by document stores: nested data and data distribution go hand-in-hand. Nested data, finally. And, for those who like it: schemaless or even schemafree. Maybe something to learn for MySQL? But their search capabilities… A word or two on SQL (SELECT … FROM … WHERE – SFW) and nested data.

    Learn from NoSQL document stores

    The classical relational data model requests all data to be in

      [Read more...]
    Solution for: MySQL 5.6 password expired, PHP can’t connect, application stops
    Employee +1 Vote Up -0Vote Down

    MySQL 5.6 introduces a new features that must be used with great care. A MySQL users password can be marked as expired. This way, a DBA can force a user to set or reset his password. The MySQL user must set a (new) password before he is allowed to do anything else. As a consequence, if a users password is expired all standard PHP MySQL API connect calls will fail. Applications stop working unless the application is changed to include a user dialog for setting a new password. To develop such a dialog for resetting an expired password one has to use a new connection flag introduced in PHP 5.4.12-dev. Don’t panic: to get in trouble DBA actions have to be at one level with dropping the MySQL user of a production PHP application…

    Relax: IF MySQL 5.6 AND IF …AND IF  [Read more...]

    PECL/mysqlnd_ms and the client failover dilemma – part 1
    Employee +0 Vote Up -0Vote Down

    MySQL Replication has a weak point: the master (primary) is a single point of failure. People ask frequently about client failover. Making a client library failover a client automatically from one server to another is simple. PECL/mysqlnd_ms can do it. Unfortunately, this is only the tip of the iceberg when using a primary copy (master-slave) database cluster. Among others, you may have to reconfigure clients. Below is one hint (no solution) for deploying PECL/mysqlnd_ms configuration files using MHA (Master High Availability Manager and tools for MySQL).

    What’s the plural of dilemma?

    If a server is unavailable a client may attempt to connect to another server given a list of alternatives. A client library can handle it entirely

      [Read more...]
    Some sharding support and cache locality optimization support for PHP MySQL driver
    Employee +5 Vote Up -0Vote Down

    It is time for christmas presents: some sharding support and cache locality optimizations are coming with PECL/mysqlnd_ms 1.5. PECL/mysqlnd_ms is a plugin for the mysqlnd library. The plugin adds replication and load balancing support to any PHP MySQL API (mysql, mysqli, PDO_MySQL) if compiled to use the mysqlnd library.

    As a MySQL user you can choose between a wide variety of clustering solutions to scale-out. Your options range from eventual consistent solutions to strong consistent ones, from built-in (MySQL Replication, MySQL Cluster) to third party or home-grown. PECL/mysqlnd_ms is a client side load

      [Read more...]
    Vote NO for MySQL – Election 2012: NoSQL
    Employee +4 Vote Up -0Vote Down

    Do I have to look out for a new job? Some analysists say so: NoSQL is getting stronger. Given the prediction it is time for me to learn what NoSQL is.

    Vote NO for MySQL from Ulf Wendel

    http://de.slideshare.net/nixnutz/vote-no-for-mysql (Slides: Vote NO for MySQL)

    As a matter of fact there is no one kind of NoSQL but many. Four different kinds of NoSQL stores are competing with MySQL: Key Value Stores, Document Database, Graph Databases and Big Data/Column-oriented. Each of them has their specific strengths.

    Key Value Stores are all about performance. MySQL 5.6 introduces

      [Read more...]
    Supercharging PHP MySQL applications using the best API
    Employee +3 Vote Up -0Vote Down

    PHP MySQL developers are confronted with three PHP MySQL APIs. That is confusing. Since mid 2012 the PHP manual suggests not to use the oldest and original PHP MySQL extension any more to cure the situation. Please, swap out ext/mysql in favour of either ext/mysqli or PDO_MySQL. Why to upgrade is below. Read on, if you are a PHP beginner, your PHP application is still using mysql_* functions of ext/mysql or you are a PHP trainer.

    As a PHP consumer, tease your software vendors by asking whether they use the state of the art APIs! Here is a cut&paste test question to ask your vendor: do you support secure SSL connections to MySQL?

    History  [Read more...]

    Showing entries 1 to 30 of 31 Next 1 Older Entries

    Planet MySQL © 1995, 2014, Oracle Corporation and/or its affiliates   Legal Policies | Your Privacy Rights | Terms of Use

    Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.