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

Zurab Davitiani:
PHP Sessions in Erlang Mnesia
Jul 02, 2013 @ 16:31:43

In a new post to his site Zurab Davitiani shows you how to use a PHP-to-Erlang bridge to store your sessions in Mnesia. Mnesia is a distributed, soft real-time database management system written in the Erlang programming language.

I decided one of the simplest things to do would be to create a session storage for PHP in Mnesia. But that, in doing so, I would also create an extremely simple key value store wrapper around Mnesia which would track access times.

The instructions help you get the needed software set up including mypeb, kvstore and lib360. He lists all the steps needed to get the platform up and running, complete with exact commands to execute. He does point out a few things that are missing from the setup including making kvstore easier to work with and some PHP session garbage collection.

tagged: erlang mnesia session tutorial storage database

Link: http://unix0.wordpress.com/2013/06/22/php-sessions-in-erlang-mnesia

Alvaro Videla:
Using RabbitMQ in Unit Tests
May 01, 2013 @ 14:10:11

Alvaro Videla has a new post today showing how he used RabbitMQ in his unit testing runs with a small, quickly installed version of the server that can be removed once the tests are complete.

In this blog post I want to show you a very simple technique for using RabbitMQ in our Unit or Functional Tests. Let’s say you wrote a bunch of tests for your RabbitMQ consumers and then it’s time to run them. To do that you probably need to setup a RabbitMQ server just for tests with their own users and passwords, or you need to set up a whole new virtual host for your tests. [...] With a future release of RabbitMQ that we can already test on the nightlies website, we can run RabbitMQ without the need to install Erlang. We created a package that ships a stripped down version of Erlang together with the broker bits, so running RabbitMQ now is as easy as downloading a tarball, uncompressing it and starting the server.

With a combination of this more self-contained package and some listener handling through PHPUnit, they uncompress the tarball with a PHP script and start the server with the defined configuration. Then, once the tests are done, it cleans itself up and removes the entire server directory to make for a clean run the next time.

tagged: rabbitmq standalone server erlang unittest phpunit

Link: http://videlalvaro.github.io/2013/04/using-rabbitmq-in-unit-tests.html

Alvaro Videla's Blog:
Reply to "Scala is Easier than PHP"
Nov 22, 2010 @ 14:29:12

Alvaro Videla has written up a response to Wade Arnold's Scala's easier than PHP post and some of the points he doesn't agree with him on.

Before going on with the points, let me state something: please avoid flame wars, all the Scala vs. PHP stuff, fanboyism and what not. This post is not about that. Regarding Wade Arnold I have to say that I fully respect him. While I don’t know him personally, I know him for his work on AMFPHP, since it was a platform I used to work with before.

Alvaro talks about functional programming and some of the main points he had made about Erlang in a talk he had given - code reload, being ready for multi-core and no shared state between scripts. He talks about how these (really) apply to PHP.

tagged: scala opinion easier language shared state multicore erlang code reload

Link:

Alvaro Videla's Blog:
Erlang as a Fast Key Value Store for PHP
Mar 08, 2010 @ 19:37:51

Alvaro Videla has submitted a new post he's written up combining PHP and Erlang yet again, but this time he's using it to just store key/value pairs rather than for session data.

In this post I want to show you some of the neat things that can be done with the PHP-Erlang Bridge extension: A Key Value Store. Erlang comes packed with a Key Value store in the form of the ETS module. This is database is pretty fast and efficient for storing the Erlang terms in memory.

He tried a proof of concept to see how well the system would respond and was able to push over 150k items into the storage in one second. Sample code and instructions on getting the bridge working are included in the post.

tagged: erlang keyvalue store benchmark extension bridge

Link:

Alvaro Videla's Blog:
Erlang as Session Storage for PHP
Jan 19, 2010 @ 21:52:07

Alvaro Videla has a different sort of suggestion for storing the sessions for your application - use Erlang.

In the last few days I been playing with the PHP extension mypeb which allows us to connect to Erlang from PHP. As a simple example to show what we can do with this extension I will create a PHP class that will be used as the session_save_hanlder for PHP. [...] I will like to try something different by using this class to interact with an Erlang node that will act as the in memory storage for our sessions using ETS tables.

He uses the session_set_save_handler PHP function to point the application to a new location (away from the default filesystem handling) and to a custom ErlangSessionHandler object's "open" method. Also included are "close", "read" and "write" methods that let PHP talk directly to the Erlang instance. Code snippets are included.

tagged: erlang session storage tutorial

Link:

Jan Lehnardt's Blog:
CouchDb PHP Library for JSON API
Sep 10, 2007 @ 16:10:00

Jan Lehnardt points out an update that's been made to the CouchDb PHP library for the JSON API. As posted to the mailing list for the project:

Dear Couch Potatoes (or something), I updated the CouchDb PHP Library and the Demo application BugShrink (our bug-tracker) to the new JSON API.

You can try out this new update via the project's repository or just check out the CouchDb project homepage for more information.

tagged: couchdb project update library json api database erlang couchdb project update library json api database erlang

Link:

Jan Lehnardt's Blog:
CouchDb PHP Library for JSON API
Sep 10, 2007 @ 16:10:00

Jan Lehnardt points out an update that's been made to the CouchDb PHP library for the JSON API. As posted to the mailing list for the project:

Dear Couch Potatoes (or something), I updated the CouchDb PHP Library and the Demo application BugShrink (our bug-tracker) to the new JSON API.

You can try out this new update via the project's repository or just check out the CouchDb project homepage for more information.

tagged: couchdb project update library json api database erlang couchdb project update library json api database erlang

Link:


Trending Topics: