The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]

RE: Context parameters within Message Bodies


  • Subject: RE: Context parameters within Message Bodies
  • From: Kevin Hawkins
  • Date: Tue, 02 Dec 2003 14:52:00 +0000

I don't think I've done a particularly good job of conveying the issue here
:-)

The problem that made me aware of this was when I was trying to recover
'state' for a particular device - in this case the number of emails
relating
to a particular account. Eg <a
href="/group/xAP_developer/post?postID=XX9_jkIPeuC4IrXRoLKS3DpvqkvVgPSAw_UuzaWiUtpKrqFcN1dY38KufO6DaUrM3adUGA">kevin@a...</a>

Take 3 accounts..

<a
href="/group/xAP_developer/post?postID=XX9_jkIPeuC4IrXRoLKS3DpvqkvVgPSAw_UuzaWiUtpKrqFcN1dY38KufO6DaUrM3adUGA">kevin@a...</a>
<a
href="/group/xAP_developer/post?postID=_L_7e-Ja39pzlg12g3RK7WZl0oEcE04uFZ7bkKNaQvsXvyoFnsymkgcMIllYFkQFSH0">john@a...</a>
<a
href="/group/xAP_developer/post?postID=JJeDioN6E9jYPZtjKFpMRjEZ1ofRUjYWTVVEP9zixP7lRBwg0uUhdRuQPXJrqHT4pOBj">kevin@x...</a>

Ignore the implementation detail and assume the following

Status
{
server=abc.org
total=1
username=kevin
priority=urgent
}
Status
{
server=abc.org
total=2
username=john
priority=normal
}
Status
{
server=xap.net
total=3
username=kevin
priority=normal
}

Not abc.org appears in 2 of the 3 messages as does kevin

Now the problem is that I look out for "total=" in a
"status" body
- to ascertain if it is the right one though I have to then check the
server
is "abc.org" AND the username is "kevin". Ie the total
is valid only in the
context set by two other parameters. This example uses two but it could be
three, ten or indeed any other number. It is not clear in the message which
parameters are 'context' (server &amp; username) and which are 'state'
(total &amp;
priority). Indeed and this is the crux - priority could be a state value
that show you the highest priority of emails waiting or it could be a
'context' paramater that means there are these 'total' number of 'urgent'
messages waiting. Now the schema of course would clarify this but it is not
'available' to all receivers.

If I want to recover the state you NEED full knowledge of the schema
to recover context - and this makes state recovery awkward - particularly
when trying to track state information automatically within an application
like HomeSeer via a plugin. A state cache is also awkward.

This problem goes away if you can identify the context parameters
within a message. When there are only 1 or 2 contexts then yes you can drag
them out to hardware subs acme.mail.server:abc and to bodies perhaps
status.kevin but as this expands beyond 2 to say 5 it becomes very awkward.
Either you start using long hierarchical hardware subs
acme.mail.server:abc.company.sales.kevin.personal or hierarchical section
names. Or as P mentions a construct like user.0=kevin but expanded for more
levels body.1=abc.company.sales.kevin.personal where all 'context'
parameters are pulled into a body 'contents' index.

I just feel this is messy and awkward whereas

Status
{
SERVER=xap.net
total=3
USERNAME=kevin
priority=normal
}

... Or a variant ( eg $server=xap.net or server[xap.net] ) is very clear
and very easy to parse to maintain a state table and to allow state to be
automaticaly and correctly identified by any controller eg HomeSeer. Plus
no
requirement for schema interpretion or availability. I would like an
alternative solution though if poss as I don't really like this !

Kevin



> -----Original Message-----
> From: Patrick Lidstone (Personal E-mail)
> [mailto:<a
href="/group/xAP_developer/post?postID=rsjCtVh9MxAXdVwI1vHGjLrRAK6cL80M9OLMt18BsYvlDYgwO5Ojtv5fyTa8DBTxojZhVjLXoGxMXg">patrick@l...</a>]
> Sent: 02 December 2003 13:29
> To: <a
href="/group/xAP_developer/post?postID=Kn93SSHFg38o7ip6SkdH7kCcRVhnnCFw2nrYdjiOI58sObH_jBKA2a6sVidq9v0Wc_hk-B8KPwn-PthTpLvSZKYK0UM">xAP_developer@xxxxxxx</a>
> Subject: RE: [xAP_developer] Context parameters within
> Message Bodies
>
> > Have you some input on this issue of context being
> carried within
> > bodies ie where the data relates to a state for a
> specific combination
> > of other tags ?? (implicit only from the schema)
> >
> > Eg
> >
> > Status
> > {
> > server=pop.ukusa.co.uk
> > total=1
> > username=kevin
> > }
> >
> > Where two parameters define what the total relates to ??
>
> I'm coming in late to this thread, so forgive me if some
> of this has been covered already.
>
> There are two issues here I think:
> 1) How to label a single status message as containing data
> related to Kevin
>
> and
>
> 2) How to allow for multiple bodies in a single message
> which can be readily parsed.
>
> For the first case, I would use:
>
> status.kevin
> {
> ...
> }
>
> For the second case, you may want to know which status
> items you've got.
> There
> are a number of hybrid schemes possible - here is just
> one. Notice the duplication of the user id info - it means
> you can, if you wish, discard the status.info block and
> e.g. display mailbox status by simply breaking apart each
> status.user.x block.
>
> Perhaps this could be addressed by:
>
> status.info
> {
> user.0=kevin
> user.1=jim
> user.2=fred
> }
>
> status.user.0
> {
> ...
> user=kevin
> ...
> }
>
> status.user.1
> {
> ...
> user=jim
> ...
> }
>
> > And more generally
> >
> >
> > X10.status
> > {
> > Device=A10
> > State=ON
> > }
> >
> > Vs
> >
> > X10.status
> > {
> > A10=ON
> > }
>
> I personally (and I don't think there is necessarily a cut
> and dried answer to this) favour the first form because it
> is generic. The second form assumes (a) that you are using
> explicit X10 addressing, not some alias for the device and
> (b) that the receiver has an implicit knowledge of how to
> construct an X10 address. Conversely, the first form could
> be used for generic control of any stateful device, and a
> receiver doesn't have to know diddly squat about the
> mechanics of addressing/identifying X10 devices.
>
> HTH, do tell me if I have missed the point,
>
> Patrick
>
>
> ------------------------ Yahoo! Groups Sponsor
> ---------------------~--> Buy Ink Cartridges or Refill
> Kits for your HP, Epson, Canon or Lexmark Printer at
> MyInks.com. Free s/h on orders $50 or more to the US &amp; Canada.
> <a href="http://www.c1tracking.com/l.asp?cid=5511";>http://www.c1tracking.com/l.asp?cid=5511</a>
> <a href="http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dpFolB/TM";>http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/dpFolB/TM</a>
> -----------------------------------------------------------
> ----------~->
>
> To unsubscribe from this group, send an email to:
> <a
href="/group/xAP_developer/post?postID=5p3eQObRi96jlxxFZsbaZIL0rE9BaJsXeQAyhntS2p-PX_Me4XWnhroRB6ucfvFtsf_C5ZJWVnFKvf0lf5QXrLWpnVBNDCZenGi5sHO-YuA7JA">xAP_developer-unsubscribe@xxxxxxx</a>
>
>
>
> Your use of Yahoo! Groups is subject to
> <a href="http://docs.yahoo.com/info/terms/";>http://docs.yahoo.com/info/terms/</a>
>
>






xAP_Development Main Index | xAP_Development Thread Index | xAP_Development Home | Archives Home

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.