Subject: Inter-MOO communication II

From: Andrew Wilson <[email-masked]>
Date: Sat, 1 Aug 1992 09:13:31 -0700

Hi,
	this is me thinking out loud:

Some definitions:

	A VROOM is a notional room made of other rooms which may be
	physically located on other MOOs.  The room components of
	a VROOM are linked by using VPLAYERS to 'listen to' other
	occupants in the VROOM and by special 'listening' verbs
	which broadcast what a VPLAYER hears to occupants of the
	room which connected the VPLAYER to the VROOM.

	A VPLAYER is a special type of player.  MOOs which wish
	to connect to a VROOM cause a VPLAYER to be created in the VROOM.
	The action of the MOO server causes everything that the VPLAYER
	'hears' or 'sees' to be transmitted back to the MOO site that
	created the VPLAYER.

	For example: In a typical arrangement the MOOs LambdaMOO,
	GodNet, DistortionMOO and DalMOO agree that a VROOM connecting
	all the MOOs together will be set up on LambdaMOO.
	LambdaMOO creates a VPLAYER for each of the other MOOs and sets
	the VPLAYER's 'home' to be a special room on LambdaMOO.
		Then, each MOO site in turn creates a different VPLAYER for
	LambdaMOO to use and 'home's their VPLAYER to a special room
	on their MOO.
		Connection is establised in the following way:
	At LambdaMOO a special verb is invoked which connects to LambdaMOO's
	designated VPLAYER at each of the MOO sites.  A special verb
	is made to 'listen' to what each VPLAYER hears and to broadcast it
	to other players and VPLAYERs in the special room at LambdaMOO.
	At the same time, and at each of the other MOO sites, a connection
	is made to that site's designated VPLAYER on LambdaMOO and information
	that the VPLAYER hears is broadcast to the other occupants of
	that site's special room.

[email-masked] (Frank Crowell) says:
>So my question is how are whispers handled?
>	-everone hears				say <msg>
>	-only those on serverA hear		w serverA <msg>
>	-only Cybercrud hears			w Cybercrud <msg>

Well, VROOMs should act the same way as $rooms do.  A 'say':

	say Hello everyone!

should be heard by all occupants of a VROOM.  A 'whisper' from Philippe:

	whisper Are you doing anything tonight? to Frederique

SHOULD only be heard by Frederique.  And if Frederique is in the same room
as Philippe then there are no problems because a conventional (LambdaCore)
verb will be able to find Frederique in the same room as Philippe.  So
Frederique would see:

	Philippe whispers, 'Are you doing anything tonight?'.

and other occupants of the VROOM might see:

	Philippe whispers something to Frederique.

But things are more difficult if Frederique and Philippe are on different
MOOs.  The conventional whisper verb will fail to find Frederique because
she isn't in the same physical room as Philippe.  What should happen
is that the command from Phillipe:

	whisper <whatever> to Frederique

would be routed out to whichever MOO Frederique is on.

Because the parser failed to find a Frederique to call a whisper
verb for in Philippe's room it will instead call the verb $room:huh
[page 13 of LambdaMOO Programmer's Manual] to effect some error recovery.

A redefined VROOM:huh would 'ask' each of the VPLAYERs that it has defined
in the other MOO sites to handle the whisper. So we'd have a verb which looked
SOMETHING like:

	"VROOM:huh

	if (is_a_whisper(args)) 
		for vp in (this.vplayers)
			vp:notify("ask_whisper", player.name, args);
		endfor;
	endif;
	.

Note that the calling player's name is also passed to the VPLAYER along with
the whispered arguments.

At the MOO site which created the VPLAYER, the verb VPLAYER:ask_whisper()
is then called called:

	"VPLAYER:ask_whisper
	whisper_for = arg[1];
	whisper_to = arg[2];
	whisper_what = arg[3..length(args)];
	for p in (players_in_This_room())
		if (p.name == whisper_to)
			p:tell(whisper_for, " whispers, \"", whisper_what, "\"");
		endif;
	endfor;

Phew!

[email-masked] (H. Peter Anvin N9ITP) says:
>One of the snags is that most (?) MOOs have OUTBOUND_NETWORK disabled,
>although that could be taken care of in its own way; in peculiar someone at
>one end could make a small transfer client.

Why not take a leaf out of LPmud's book and 'protect' open_network_connection()
to prevent its misuse.  Make it so that the server checks to see if
the object that invoked the connection is owned by a wizard or some similar
high level person.  If the object doesn't have the right permissions then
simply return E_PERM or something meaningful to the caller.  I don't
agree that this is seriously changing the semantics of MOO in a way
that would invalidate existing code on many sites.  If the function is
so dangerous that it needs a -DCOMPILERDIRECTIVE to prevent its misuse then
why bother having it at all.  EVERY MOO should have o_n_c() capability,
it's up to the admins to see that it's not misused and 'hard coding'
permissions is one helpful way of doing this.

Ryan Daum <[email-masked]> says:
>Lag presents another problem.  If I send ;4+4 to the other MOO, I have no way of
>telling if the value returned belogns to ;4+4 or the previous eval ;4+3.  I am 
>thinking of hacking a special verb that assigns a unique number to each eval
>statement, but even this has it's problems.

I can imagine!  Things are already beginning to get seriously complex, before
you know it we'll all be reading up on distributed database theory and messing
about with parallelised query processing to get the job done.  For now
I think it's best if things are kept as simple as possible.  State of the art?:
How about a VBULLETINBOARD!  Each room in the VROOM has a bulletin board
which forms part of the VROOM's VBULLETINBOARD.  Players in the VROOM
can access the VBULLETINBOARD like they would any other bulletin board.
But requests like:

	read 22 on board

Would make the VBULLETINBOARD search each of the boards on the other MOO sites
for whatever message the player requested.  So as far as the VBULLETINBOARD
(let's call it a VBOARD from now on, less typing!) is concerned:

	Messages 1 to 5 are on LambdaMOO's board,
	Messages 6 to 12 are on GodNet's board,
	Messages 13 to 15 are on DistortionMOO's board and
	Messages 15 to 24 are on DalMOO's board.

So message 8 on DalMOO's board is the one that the player sees.

Now THAT should be REALLY easy to implement!  But I'll leave the details
for someone else for now.

Andrew Wilson	-	Someone HAS to do it, but why does it always
			have to be me?

---

From: [email-masked]
Date: Mon, 3 Aug 1992 06:42:17 -0700

I can suggest some interface metaphors that will simplify
the programming task:

How about making each VROOM a tv studio.  In the studio,
you can watch what other MOOStudios are doing, one at a time,
by flipping channels.  An "ON THE AIR" light indicates
whether any other MOO is watching your studio.

If you want to talk to someone in another studio, you can call
them on the telephone.  This simplifies the programming task
and lessens lag problems, because you have to explicity establish 
a connection.  If everyone in two rooms wants to talk, then you
can put it on speaker phone.  If three rooms want to talk,
then you can make a conference call.  :-)

-- Amy

---

From: [email-masked] (Berry Kercheval)
Date: Mon, 3 Aug 1992 09:42:14 -0700

>>>>> On Mon, 3 Aug 1992 06:42:17 PDT, [email-masked] said:

asb> How about making each VROOM a tv studio.  

Not a bad idea, but how about letting each MOO choose an appropriate
metaphor for their own VROOM?  Ideas might be TV Studio, a room full
of Crystal Balls or Palantiri, a terminal room where players can log
into tinyMOO (the MOO within a MOO), a starship bridge with enormous
viewscreens looking into other VROOMS, and so on.

  --berry

--
Berry Kercheval :: [email-masked] :: Protocol Engines, Inc.  Mt. View, CA
"And there's more where that came from!"

---

From: [email-masked] (Glen Daniels)
Date: Mon, 3 Aug 1992 08:34:23 -0700

I like the "TV studios" metaphor.... One of the other little
projects I was thinking about was a room which connects you to IRC -
for you, it appears you are in a room full of people (i.e. "look" will
tell you who's on your IRC channel), and for them, it looks like
you're another IRC user.  Whispers automatically get converted into
/msg's, and when you turn the big dial on the wall (to change
channels), all the people fade out and new ones fade in.  Alternately,
you get in an elevator and whatever floor you choose is the channel
you end up on....

		--Gub (Glen Daniels, [email-masked])
	"The future exists first in Will, then Imagination, then Reality."