All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wido den Hollander <wido@widodh.nl>
To: ceph-devel@vger.kernel.org
Subject: phprados update
Date: Fri, 18 Nov 2011 17:44:50 +0100	[thread overview]
Message-ID: <4EC68B82.9020106@widodh.nl> (raw)

Hi,

Some time ago the API of librados changed thus breaking phprados. I 
tried implementing the C++ API of librados in PHP but I got pretty stuck 
there with the new IoCTX stuff.

So I went to the C API and started implementing a C-only phprados with 
just using the C functions.

I just finished with implementing most of the librados functionality, 
this includes:

* Connecting
* Creating and removing pools
* Object handling like write and read
* Xattr handling
* Snapshot handling

I stayed away from the rados tmap's, exec and async writes for now, 
since I don't think a lot of PHP users will be using that functionality 
(yet).

My next steps are to hunt down some bugs and start writing a OOP based 
version in PHP, but I'll be using the internal object methods of PHP for 
this while calling the C functions of librados in the background.

This way I can create a RADOS object in PHP which meets the "standard" 
of what PHP users are used to. For example: It is not common in PHP to 
define the number of bytes you want to read when retrieving the value of 
a xattr, PHP should figure that out for you.

Streamwrappers are something I'm also working on, for example:

<?php
mkdir("rados://pool1");
?>

<?php
file_get_contents("rados://pool1/object1");
?>

<?php
file_put_contents("rados://pool1/object1", "some string");
?>

phprados can be found at: http://www.widodh.nl/git/phprados.git

Or you can download it at: 
http://zooi.widodh.nl/ceph/phprados/phprados_latest.tar.gz

I also updated the Wiki: http://ceph.newdream.net/wiki/Phprados

Any comments or suggestions on this?

Wido

             reply	other threads:[~2011-11-18 16:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-18 16:44 Wido den Hollander [this message]
2011-11-18 20:42 ` phprados update Tommi Virtanen
2011-11-18 20:56   ` Wido den Hollander
2011-11-18 21:00   ` Wido den Hollander
2011-11-18 21:05     ` Tommi Virtanen
  -- strict thread matches above, loose matches on Subject: below --
2011-11-16 21:10 Wido den Hollander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EC68B82.9020106@widodh.nl \
    --to=wido@widodh.nl \
    --cc=ceph-devel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.