This chapter tells you how to manage the knowledge service. It explains what is needed to allow Istar to act as a knowledge server, how to start the server module, and how to prepare KBs for server use. There is also section giving exceptions in use of the server.
Each of these has to be prepared beforehand for running the knowledge server. Click the links above to take you to the section that tells you how to prepare each.
In that role, the minimum you need to do is quite simple: to add a line for
your KB to the file IstarSys:serverkbs
which contains at least
the following entries (they are parsed using the same mechanism as CLI
program parameters are parsed, namely pairs containing keyword followed by
value, or keyword alone if a switch):
KBFile "dd:ff"
- where dd:ff is the complete path for the
file containing the KB, and it is safer to put it into quotes as shown.
Label "short label"
- where "short label" is the name of
the KB presented to the user on the welcome
page. It should be in quotes unless it contains no spaces. It can be
any length you wish, but should normally be short. (In fact, you don't
need a label if the KB is not to be shown on the welcome page, such as when
it is a direct entry KB, but it's safer to have
one.)
KBFile "Istarsys:KBs/ServerKBs/Con" Label "Write your own
Contract"
That is the minimum. But usually you will also add some other parameters
to the line, described below. You would normally
have, in addition to these, an identification number and various
descriptions and introductory text for the KB.
====ShortDesc
and LongDesc
which provide short
and long descriptions of the KB on the welcome page, Intro
which provides an introduction page when a user selects a KB, and
QnNote
which is a note placed on every question page that the
user sees.
The ServerKBs file contains a line for each KB that is to be offered via the server. No others can be offered, which ensures security of files. Note that it is perfectly valid to have several different lines for the same KB. One reason for doing this is that for different users you might wish to have different description or introductory texts. Another is that for direct entry to a KB you might want to provide different texts.
Once you have made up the IstarSys:serverkbs
file as needed,
you should start the server and test it out. See Local Testing below.
http://146.87.82.15:7007/
This sends a very short message to Istar, which in response sends the standard welcome page. However, you can have different links for direct entry to a KB.
When the user connects by direct entry not only do they not receive the welcome page at the start, but they will not have the option of returning to it later. (Should they wish to access the welcome page then they may do so via the Istar home page or by the standard hyperlink connection.)
Any KB mentioned in the ServerKBs file can be
accessed directly. All you need to do is set up, in the page from which
you want the direct link to be made, a hyperlink that contains the
Id
number of the KB, for example:
http://146.87.82.15:7007/Dnn
where 'D' means 'direct entry' and nn is the Id number. Note that you have to know the Id number and it must never change after that.
You can also have semi-direct entry, in which direct entry is made to the KB, but the user then has the option of receiving a welcome page once they have been through their first inference session. This is achieved by a similar link, in which the 'D' is replaced by 'S' (for 'start').
http://146.87.82.15:7007/Snn
If you do not want your direct entry KB to appear on the welcome page, then
include the NoShow
parameter in the line for that KB in the ServerKBs file. If it is important that the user
has access to only this KB, and no others, even by the standard entry, then
you should set up a server machine that is dedicated to this KB and
supports no others.
loopback
in the TCP stack. I give my
machine a local IP address of 10.0.0.1
or similar, and access it by a browser on the same machine with a url of
http://10.0.0.1:7007
. Alternatively, you can link into it
across the network. 7007
is the TCP port
number on which Istar listens.
In either case, you must provide a ServerKBs file, which contains details of which KBs are to be allowed to run by the server.
ServerMode
Two other parameters can also be given. ServerKBs "dd:ff"
tells where the ServerKBs file is ("dd:ff" full
path and filename). If not given, the file is assumed to be
"IstarSys:serverkbs". ServerPort NNNN
tells Istar which TCP
port to listen on, 7007 being the default.
Normally you won't include these in the standard IstarPrefs file, but in a
special IstarPrefs.server
version of it.
stack 20000
IstarSys:Istar IstarSys:IstarPrefs.server
Note the stack size. Not sure what it really needs, but it is more than the standard 4096 and (almost certainly) a lot less than 20000.
I have made up an executable file with those two commands that I execute (from a StartServer icon, which also runs up AmiTCP etc.).
The server machine must have a known IP address. This can be either on a
local network, or one designated by an internet provider. Only the latter
allows worldwide access. It is typically set up quite easily by means of
the TCP ifconfig
command. In my setup, I include it as a
command in my TCP startup file, of the form:
AmiTCP:bin/ifconfig AmigaLink 10.0.0.1
which sets up my machine to be known as '10.0.0.1' on my local AmigaLink network. On my main knowledge server machine I have the commands:
AmiTCP:bin/ifconfig Hydra 146.87.82.15
AmiTCP:bin/ifconfig AmigaLink 10.0.0.3
which sets up the server machine to be known as '146.87.82.15' worldwide on the Internet via my Hydra ethernet connection (which connects to my organization's network and thence out to the Internet), and also '10.0.0.3' on its local AmigaLink network. With this arrangement (the machine being known by two different IP addresses on two different networks), I can link to the main server with a local network, using my '10.0.0.1' machine to test the server.
How you do this depends on how you start the
server. If you start the server manually using the
StartSV
button on the Main Control
Panel, you should set the Port
gadget to whatever port
number you like before you hit the button. If Istar is started in
server mode, then the preferences file should contain the port number
desired as a parameter:
ServerPort NNNN
where NNNN is the number you wish.
Id NN
- where NN is a number that identifies this KB
uniquely among all others mentioned in the file. Must not be zero, but can
be anything up to 32000. If you don't have this then the Id is assumed to
be the line number in the serverkbs
file - but BEWARE because
if another KB is given the same Id, only one of them will be accessible
(even though both of them will be apparently offered to the user). Also,
the Id would not be absolute, as required if the KB is to be available for
direct entry.Normally you should assign your own
Ids.
KBFile "dd:ff"
- where dd:ff is the complete path for the
file containing the KB, and it is safer to put it into quotes as shown.
Label "short label"
- where "short label" is the name of
the KB presented to the user on the welcome
page. It should be in quotes unless it contains no spaces. It can be
any length you wish, but should normally be short. (In fact, you don't
need a label if the KB is not to be shown on the welcome page, such as when
it is a direct entry KB, but it's safer to have
one.)
ShortDesc "dd:ff"
- where "dd:ff" is a file containing
some text to go in a paragraph following on from the label on the welcome
page. Normally it will be a couple of sentences to tell the user what the
KB is about.
LongDesc "dd:ff"
- where "dd:ff" is a file containing a
longer description of the KB. It will be placed lower down the welcome
page, pointed to from the paragraph containing the label and ShortDesc.
The text can be as long as you like, containing HTML paragraphs and even
minor sections (h5) or (h6) if you wish; it is preceded by an h4 heading
that is the Label text. Typically it will tell the user more about the KB
and what it can do for them, so that they can decide whether to access it
or not.
Intro "dd:ff"
- where "dd:ff" is a file containing
introductory text about the KB that will form the main body content of a
page presented to the user after they select the KB. It can be as long as
you like, including all the page sections and their headings, but not the
'body' keywords, which will be supplied by Istar. When presented to the
user, it will be followed by several hyperlinks supplied by Istar, to start
the inference process, to set timing, to stop and to return to welcome
page. If a KB has no Intro file then no introduction page will be given to
the user, and as soon as the user selects the KB the inference session will
start and the first question will be sent to the user. This can be a bit
disconcerting unless the user knows the KB well. Normally the Intro page
will tell the user what to expect when running the KB, such as how many
questions might be expected, what to do with results, whether a document
can be produced, etc.
QnNote "dd:ff"
- where "dd:ff" is a file containing text
to be placed at the bottom of every question page presented to the user.
Normally it will be a short paragraph, and might typically give a hyperlink
to a web page somewhere that describes the KB.
NoShow
- which tells Istar to not show this KB on the
welcome page. It would be used for KBs that are not for general access,
such as test KBs.
Label
, ShortDesc
,
LongDesc
. Intro
and QnNote
as you
wish. Typical usages have been given above, but feel free to vary them.
Keep the needs of the user in mind.
Id 1 KBFile "Istarsys:KBs/ServerKBs/Con" Label "Write your own Contract" ShortDesc "IstarSys:files/conshort" LongDesc "IstarSys:files/conlong" Intro "IstarSys:files/conintro"
Id 2 KBFile "Istarsys:KBs/ServerKBs/Trees" Label "Tree Species Selection" ShortDesc "IstarSys:files/treeshort" LongDesc "IstarSys:files/treelong" QnNote "IstarSys:files/treeqnotes" Intro "IstarSys:files/treeintro"
Id 3 KBFile "Istarsys:KBs/ServerKBs/ICT" Label "Internet Trust" ShortDesc "IstarSys:files/ictshort" LongDesc "IstarSys:files/ictlong"
Id 10 KBFile "Istarsys:KBs/ServerKBs/Shares" Label "Shares Advisor" ShortDesc "IstarSys:files/sharesshort" LongDesc "IstarSys:files/shareslong"
Id 90 KBFile "Istarsys:KBs/ServerKBs/inputs.2" Label "Test KB" NoShow
You can set the default linger time by a 'PLx' message, where x is the number of seconds to set it to. This is only for testing and will probably be removed later. The standard linger time is 2 seconds, but on 0 seconds a browser on a slow machine (mine) will cause a RST and truncation of the HTML page.
I often 'ping' the machine just to check it is still running.
The behaviour of the clients and the popularity of your knowledge service can be inferred as follows:
Last updated: 17 September 1999.