Re: Hessian PHP implementation

From: Manolo Gómez P. <vegeta.ec@xxx.com>
Date: Thu Jan 13 2005 - 20:47:20 PST

Hello to everyone

Again, thank you very much for the support.

Actually I did send an email about the release of HessianPHP but looks
like the message didn't get to the list on time.
(Thanks a lot Radu-Adrian and Scott)

Hessian seems to be gaining interest among the community, but as
Christian Campo noted, there seems to be several aspects to consider
for the next Hessian version.

I agree with Christian's ideas and I am trying to match them for HessianPHP,
concretely:

> - better error handling (HessianRuntimeException or
> HessianProtocolException is most times not good enough)

As you might know, PHP 4 error handling model is just messed up, you don't
have exceptions so when an error is detected (or a "fault"), HessianPHP
throws a "fatal error" that just halts the script and shows some
information.

PHP5 is a different history, the object model is closer to Java so I
implemented two different exceptions, HttpException and HessianException
which respectively correspond to a communication failure and to a protocol
error (basically parsing and faults), both contain some sort of stack
trace and info regarding the failure condition.

I wish you could give me some thoughts on this, a way to effectively
handle errors when you have NO exceptions at all and maybe unify the
possible exceptions in the implementation.

> - did you ever try to create a webservice that had two methods with
> the same name but different signature ??? My users tried that and all
> you get is "Unexpected code: M" :-) I know its forbidden, but a
> clearer message would
> help

This is bad indeed, I never considered this since PHP is dynamically
typed, and it can handle any number of parameters you send to a method
even if the signature says different.

There should be a code or message that handles this.

> - GZIP requests and responses, hopefully by using HTTP Headers so that
> the client triggers whether he wants GZIPping or not
> - optionally logging error message on the server when they occurr
> - and there is always more :-)

This is interesting and I hope it gets in Hessian Java code. I am curious
to know how to implement it though, using HTTP headers as Christian
proposes or by inspecting incoming data as I think HessianCPP does,
please correct me if I'm wrong Radu-Adrian.

PHP supports gzip natively so It shouldn't be hard to get this feature in.

Logging errors to file sounds good too, or perhaps having a pluggable
logging mechanism where you can switch bewteen things like log4j or
commons-logging or whatever, defining the level of messages.

Oh, I almost forgot, this is an even more off topic question, but what
do you think
about this:

http://weblogs.java.net/blog/pelegri/archive/2005/01/start_using_bin.html

Open source Binary XML standard, look like it's comming full circle,
back to binary
where it should have stayed in the first place.

Would love to hear your thoughts.

Manolo Gómez Placencia, MCP
Investigación y Desarrollo de Software
Pontificia Universidad Católica del Ecuador
Quito, Ecuador
Telf: (593) 2 2991700 ext. 1336
Received on Thu 13 Jan 2005 20:47:20 -0800

This archive was generated by hypermail 2.1.8 : Thu Sep 28 2006 - 20:16:40 PDT