fatPage picture

ODB Server

This suite is part of the foundation for the web publishing system software we're building in Frontier.

It implements a very high-level TCP-based remote procedure calling protocol between Frontier databases running on different machines.

Commands are sent from the client to the server. Along with the command, which is a string of characters, a table of values, called "attributes" is sent along.

A script on the server side, in user.odbServer.commands, processes the table and sends back a result which can be a single value or a table of values.

This suite is for Frontier experts who want to write custom servers that do not run behind HTTP servers.

Setting up a server

After getting the suite from this fat page, open odbServer.init and run it.

Add a script at user.odbServer.commands.sampleCommand. We've included a sample at odbServer.sampleCommand. It echoes the "msgText" attribute in the main window and returns a table containing the names of five randomly selected U.S. states.

Run odbServer.serverStart.

That's it, your server is ready to run.

Calling from a client

To test out the client side, first run odbServer.init.

Set user.odbServer.prefs.serverAddress.

Look in odbServer.test to see an example of how to call the server.

Bug fix on Fri, May 16, 1997 at 8:18:14 AM by DW

In odbServer.commandHandle, it wasn't returning the text returned from the command handler in user.odbServer.commands. It appeared to work because of a UserTalk convention that if a script doesn't explicitly return a value, the last value generated by the script is the returned value. This apparently isn't always true.

Bug fix on Mon, May 19, 1997 at 4:37:39 PM by PBS

odbServer.commandSend writes in 1K chunks instead of all at once.

odbServer.daemon.daemon now reads in a loop, and can read more than 10,000 bytes -- allowing for larger objects to be sent.

Coming soooon

Software that builds on this suite.

This is a fat web page containing suites.odbServer. More info on fat pages here.

© copyright 1997-98 UserLand Software. This page was originally posted on 5/13/97; 1:11:06 PM and it was last built on 2/21/98; 3:49:17 PM. dave@scripting.com.