[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[xmlblaster] Re: Newbie question: xlmblaster and php: how to get updates?

thank you for your links!, I will take a look


On 9/6/06, Eduard Martínez <martinez.bernal at gmail.com> wrote:

----------  Mensaje reenviado  ----------

Subject: Re: [xmlblaster] Newbie question: xlmblaster and php: how to get
Date: Miércoles, 6 de Septiembre de 2006 20:41
From: Marcel Ruff <mr at marcelruff.info>
To: xmlblaster at server.xmlblaster.org

Eduard Martinez wrote:
> Hello
> I'm trying to implement an application which sends messages asynchrolously
> between a java application an several php clients. I took a look to the
> php
> demo, but I can't figure how to suscribe on a topic and specify
> something to
> get updates when there is a new message of the topic, like the java
> client.
> Is it possible? How can I do it?
> Cheers,
>  Edu

Salute Edu,

i don't think that Cyrilles XmlRpc demo supports callbacks.

So you need to make your own implementation,
here are three approaches you could try:

1. Extend Cyrilles XmlRpc example with a XmlRpc-callback server,
 there are many such implementations, see

2. Access our xmlBlaster C library from PHP.
  Like this you have tunneled callbacks, high performance, zlib compression
  and see how our C# example is doing this:

3. You can use Cyrilles XmlRpc PHP code and use blocking get() calls
(with timeouts):
  You would subscribe with PHP but the clients callback queue has set
  so the messages are collected on server side. Now you can use
synchronous get()
  calls which block until messages are available
as a
  code sample to use for PHP).
  This approach is very simple but you need to use a dedicated thread in
PHP for the blocking get() call
   (see also