[Spread-users] newbye question about spread: topology

Ryan Caudy caudy at jhu.edu
Tue May 4 14:42:52 EDT 2004

I don't know a lot about XML.  The problem you have, as I perceive it,
is coping with the different character encodings and string formats in
Java and C.  I think trying to get at the data inside a Java object from
C code wouldn't be any fun, so I'd recommend using the setData method in
combination with the Java API's String instance method "public byte[]
getBytes( String charsetName )."  I'm actually not sure what character
set you should use, that depends on what your C applications understand.


Piero Campanelli wrote:

> Hi from Italy,
> thank for your answer....
> Just another question: I'd like to have some clients written 
> in Java and some clients written in C. Suppose I am going to
> pass XML messages.
> What kind of method have I to use on Java API? 
> setObject() or setData() ?
> Because if I do setObject(new String("blabla")) on Java side 
> I presume I'll not be able to read it on C side.
> Bye
>>It depends a bit on what you're doing.  However, in general, 
>>it's better to have N daemons.  This is because daemon-daemon 
>>communication is multicast, while daemon-client communication 
>>is unicast.  Also, we generally recommend that clients 
>>connect locally to a daemon on the same host, so that they 
>>don't have to send their traffic over the network.

Ryan W. Caudy
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University

More information about the Spread-users mailing list