[muscle] Re: PHP Extension for MUSCLE client API

  • From: Justin Hammond <justin@xxxxxxxx>
  • To: muscle@xxxxxxxxxxxxx
  • Date: Fri, 20 Jan 2006 08:27:50 +0800

Hi Jessica,

only my Subversion repository at the moment, which, unfortuantly doesn't contain the queryfilters or swig stuff yet (I've only quickly played with the swig interface, and havn't really done anything major yet) its at http://svn.neostats.net/svn/NeoNet/ (only contains files relevent to my work, and not the whole muscle source).

You can check out swig here: http://www.swig.org/. From reading the docs it seems pretty straight forward and supports a number of "exits" including perl, php, java, Ruby, python etc etc etc so seems like a big time saver! I don't know when I'll get to it (could be months!) so if you need it quick, you might want to have a stab at it.

(I'm writing a Muscle server that will be more like a store and forward message queue system with authentication and access controls built in and most of the apps that will use it are C, so hence I'm trying to improve the C API. )

On 20 Jan 2006, at 12:40 AM, Jessica wrote:

Hi Justin,
Sounds interesting, hopefully all goes well and it'll work with PHP
5.1.1. If it does, then half the battle is done, and I'll be able to
add some real-time features to the forum website I'm building. Just
out of curiosity, is there a website for the module you are working on?


~Jessica

Hi,
I'm also looking at PHP support in muscle, and was going to look into
the Swig software calling the C API. Right now I'm actually updating
the C muscle API with support for query-filters first. (and will send
through the code when its running!)

Justin


On 19 Jan 2006, at 1:39 PM, Jeremy Friesner wrote:

Hi Jessica,

I'm not very familiar with PHP, so I can't really give any good
advice
on how to write a PHP extension.  MUSCLE does have client APIs
for Python, Java, C#, and C, however, so if you could use any of
those languages instead (or possibly find a way to run code written
in those languages from a PHP script... I don't know if that is
possible
or not) then that might be a solution for you.

Aside from that, the remaining options would be to write a PHP
extension
that calls the C or C++ code for you, or write your own native PHP
code
to receive, parse, generate, and send MUSCLE messages.  Neither of
those two options would be very easy, but if you want to give it a
try
let me know and I will point you to the relevant MUSCLE
documentation.

-Jeremy

ps here is a link about calling Java code from PHP:  http://
www.phpbuilder.com/manual/ref.java.php

For something I'm going to be experimenting with, I'm going to
need to
make a PHP extension for PHP5 5.1.1. I have MUSCLEd compiled and
running on a FreeBSD server.  The problem is that I've not built a
PHP
extension for any version of PHP4 or PHP5, nor do I work with C++.
Guidance and assistance in helping build the MUSCLE client API as
a PHP
extension is greatly appreciated.

~Jessica











Other related posts: