Re: [Resin-interest] AMFPHP on Quercus

2010-03-17 Thread Brian Topping

On Mar 5, 2010, at 12:35 PM, Emil Ong wrote:

 On Fri, Mar 05, 2010 at 11:57:05AM -0500, Brian Topping wrote:

 Am I missing anything obvious?

 I don't think so. I'll file this as a bug - there might be an easy  
 fix.

 http://bugs.caucho.com/view.php?id=3926

 Invoking the PHP from Java can be tricky for cases like these.  Some
 care needs to be taken to do it correctly.

Hi Emil, I thought to check in on this as we get our PHP in deployed  
in the Java WAR.  Unfortunately, the path that I've had to take is to  
unzip the tarball into /var/www/html and let httpd handle it.  But it  
would be much nicer to not have to do that.

I noticed the bug was marked as minor.  If that's the case, I guess  
I should be able to debug it.  Is Quercus open source?  I didn't see a  
source jar attached to the maven repository artifacts, so I just  
assumed something so cool was closed source.  :-)

If not, maybe I could hire someone on your end to look at it.  Hit me  
off-list if that's an option.

Failing all that (or possibly in addition to that), it would be great  
to figure out how to call PHP from Java too.

Any thoughts much appreciated!


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] AMFPHP on Quercus

2010-03-05 Thread Brian Topping
Thanks Emil.  That makes some sense, but as I think about it, I'm not  
sure I understand how to wire these together.  Blaze is obviously  
Java, and the point of any of these RPC abstractions is to instantiate  
a remote service bean and call methods.  PHP can instantiate Java  
easily enough, but I do not see a supported way for Java to  
instantiate a PHP service object.  So there's no way for Blaze to  
instantiate a PHP object (i.e. a PHP object compiled into Java), or  
even a proxy for the PHP object that contains the glue.  Without that,  
I can't imagine (in hindsight) how using Blaze will ever work as a  
front end for PHP code.

I'm far from being a master of PHP, but I'm wondering if there might  
be a misfeature in the PHP standard library implementation for  
Quercus.  This is super simple to test... unpack 
http://sourceforge.net/projects/amfphp/files/amfphp/amfphp%201.9.zip 
  and drop it into your webapp root.  No configuration is necessary.   
Then load http://localhost:8080/amfphp/browser/index.html and you'll  
see the issue.

Am I missing anything obvious?

Cheers, Brian

On Mar 4, 2010, at 7:43 PM, Emil Ong wrote:

 Hi Brian,

 I think your best bet is to use BlazeDS. As far as I know, nobody has
 used AMFPHP with Quercus, but using BlazeDS would be simple (just use
 new Java(some.blazeds.Clazz, first arg, etc) to create objects).

 You could also try using Hessian Flash, but then you'd need your  
 objects
 to be Java objects that you access from PHP.

 Thanks,
 Emil

 On Thu, Mar 04, 2010 at 07:30:36PM -0500, Brian Topping wrote:
 Greetings,

 I'm just getting started with Quercus and am in a situation where an
 existing application is using AMFPHP.  Looking at the client packets
 that AMFPHP is storing in the logs, they appear to be well-formed.
 When I look at them on the wire with Wireshark, they have Java class
 names in them.

 It makes perfect sense that the objects in Quercus are Java objects,
 but the serialization of same seems to be different than what AMFPHP
 wants to serialize them as, causing the issue. If I am understanding
 the issue correctly, is there a way to have the objects serialize as
 if they were native PHP objects?

 Failing that, I would like to modify AMFPHP so that it uses BlazeDS  
 to
 send the object over the wire.  Has anyone attempted this?  If it's
 just dead simple, that's a perfectly appropriate answer too.  I was
 just hoping to not dig all the way into this to find there are known
 issues in this realm.

 Any information kindly appreciated,

 Brian


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest




___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] AMFPHP on Quercus

2010-03-05 Thread Emil Ong
On Fri, Mar 05, 2010 at 11:57:05AM -0500, Brian Topping wrote:
 Thanks Emil.  That makes some sense, but as I think about it, I'm not  
 sure I understand how to wire these together.  Blaze is obviously  
 Java, and the point of any of these RPC abstractions is to instantiate  
 a remote service bean and call methods.  PHP can instantiate Java  
 easily enough, but I do not see a supported way for Java to  
 instantiate a PHP service object.  So there's no way for Blaze to  
 instantiate a PHP object (i.e. a PHP object compiled into Java), or  
 even a proxy for the PHP object that contains the glue.  Without that,  
 I can't imagine (in hindsight) how using Blaze will ever work as a  
 front end for PHP code.
 
 I'm far from being a master of PHP, but I'm wondering if there might  
 be a misfeature in the PHP standard library implementation for  
 Quercus.  This is super simple to test... unpack 
 http://sourceforge.net/projects/amfphp/files/amfphp/amfphp%201.9.zip 
   and drop it into your webapp root.  No configuration is necessary.   
 Then load http://localhost:8080/amfphp/browser/index.html and you'll  
 see the issue.
 
 Am I missing anything obvious?

I don't think so. I'll file this as a bug - there might be an easy fix.

http://bugs.caucho.com/view.php?id=3926

Invoking the PHP from Java can be tricky for cases like these.  Some
care needs to be taken to do it correctly.

Thanks,
Emil

 Cheers, Brian
 
 On Mar 4, 2010, at 7:43 PM, Emil Ong wrote:
 
  Hi Brian,
 
  I think your best bet is to use BlazeDS. As far as I know, nobody has
  used AMFPHP with Quercus, but using BlazeDS would be simple (just use
  new Java(some.blazeds.Clazz, first arg, etc) to create objects).
 
  You could also try using Hessian Flash, but then you'd need your  
  objects
  to be Java objects that you access from PHP.
 
  Thanks,
  Emil
 
  On Thu, Mar 04, 2010 at 07:30:36PM -0500, Brian Topping wrote:
  Greetings,
 
  I'm just getting started with Quercus and am in a situation where an
  existing application is using AMFPHP.  Looking at the client packets
  that AMFPHP is storing in the logs, they appear to be well-formed.
  When I look at them on the wire with Wireshark, they have Java class
  names in them.
 
  It makes perfect sense that the objects in Quercus are Java objects,
  but the serialization of same seems to be different than what AMFPHP
  wants to serialize them as, causing the issue. If I am understanding
  the issue correctly, is there a way to have the objects serialize as
  if they were native PHP objects?
 
  Failing that, I would like to modify AMFPHP so that it uses BlazeDS  
  to
  send the object over the wire.  Has anyone attempted this?  If it's
  just dead simple, that's a perfectly appropriate answer too.  I was
  just hoping to not dig all the way into this to find there are known
  issues in this realm.
 
  Any information kindly appreciated,
 
  Brian
 
 
  ___
  resin-interest mailing list
  resin-interest@caucho.com
  http://maillist.caucho.com/mailman/listinfo/resin-interest
 
 
  ___
  resin-interest mailing list
  resin-interest@caucho.com
  http://maillist.caucho.com/mailman/listinfo/resin-interest
 
 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


[Resin-interest] AMFPHP on Quercus

2010-03-04 Thread Brian Topping
Greetings,

I'm just getting started with Quercus and am in a situation where an  
existing application is using AMFPHP.  Looking at the client packets  
that AMFPHP is storing in the logs, they appear to be well-formed.   
When I look at them on the wire with Wireshark, they have Java class  
names in them.

It makes perfect sense that the objects in Quercus are Java objects,  
but the serialization of same seems to be different than what AMFPHP  
wants to serialize them as, causing the issue. If I am understanding  
the issue correctly, is there a way to have the objects serialize as  
if they were native PHP objects?

Failing that, I would like to modify AMFPHP so that it uses BlazeDS to  
send the object over the wire.  Has anyone attempted this?  If it's  
just dead simple, that's a perfectly appropriate answer too.  I was  
just hoping to not dig all the way into this to find there are known  
issues in this realm.

Any information kindly appreciated,

Brian 


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest


Re: [Resin-interest] AMFPHP on Quercus

2010-03-04 Thread Emil Ong
Hi Brian,

I think your best bet is to use BlazeDS. As far as I know, nobody has
used AMFPHP with Quercus, but using BlazeDS would be simple (just use
new Java(some.blazeds.Clazz, first arg, etc) to create objects).

You could also try using Hessian Flash, but then you'd need your objects
to be Java objects that you access from PHP.

Thanks,
Emil

On Thu, Mar 04, 2010 at 07:30:36PM -0500, Brian Topping wrote:
 Greetings,
 
 I'm just getting started with Quercus and am in a situation where an  
 existing application is using AMFPHP.  Looking at the client packets  
 that AMFPHP is storing in the logs, they appear to be well-formed.   
 When I look at them on the wire with Wireshark, they have Java class  
 names in them.
 
 It makes perfect sense that the objects in Quercus are Java objects,  
 but the serialization of same seems to be different than what AMFPHP  
 wants to serialize them as, causing the issue. If I am understanding  
 the issue correctly, is there a way to have the objects serialize as  
 if they were native PHP objects?
 
 Failing that, I would like to modify AMFPHP so that it uses BlazeDS to  
 send the object over the wire.  Has anyone attempted this?  If it's  
 just dead simple, that's a perfectly appropriate answer too.  I was  
 just hoping to not dig all the way into this to find there are known  
 issues in this realm.
 
 Any information kindly appreciated,
 
 Brian 
 
 
 ___
 resin-interest mailing list
 resin-interest@caucho.com
 http://maillist.caucho.com/mailman/listinfo/resin-interest


___
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest