<chapter id=chapter.client.server.db>
  <title/Registry Application/
  <p>An example application is where the service is a shared registry.
A client can connect to the registry server and add or lookup an
entry.  The registry is simply a dictionary.</p>
  <section>
    <title/Server <file/db-server.oz//
    <p>The registry server is compiled as follows:
<code display proglang=sh/ozc -x db-server.oz -o db-server.exe/
and can be started with the command line:
<code display proglang=sh/db-server.exe --ticketfile ?{file}/
Initially, it has an empty registry.
<code.extern display to="db-server.oz"></p>
  </section>
  <section>
    <title/Client <file/db-client.oz//
    <p>The client loads the pickled ticket from the given URL and uses
it to obtain from the server the forwarding procedure.  The client can
be compiled as follows:
<code display proglang=sh/ozc -x db-client.oz -o db-client.exe/
and can be invoked in one of two ways:
<code display proglang=sh
/db-client.exe --url=?{URL} --get=?{KEY}
db-client.exe --url=?{URL} --put=?{KEY} ?{VAL}/
The first form retrieves a entry from the registry and displays it on
standard output.  The second form stores an entry in the registry.
<code.extern display to="db-client.oz"></p>
  </section>
</chapter>
<!--
Local Variables:
mode: sgml
mode: auto-fill
sgml-default-dtd-file: "chapter.ced"
sgml-auto-activate-dtd: t
adaptive-fill-mode: nil
End:
-->
