Comments

Trac and Subversion Now Available

I am still in the midst of getting everything made available.

https://svn.blog.oneiroi.co.uk

https://OFFLINE

From now all all development will be checked into the saiweb subversion, the existing sourceforge and wordpress repositories will only be used to push releases to.

If you should find a bug and/or have a feature request please register with the trac system and start creating tickets.

Cheers

Buzz

Comments

High Availability Joomla, Wordpress - Load Balance Persistant PHP Database Sessions

If you’ve seen the new twitter feed to the right you may of seem some ramblings about ‘cura’.

Cura is a PHP class I have authored in Co-operation with Psycle Interactive (The company I now work for, so be sure to thank them for allowing me to publish this write up!)

So what does it do? Cura sets several call back objects in your PHP application that re-directs all session data to a mySQL database.

But why do I need that? The average 1 server end user can stop reading here, as I can tell you now that Cura is not for you.

If however you are a business fielding multiple web servers then read on.

By passing all your PHP sessions to a database you remove the work around requirements for a load balanced solution.

i.e. web1 web2

1) Shopper arrives at web1 and logs in. 2) Shopper adds item to cart, which is logged against their session. 3) web1 is subjected to a search engine index. 4) web2 is now serving the shopper, shoppers basket is now logged out as their session id has changed …

There are numerous work around methods for this, such as having a single shared mount point for the PHP session files, the use of cookies etc …

The problem is in a high availability solution that a single mount point is just that, it’s singular and therefor a single point of failure.

Then there is the use of cookies, which is fine until you start to store a lot of data during your users session, at which point on each server change you are reliant on the cookie data being transmitted back to the server each time, raising the question what is the point of adding a load balanced solution if the user experience becomes degraded due to it’s deployment?

So secret option number 3 is to use a database, you can remove the single point of failure by having a mySQL cluster, and you haven’t got to worry too much about how much data you are storing.

Because everything is in a database whenever your web application is run (web1, web2) it will read the data from one source, allowing persistent sessions across your whole platform without the need for single mount points or session replication.

The source files are available from: https://svn.blog.oneiroi.co.uk/branches/cura-php/trunk/

svn co https://svn.blog.oneiroi.co.uk/branches/cura-php/trunk/

To deploy this solution simply add the following lines to any file that calls session_start();

require_once('/path/to/cura.class.php');
$cura = new cura($db, $user, $password, $host);
session_start();
...
the rest of your file...

Ensure that you have created a ‘sessions’ table as per the provided sessions.sql file in your database.

I will be adding simplified support for wordpress and joomla shortly these will become available from: https://svn.blog.oneiroi.co.uk/branches/cura-php/trunk/

Comments

Dedi Has Landed.

The dedi server is online, as such blog.oneiroi.co.uk will be migrating over this weekend :)

I am currently getting subversion and trac setup taking svnsync copies of adimpleo, wordpress-flowplayer and acies :-)

phpbuzz.co.uk should make it live this weekend also, once I have some content hand ins from people contributing articles.

Comments

Saiweb Update - What Do You Want to See?

Well the giant banner at the top of the blog can’t of escaped your attention, and I still need your votes! so please check out the blog entry for IT Super Hero 2008

For those awaiting the ‘Build your own HD youtube’ series completion, I have a dedi server en route, to allow completion of this series.

“Dell Core 330 v2 - Core2Duo E4600 (2x2.4GHz) 1GB RAM 160GB HDD”

CentOS 64bit, from what I have read the cpu uses Intels EMT, which is realy only about 48bits … but neither here or there at the moment, this is coming from the guy’s at UkFast.

So with the new dev server on the way the question is … what do you want to see?

What tutorials / videos would you be of intrest to you?

Post a comment with suggestions, and just so you are aware comments are on moderation due to the couple of thousand spam comments posted every day :( … so don’t worry if your comment doesn’t appear right away it’s just waiting for me to review it.

Cheers

Buzz