News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Piotr Pasich:
Rabbit behind the scenes
October 01, 2014 @ 12:19:53

In a recent post to his site Piotr Pasich shares an article about using a rabbit behind the scenes - making use of the RabbitMQ queuing system for behind the scenes work in your PHP applications.

In PHP business logic is usually put right in action's method or just behind it. Hence, every little piece of delaying and long-running code will be processed with a request. The problem is almost undetectable if a user sends an e-mail but with more complex actions it may take a little bit longer than preferred. [...] In this article I would like to make an attempt to present a solution to the very annoying everyday problem that probably many programmers came across in their organisations - deadlocks in databases caused by a vast number of requests in relatively short time. The main aim of this text is to introduce RabbitMQ, which I value as a very functional and practical message broker, to help you solve the queuing problems and decrease the amount of work you would otherwise have to spend on it.

He talks about why message brokers are even needed and how to pick the right one for your project. Then he gets into the "in practice" part of the article, showing the use of RabbitMQ through PHP to save various data to a database when a user is presented with an advertisement. He shows how to create both the producer and consumer objects, making interaction with the queue simpler. His examples are all using the php-amqplib by Alvaro Videla.

0 comments voice your opinion now!
rabbitmq introduction library tutorial message broker producer consumer

Link: http://piotrpasich.com/rabbit-behind-the-scenes/

Lorenzo Alberton:
Updated Kafka PHP client library
September 18, 2012 @ 11:58:50

Lorenzo Alberton has a new post with an update about a library he's been working on to interface with Apache's Kafka system, "a persistent, distributed, high-throughput publish-subscribe messaging system".

Over a year ago I sort of reverse-engineered the protocol, and published a first rudimental library to produce and consume messages with version 0.05. Since then, the Kafka project has evolved a lot, moving from the LinkedIN repositories to the Apache Incubator, gaining traction, committers, features. The protocol has changed slightly too, so the old library doesn't work anymore with the new version (0.6+).

The library has gotten lots of new features in this update including gzip compression support, custom exception handling and better connection handling. He includes some sample code in the post showing how to create both the Producer and Consumer for the messages (and one for working with Zookeeper).

0 comments voice your opinion now!
kafka client apache messaging producer consumer library update



Community Events





Don't see your event here?
Let us know!


list bugfix tips language introduction opinion deployment interview community package release series voicesoftheelephpant laravel library install podcast framework symfony api

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework