From: Pete Yadlowsky on

Hi,

I'll be honest: php is not my favorite programming language. That honor
goes to ruby. And I don't mean ruby-on-rails; just straight, pure
unfettered ruby. I use ruby to write web applications and just about
everything else.

However, there are obviously very many web applications and webapp
frameworks written in php. I have recently taken an interest in eyeOS
(http://eyeos.org/), with the intent to hack eyeOS to use a certain ruby
back-end file service I've written instead of accessing the local file
system directly. This ruby service communicates with clients via ruby's
native "distributed ruby" (DRb) facility. DRb makes it marvelously easy
to write distributed multi-threaded services, provided the clients are
written in ruby as well.

But what if the client is written in, say, php? Wouldn't it be nice if a
php client could access DRb-driven ruby services just as simply as a
ruby client can? Not finding any such existing facility, I've written a
php object class, "DRbClient". This class invokes object methods offered
by the remote ruby service, passing strings, integers, floats, booleans,
nulls, and/or arrays as arguments, and accepts a return value of any of
those same types. All data translation and inter-process communication
is transparent. It's just as if a local object instance is being
messaged directly.

If there's interest, I'd like to offer DRbClient to the php community,
but I'm not sure how to go about that.

--
Pete Yadlowsky
ITC Unix Systems Support
University of Virginia
From: Manuel Lemos on
Hello,

on 01/14/2010 12:51 PM Pete Yadlowsky said the following:
> I'll be honest: php is not my favorite programming language. That honor
> goes to ruby. And I don't mean ruby-on-rails; just straight, pure
> unfettered ruby. I use ruby to write web applications and just about
> everything else.
>
> However, there are obviously very many web applications and webapp
> frameworks written in php. I have recently taken an interest in eyeOS
> (http://eyeos.org/), with the intent to hack eyeOS to use a certain ruby
> back-end file service I've written instead of accessing the local file
> system directly. This ruby service communicates with clients via ruby's
> native "distributed ruby" (DRb) facility. DRb makes it marvelously easy
> to write distributed multi-threaded services, provided the clients are
> written in ruby as well.
>
> But what if the client is written in, say, php? Wouldn't it be nice if a
> php client could access DRb-driven ruby services just as simply as a
> ruby client can? Not finding any such existing facility, I've written a
> php object class, "DRbClient". This class invokes object methods offered
> by the remote ruby service, passing strings, integers, floats, booleans,
> nulls, and/or arrays as arguments, and accepts a return value of any of
> those same types. All data translation and inter-process communication
> is transparent. It's just as if a local object instance is being
> messaged directly.
>
> If there's interest, I'd like to offer DRbClient to the php community,
> but I'm not sure how to go about that.

If that is based in a class written in PHP, you may want to submit it to
PHPClasses.org . It has hundreds of thousands of registered users eager
to learn about new PHP classes.

http://www.phpclasses.org/

As for distributing processing over multiple threads running eventually
on different machines, that sounds more like a job for Gearman.

http://www.phpclasses.org/blog/post/108-Distributing-PHP-processing-with-Gearman.html

--

Regards,
Manuel Lemos

Find and post PHP jobs
http://www.phpclasses.org/jobs/

PHP Classes - Free ready to use OOP components written in PHP
http://www.phpclasses.org/