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

Re: [xmlblaster] Newbie Question.

Martin Johnson wrote:

Hi Martin,

with all what you are doing you are no newbie :-)

xmlBlaster looks great. I am attempting to wrap my head around some of the semantics of using Pub/Sub pattern as applied in xmlBlaster. I am little more familiar with the Event/Notification services of CORBA. By the way I have TAO using xmlBlaster, very nice and easy thanks jacorb and TAO.

Do you use our C++ helper classes or have you coded everything yourself? If you use our C++, could you send a patch how to use it with TAO? Our C++ helper client classes need to be updated to the newest QoS, and need some fail save enhancements (similar to the Java helper clients).

If you code or extend them, please contribute them back.

Anyway to my question. I am using SimpleChat that is using Pub/Sub as a
tutorial, why is it that everytime I connect to xmlBlaster I get the last
message published. If I post a single message and then disconnect and
reconnect a few times I will seem to recv as many messages via update()
invocations at startup. I'm not quite getting what is happening here.

On connect() the SimpleChat does a subcribe() on the chat message. On subscribe you receive the current chat value (and in future all new chat messages).

eg: If I on client A press "Who is there" On client B I will see "I am retrieving the connected users list (ignore this)" for as many times as I connect and logout.

If i login as "Ben", do some disconnect/connect and then "Who is there" i get exactly one "Ben", as expected.

I am grappling with xml and the manner in which it used with xmlBlaster
(I'll get there soon enough). Is this some sort ot Qos thing? Where can I
read of what Qos is available for Pub/Sub and what are the xml attributes
names for setting Qos up?

The best place is the online "Reference Handbook", just read each of the requirements.

In the file xmlBlaster/src/dtd/XmlQoS.xml
you see all QoS collected as an overview.

The QoS is xml based, which allows us to add many features in future.
The XmlKey is xml based, which allows us to subscribe to messages
with the XPath query language.

Also I am having trouble with MessageUnit on C++ is I believe lifetime management of the objects is not quite right. If MessageUnit is on the stack and then passed in a call to publish(), hmmm perhaps this is a valueType thing since MessageUnit is a struct and I havent compiled the idl properly I'll let you know.

With mico and C++ this seems to run fine.

keep us informed,


PS: I would recommend that you use the current cvs code
and not the last version 0.79d, as this is outdated
(the IDL has changed).

Marcel Ruff
mailto:ruff at swand.lake.de