Re: Peer to Peer and Bonobo (learning bonobo)
- From: "Gustavo J. A. M. Carneiro" <gjc inescporto pt>
- To: Mikoyan <miko2 pandora be>
- Cc: bonobo <gnome-components-list gnome org>
- Subject: Re: Peer to Peer and Bonobo (learning bonobo)
- Date: 18 Jul 2003 16:07:25 +0100
A Sex, 2003-07-18 às 10:42, Mikoyan escreveu:
> Hi all,
>
> I'm back playing with Bonobo, but after playing some more
> with it, I'm not sure if I really do understand all of it.
> So I'm afraid I have some really newbie questions here.
>
> What I'm trying to achieve (just as an exercise) is to create
> a simple sample peer to peer chat program, where every
> instance of the program is thus a server and both a client
> to all the onder nodes in the network.
>
> When the chat program is launched it looks up all the activated
> instances, puts them in a list, and finaly "subscribes" himself
> to all the other found running instances.
>
> I don't know if CORBA/Bonobo/BonoboActivation really is suitable
> for this, btw.
>
> Anyhow, first of all, it is not clear how I should look
> up all other running servers (ok, I read about the oaf query
> language and the _active thingy, but still ...).
A possible design for your application could be:
module Chat {
interface Client {
// send message to this client
void message(in Client source, in string message);
}
typedef sequence<Client> ClientList;
interface Server {
void clientLogin(in Client client, in string username, in string
passwd) raises (InvalidLogin);
void clientLogout(in Client client);
ClientList listClients();
}
}
You would make a separate program to contain a factory for
Chat::Server. Beware, though, that I'm not sure if bonobo-activation
allows registration from different hosts...
The (GUI) chat application would implement Chat::Client, but have
nothing to do with bonobo-activation.
Each client application would register with the server, activating it
first with b-a, but only one instance must be active at each time, and
that could be a bit tricky.
>
> Second, what kind of server has this to be. I never really
> used something else then a factory server, and I don't
> know what the others are/do :) Neverteless I assume
> a factory server would be suitable for this.
Yes, but only for the object tracking logins, Chat::Server.
>
> And finaly, my uber-newbie question : Just to check if I
> do understand or not :
>
> With the factory server : if a client is for the first time
> started, the server will be started too. With every new client
> the server creates a new servant (an implementaion of the idl
> iface using a BonoboObject in this case) corresponding with
> every client. That's all there is to it? :)
Like I said, you should implement a CORBA/Bonobo Object for each chat
client, which acts as both client and server.
>
> Hmmmz, maybe some good pointers to some information would help
> too ;)
>
> Thank in advance, Steven
>
>
> _______________________________________________
> gnome-components-list mailing list
> gnome-components-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-components-list
--
Gustavo João Alves Marques Carneiro
<gjc inescporto pt> <gustavo users sourceforge net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]