Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL
| From: | KishoreKumar Bairi | Date: | Mon, 26 May 2008 20:55:47 +0000 |
| Subject: | Streaming Enabled MySQL Driver for PHP - Google Summer of Code 2008 - MySQL | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-37910@lists.php.net to get a copy of this message | ||
Hello all,
I'm KishoreKumar Bairi, Google Summer of Code Student for MySQL.
Project: *Streaming Enabled MySQL Driver for PHP*
Details:
MyBS[1] is a storage engine used along with other engines to manage BLOB
data efficiently.
MyBS maintains a blob repository for each database to store the blobs
belonging to that database. Each blob stored in this repository has a unique
ID which can be used to reference that blob. MyBS has an embedded light
weight webserver which interfaces the blob repository and client.
BLOBs can be stored in this repository by sending HTTP PUT request to the
embedded web server which returns the unique ID that can be stored in
database to refer this blob later. To retrieve this BLOB, HTTP GET request
for referencing URL is sent to the embedded web server.
This task involves addition of two functions to 'mysqli'.
1. resource mysqli_get_blob ( mysqli link, string reference )
reference: is the string which used after database part in the referencing
URL.
It can be repository Id (or) "<table>/<column>/<row condition>".
2. string mysqli_put_blob ( mysqli link, string file_path, string mode , int
length )
file_path: is the path of the file which is to be stored in a blob field.
mode: mode specifier if the file should be read ASCII mode or binary mode.
link: is the object representing the MySQL database connection.
So, finally this is how the usage will be.
Procedural style:
1. resource mysqli_get_blob ( mysqli link , string reference )
2. string mysqli_put_blob (mysqli link ,string file_path, string mode , int
length)
Object Oriented style:
(methods)
mysqli {
resource mysqli_get_blob ( string reference )
}
mysqli {
string mysqli_put_blob(string file_path, string mode , int length)
}
Looking forward for suggestions and comments.
[1] http://www.blobstreaming.org/
Regards,
KishoreKumar Bairi.