K2 has been developed using a client/server model. The K2 server listens for connections either through a socket, or through Java™ RMI. It's very easy to develop a client that can connect to K2 through one of these paths, issue queries, and receive results. Three basic clients come with K2.

A simple interactive text-based client is provided, which connects to a K2 server through a socket connection. It accepts a query in OQL through a command-line style interface, sends it to the server, gets the result back as formatted text and displays it, then waits for the next query to be entered. This client is generally used to test the socket connection to K2, and to issue simple queries during the development process. It is not intended to be an interface for end users.

The other type of user connection is through RMI. These connections are capable of executing multiple queries at once, and can halt execution of queries in progress. This is the connection method that K2 servers use to connect to other K2 servers, to distribute the execution of a query.

There is a client which makes an RMI connection to a K2 server, with administrator privileges. The server restricts these connections to certain usernames connecting from certain IP addresses, and requires a password. Currently, an administrator can examine the state of the server, add and remove connections to individual drivers, stop currently running queries, disconnect clients, and bring the server to a state where it can be stopped safely. More functionality is planned for administrators in the future.

A client that runs as a servlet is also included with K2. Using code developed at the Computational Biology and Informatics Laboratory (at the University of Pennsylvania), this servlet allows entry of ad-hoc K2 queries and maintains the results for each username individually.

We expect that people will want to create their own custom clients for their users. A complete description of the process can be found in our technical document titled, "Building a K2 Client".

[K2 Front Page]