New Java+PHP user

Justin Matlock
Tue, 21 Oct 2003 21:45:58 -0400

Does Java have a public-domain WDDX class?   Google is surprisingly sparse
on it (or I'm not looking in the right places).

To accomodate Perl, PHP, ASP/.NET and JRun data exchange while using
Memcached, we replaced the serialize/unserialize functions in the PHP class
(and the other API's) with their WDDX equivalents ... in PHP, it's
wddx_serialize_vars(mixed) ... not sure about in other languages (I'll pull
up the source tomorrow and see how my co-workers did it).

(We don't have "real" memcached APIs for .NET or JRun yet -- we're just able
to 'get' single key/values, using primitive socket calls)

WDDX was "invented" by the ColdFusion (*spit*) people, who were bought by
MacroMedia (*spit*), who also produces JRun (*spit x 2*).. so I don't know
if the Java WDDX class in JRun is public domain/open source or not...

WDDX is kind of wordy, though... but it was faster for us to implement
functions/classes/methods that already existed than to find/validate
externally written ones...  The compression offsets the wordiness some...


----- Original Message ----- 
From: "Richard Jones" <>
To: <>
Sent: Tuesday, October 21, 2003 8:52 PM
Subject: Re: New Java+PHP user

> Yeah i was considering writing a class that converted between serialized
> and php objects, but i have plenty of other things to do so i'm just
> a string of values and commas, which is ample for now  :)
> currently i'm just restricting things to one memcached server so the
> thing isnt a problem. would be nice if all the apis hashed keys to the
> servers tho. i'm quite keen to try out the Java extensions for php
> RJ
> On Wednesday 22 October 2003 1:35 am, Brad Fitzpatrick wrote:
> > Not sick at all... but definitely cool.
> >
> > As long as you're careful about what you're putting in.  You can't, say,
> > deserialize a Java object in PHP, or vice-versa.  (Now *that* would be
> > sick.)
> >
> > And yeah, the first layer of hashing (from key to server) is on the
> > clients.  Perhaps we should standardize the hash that all the clients
> > so cross-language stuff works reliably?
> >
> > Or better, provide an option:  "standard_hash" or something, be that
> > the Perl module uses, or crc32, or the Perl hash.  So modules can either
> > support the standard_hash option or not... they could use their own
> > faster (built into the language, or written in C), and only use the
> > standard hash if requested.
> >
> > Client authors:  let's figure this out.  What hashing algorithms work
> > everybody?
> >
> > On Wed, 22 Oct 2003, Richard Jones wrote:
> > > Hi all,
> > > it's high time i joined this list :)
> > >
> > > We're using memcached for to store PHP objects.
> > > We are also using it in our Java streaming server for a few things, so
> > > i'm hoping to be able to help test/debug the Java (and PHP) clients
> > >
> > > Recently we have been setting info in memcached from our java
> > >  server so that it can be read out using PHP. This allows the website
> > > see which users are connected, and what they are streaming. We used to
> > > this in a database - which involved a db hit every page load to check
> > > a user is streaming.
> > >
> > > i noticed that keys are examined to decide which of the available
> > > memcached servers to use to store them - i may be wrong, but i think
> > > the java and PHP clients sometimes come to different decisions on
> > > server to use given the same key. Anyone noticed this sort of
> > >
> > > I guess using memcached to pass data from a java app to a php website
> > > a rather perverted thing to want to do, anyhow if i find the problem
> > > post a solution :)
> > >
> > > Regards,
> > > Richard