[alicebot-archcomm] Could <services> use a very simple data exchange protocol
Gary Robertson
alicebot-archcomm@list.alicebot.org
Wed, 06 Aug 2003 10:08:26 -0400
--=====================_190641765==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
In a day or two, I will have an aiml 'service' operating
at http://SystemsCheck.com/aimlservice/ that we can use to further explore
fetch possibilities.
I hope to have as my first example, a simple 'service' that will return the
CURRENT TIME in a number of formats.
I see the opportunity to use this test platform to try out a variety of
data exchange protocols. One that I am now proposing has its grounding in
the 'signature' or overlay features found in many programming languages.
The goal of the service will be to return the CURRENT TIME on demand, and
in the specific format, or formats, specified. The <service> will support
security, timezone, usedaylightsavings and up to 3 time output
formats: standard, military, and verbal.
The idea is this: The developer makes a service request by sending a
string of 'service'-legal ATTRIBUTE=DATA pairs. Here is an example
<services
name="currenttime"
url="http://SystemsCheck.com/aimlservices/currenttime.cfm"
url2="http://BackupSystem01.com/aimlservices/currentime.cfm"
<!--optional--->
url3="http://LastChance.com/aimlservices/currentimte.cfm"
<!---optional-->
parameters="userid='myname'"&"userpass='mypass'"&"timezone='eastern'"&usedaylightsavings='yes'"standardformat=''"&"verbalformat=''"&"resultcode=''">
In the example above, 'name 'is defined as anything the developer wants and
is used for quick reference only. I cannot resist suggesting that there be
a primary server with (optionally) up to two backup servers that AIML can
call upon to supply the request. Why 3? Well, triple system redundancy is
good enough for NASA and already one better than the Internet DNS system,
so why not?
Implicit in the selection of the pairs above are the details of the
request, and they must conform to whatever is 'legal' in context for the
service.
This particular service requires userid and userpass and timezone to be
supplied. The input parameter of usedaylighsavings is 'optional' and
defaults to 'yes' if not specified. In this example, there were two output
formats requested; they are standardformat and verbalformat. The third
format, militaryformat, was not requested. By merely supplying the
attributes of standardformat and verbalformat assigned with anything (in
this case null string) the request is made. And although in this example
'resultcode', a reserved parameter which was requested, it will always be
returned, requested or not. We could agree that code 0 (zero) means
success and any other code is whatever the service developer documents it
to be.
I would suggest that all services support the reserved parameter:
help='' which will cause the return of help documentation for that
service. This way a developer can just directly call up the url and get
the 'skinny' immediately. For example:
http://SystemsCheck.com/aimlservices/currenttime.cfm?help=""
Based on the request in this example, the service will return the
appropriate ATTRIBUTE-PAIRS separated by commas. In this case they would be:
standardformat="10:22 pm", verbalformat="ten twenty two p. m.",
resultcode="0"
The AIML interpreter would automatically create corresponding variables (if
need be) and stuff them with the returned data values.
My largest concern about this protocol has to do with the design of the
return string above. Is it too simple to safely parse by the
interpreter? Is XML so much better that it is worth the overhead to use it
instead?
-gr
--=====================_190641765==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
In a day or two, I will have an aiml 'service' operating at
<a href="http://systemscheck.com/aimlservice/" eudora="autourl">http://SystemsCheck.com/aimlservice/</a>
that we can use to further explore fetch possibilities.<br><br>
I hope to have as my first example, a simple 'service' that will return the CURRENT TIME in a number of formats.<br><br>
I see the opportunity to use this test platform to try out a variety of data exchange protocols. One that I am now proposing has its grounding in the 'signature' or overlay features found in many programming languages.<br><br>
The goal of the service will be to return the CURRENT TIME on demand, and in the specific format, or formats, specified. The <service> will support security, timezone, usedaylightsavings and up to 3 time output formats: standard, military, and verbal.<br><br>
The idea is this: The developer makes a service request by sending a string of 'service'-legal ATTRIBUTE=DATA pairs. Here is an example<br><br>
<services<br>
<x-tab> </x-tab> name="currenttime"<br>
<x-tab> </x-tab> url="<a href="http://systemscheck.com/aimlservices/currenttime.cfm" eudora="autourl"><font color="#0000FF"><u>http://</a>SystemsCheck.com/aimlservices/currenttime.<a href="http://systemscheck.com/aimlservices/currenttime.cfm" eudora="autourl">cfm</a></u></font>"<br>
<x-tab> </x-tab> url2="<a href="http://backupsystem01.com/aimlservices/currentime.cfm" eudora="autourl">http://BackupSystem01.com/aimlservices/currentime.cfm</a>" <!--optional---><br>
<x-tab> </x-tab> url3="<a href="http://lastchance.com/aimlservices/currentimte.cfm" eudora="autourl">http://LastChance.com/aimlservices/currentimte.cfm</a>" <!---optional--><br>
<x-tab> </x-tab> parameters="userid='myname'"&"userpass='mypass'"&"timezone='eastern'"&usedaylightsavings='yes'"standardformat=''"&"verbalformat=''"&"resultcode=''"><br><br>
<br>
In the example above, 'name 'is defined as anything the developer wants and is used for quick reference only. I cannot resist suggesting that there be a primary server with (optionally) up to two backup servers that AIML can call upon to supply the request. Why 3? Well, triple system redundancy is good enough for NASA and already one better than the Internet DNS system, so why not?<br><br>
Implicit in the selection of the pairs above are the details of the request, and they must conform to whatever is 'legal' in context for the service. <br><br>
This particular service requires userid and userpass and timezone to be supplied. The input parameter of usedaylighsavings is 'optional' and defaults to 'yes' if not specified. In this example, there were two output formats requested; they are standardformat and verbalformat. The third format, militaryformat, was not requested. By merely supplying the attributes of standardformat and verbalformat assigned with anything (in this case null string) the request is made. And although in this example 'resultcode', a reserved parameter which was requested, it will always be returned, requested or not. We could agree that code 0 (zero) means success and any other code is whatever the service developer documents it to be.<br><br>
I would suggest that all services support the reserved parameter: help='' which will cause the return of help documentation for that service. This way a developer can just directly call up the url and get the 'skinny' immediately. For example: <br><br>
<font color="#0000FF"><u><a href="http://systemscheck.com/aimlservices/currenttime.cfm?help" eudora="autourl">http://SystemsCheck.com/aimlservices/currenttime.cfm?help</a>=""<br><br>
</u></font>Based on the request in this example, the service will return the appropriate ATTRIBUTE-PAIRS separated by commas. In this case they would be:<br><br>
<x-tab> </x-tab>standardformat="10:22 pm", verbalformat="ten twenty two p. m.", resultcode="0"<br><br>
The AIML interpreter would automatically create corresponding variables (if need be) and stuff them with the returned data values.<br><br>
My largest concern about this protocol has to do with the design of the return string above. Is it too simple to safely parse by the interpreter? Is XML so much better that it is worth the overhead to use it instead?<br><br>
-gr<br><br>
<br>
</html>
--=====================_190641765==_.ALT--