[
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:
//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.
I'd rather see these calls:
Variable[] getVariableDescriptions();
void setVariableValue(int id, Object newValue);
Object getVariableValue(int id);
void setVariableValues(int[] id, Object[] newValues);
Object[] getVariableValues(int[] id);
It is an error (throws an exception) if any Object is the wrong type.
We could make it so the API has fewer functions by removing the single
variable get/set functions, and forcing the client to use the
multi-variable forms even to get/set a single variable. Is a smaller API
better, or a convenient one?
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.
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 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.
-- 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]