News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Vinu Thomas' Blog:
Create a Storage engine for MySQL using PHP
December 31, 2008 @ 08:42:23

Using this article from Johannes Schluter as a starting point Vinu Thomas has worked up his own example of how the technique is used in the example on the Launchpad page.

This article is interesting because of the uses which come up when you can create custom Storage Engines using PHP. An interesting usecase for this is in creating test cases, where you can feed the data for a query from PHP and trap the activities on the database.

The example code defines methods for update, write and delete and the SQL to create the table and insert/manipulate rows is included (for a table created with "ENGINE=PHP").

0 comments voice your opinion now!
mysql storage engine tutorial write update delete code example



Johannes Schluter's Blog:
MySQL Storage Engine based on PHP
December 30, 2008 @ 08:42:03

In this new post to his blog Johannes Schluter looks at creating a storage engine plugin for MySQL via its plugin interface.

MySQL 5.1 has a plugin interface to easily add storage engines. PHP can easily embedded into other applications. So why not combine these two things? - Writing a MySQL Storage Engine which reads data by calling a PHP script.

He starts with a basic example with create_table and open_table functions that can pull the data from the table marked with the "Engine" setting of PHP. He expands on this to allow for more functionality - update, delete and write methods are added.

0 comments voice your opinion now!
mysql storage engine table tutorial update insert select delete


Matthew Turland's Blog:
EAV Modeling - Square Peg in a Round Hole?
July 25, 2008 @ 11:14:15

Matthew Turland has posted about a topic that was the subject of a recent cover story in php|architect magazine - EAV modeling.

The mental image that came to me when reading about this approach to data modeling was taking the traditional relational table and turning it on its head. [...] EAV actually has to circumvent, work around, or reimplement features that most mainstream database servers today provide "for free" to the traditional relational counterparts of EAV in order to get equal functionality.

He talks about features the structure has (including row-level referential integrity and schema metadata) and points out some of the other document-focused database systems like Lucene and CouchDB.

Check out the story in the June 2008 issue of php|architect for that cover story from Carl Welch.

0 comments voice your opinion now!
eav modeling document based database storage system


Havard Eide's Blog:
SplObjectStorage
July 23, 2008 @ 08:47:44

Havard Eide has a recent post to his blog that looks at a part of the Standard PHP Library (SPL) that can be used with objects to store them for later use - SplObjectStorage.

In this post I will look at SplObjectStorage: a container that allows to store objects uniquely without the need to compare them one by one.

He lets the code to most of the talking, showing how to do the standard operations for a data store - adding objects (both unique and the same), updating objects in the store, checking to see if an object is already added and removing an object from storage.

0 comments voice your opinion now!
splobjectstorage add unique update check data storage object remove


Vinu Thomas' Blog:
MemProxy 0.1 - Memcache Proxy Server in PHP
June 25, 2008 @ 11:13:27

Vinu Thomas points out a new "server" project that's been created to aid in caching for your app - MemProxy.

A pretty cool project in PHP - Memproxy is a caching proxy "server" that uses memcached for storing the cache. This project uses PHP scripts to handle caching using memcache.

The server uses memcached to store the information and automatically manages things like TTL, custom headers and is "application agnostic" all wrapped up in a small codebase with minimal dependencies.

0 comments voice your opinion now!
server proxy project memcached storage ttl header custom


Hasin Hayder's Blog:
Facebook data storage api can really be the replacement of memcache
April 09, 2008 @ 13:58:22

Hasin Hayder has proposed an interesting replacement for the usual caching mechanism - using the Facebook data storage API to cache copies of pages/data/etc.

Why not! All you need is a fast-n-furious caching storage for your Facebook application which stores values against a key, same like a hash table. Facebook data storage API does the same for you. using the batch API in Facebook rest client you can seriously think it as an alternative of memcache.

He shows the simple process for making the object (manually in a preexisting application), inserting data into the object through the API they provide and how to pull that data back out.

0 comments voice your opinion now!
facebook storage api replace memcache object


Jim Wynia's Blog:
WebDAV, PHP and You
December 14, 2007 @ 11:13:00

Jim Wynia has posted some thoughts about a recent announcement of the development of a WebDAV library for PHP to his blog today:

However, over the past few years, WebDAV has started gaining traction as the underlying protocol for Subversion repositories over the web and in several other places. That makes this story about a new PHP library for working with WebDAV interesting.

He notes that he's moved a lot of his file storage to Amazon's s3 service and having this new PHP library would make it even easier for him to get at his content directly from his applications.

0 comments voice your opinion now!
webdav library application amazon s3 storage file webdav library application amazon s3 storage file


Davey Shafik's Blog:
PHP Streams Rock my World!
September 12, 2007 @ 14:14:12

Davey Shafik has gotten more than a little excited by the streams functionality in his latest blog post:

PHP streams are absolutely amazing. As mentioned by Elizabeth Smith (a great read if you don't know how to use streams) PHP streams are super powerful. Streams is something that is (to my knowledge) unique to PHP. The closest thing I've seen to it, is Linux's FUSE "user space" (i.e. not kernel module) file systems.

He shows an example of a stream in action and suggests an interface he'd like to see - an automatic connection to the Amazon S3 storage.

0 comments voice your opinion now!
streams filesystem amazon s3 storage readfile streams filesystem amazon s3 storage readfile


Evert Pot's Blog:
PHP Arrays vs. Objects
August 17, 2007 @ 10:27:00

Wanting to test out a new way of doing things, Evert Pot decided to write up some tests using a Value Object style of data storage versus just in arrays:

In a lot of cases arrays are used in PHP to store object-like information, like the results of a database query. I do this a lot too, but I kind of want to change things around to make use of VO's. I feel this makes a lot more sense, since most of the application I build are heavy OOP anyway, and I get all the added OOP benefits, like type-hinting, inheritance.. well, you know the deal.

In his tests he creates an array of data, a value block of three "properties", looped 1000 times) and a block of three actual properties on an object. Between each, he's using the XDebug memory usage functions to check to see which uses less resources.

Overall, there's really not that much of a difference between using either of them. So, basically, it's up to you which storage method is the simplest for you to use.

0 comments voice your opinion now!
array object memoery usage property storage method array object memoery usage property storage method


Zend Developer Zone:
The Storage Medium
December 04, 2006 @ 14:48:00

The Zend Developer Zone is continuing on from previous parts of a series in this new tutorial posted today - part three of the "Ajax Chat Tutorial" tutorial series.

As our chat application gathers pace we return to the server side of the application. At this point we have setup the Zend Framework with an IndexController class to handle server requests. When we receive a new chat message from the user, we will need to store it. For this tutorial I've selected a file based solution using XML.

They start with a look at the storage method - XML on the backend, pushed into a MySQL database (along with the message format). There's a quick refresher on SimpleXML before they show how to integrate this storage method into the current system.

0 comments voice your opinion now!
tutorial ajax chat storage medium xml mysql database format tutorial ajax chat storage medium xml mysql database format



Community Events









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


application code zendframework developer PHP5 PEAR zend package ajax releases release conference example book mysql framework job security cakephp database

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