Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [hyades-dev] Variable group discovery, streaming generally

> I'm not sure you updated this document as much as you thought you had. 
The 
> class declaration still has strings for IDs and per-group disclosure 
of 
> variable groups:

The document was sent out before Andy mentioned his preference for 
integer ids - I'll amend these in the next one I send out.  Also,  the 
interface below assumes that when a VariableGroup is returned it also 
returns all of its children.  I should explicitly state this in the 
document but the methods below are NOT for polling the structure of 
groups.  When you get the root variable group or a variable group with a 
particular ID (that you know about somehow) you would get the entire 
structure under that variable group.

> //get group structure
>     VariableGroup getRootVariableGroup();
>     VariableGroup getVariableGroup(String id);
> 
> Also, now that I look at it again, it seems that the protocol requires 

> passing the complete structure of a Variable, including all the 
> (unchanging) strings associated with it, just to get or set its value. 
I 
> don't like that at all. That's why I referred to variables as having 
> metadata: each one has an id and a value, and SEPARATELY has a block 
of 
> data describing it: its name, description, type, XSD info, etc.

This also is a misinterpretation.  Although the entire variable 
structure is passed into and out of the interface, only the value of the 
variable need be modified.  The interface does not necessarily map to 
the protocol.  I would think the underlying implementation of the 
methods would be something like:

	public void setVariable(Variable v) throws BadTypeException{
		String id = v.id;
		Object x = v.value;

		//do some type checking
		...
		//if wrong type, throw BadTypeException

		//send the command to set varible
		...

	}

> Also, I see that in Variable, the value is of type Object. We should 
be 
> clear that this Object must actually be one of a specific list of 
classes, 
> the one appropriate for the variable's type: Integer, Float, String, 
> whatever. It can't really be an arbitrary object.

OK, I'll add this to the doc.

> Is the set of variables static, fixed at an agent's birth? I think it 
> should not be. Some agents are dynamic and can be told how to behave 
from 
> one run to the next, or even one minute to the next. For example, a 
> "scriptable byte-code insertion agent" might permit the scripts that 
drive 
> it to declare new variables that would be visible to the caller. Can 
we 
> handle "live" changes to the set of variables that are available?

I agree that the set of variables should be dynamic.  This is one reason 
why I added the getVariableGroup(String gid) method, because you may 
want to refresh a whole group without refreshing the entire variable 
structure.

> I see in the "UI Guidelines" part of this document that you describe 
> commands as a special case of variables. I like the idea, but I think 
> there should be a flag or special type for buttons. I see the 
parallels in 
> the mechanisms between sending a command and setting a variable, and 
it's 
> fine if it works that way under the covers, but the user experience 
> shouldn't be the same. Otherwise you get a geeky user interface.

OK, so this could maybe be a flag on a variable to tell the user 
interface that this is an event based variable.

I'll amend the document to explain all of the above and add the changes.

Antony





-- Allan Pratt, apratt@xxxxxxxxxx
Rational software division of IBM




"Antony Miguel" <antony.miguel@xxxxxxxxxxxxx> 
Sent by: hyades-dev-admin@xxxxxxxxxxx
08/23/2004 06:57 AM
Please respond to
hyades-dev


To
<hyades-dev@xxxxxxxxxxx>
cc

Subject
Re: [hyades-dev] Variable group discovery, streaming generally






Here's the latest update of the Choreography HCE requirements document.

I agree that using methods to poll for a structure is a bad idea, so 
I've
added classes to represent variables and variable groups.

cheers

Antony Miguel
Scapa Technologies
antony.miguel@xxxxxxxxxxxxx
+44 131 550 1766

[attachment "Choreography HCE Requirements.zip" deleted by Allan K 
Pratt/Cupertino/IBM] 

_______________________________________________
hyades-dev mailing list
hyades-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/hyades-dev



Back to the top