The Ganymede server implementation.

Includes all classes and interfaces that comprise the Ganymede server and which are not intended to be directly referenced or used by the Ganymede client or admin console.

The Ganymede server's main() entrypoint is in the {@link arlut.csd.ganymede.server.Ganymede} class. The main() method is responsible for bootstrapping the Ganymede server and getting it ready for use.

Here is the general order of operations for server startup:

  1. A {@link arlut.csd.ganymede.server.DBStore} singleton object is created which manages Ganymede data storage. Data is loaded by DBStore into memory from a ganymede.db file on disk, supplemented by any non-consolidated transaction records in the Ganymede journal file.
  2. A single {@link arlut.csd.ganymede.server.GanymedeServer} object is created for the server's internal use.
  3. The server starts a singleton {@link arlut.csd.ganymede.server.GanymedeScheduler} which handles the scheduling of server-side tasks on independent threads. {@link arlut.csd.ganymede.server.GanymedeBuilderTask} and {@link arlut.csd.ganymede.server.SyncRunner} objects which are specified in the Ganymede data store are registered in the scheduler.
  4. The server creates a singleton {@link arlut.csd.ganymede.server.DBLog} object which handles logging and email notification for the server. A {@link Qsmtp.Qsmtp} object is created which spawns a thread for transmitting email generated by Ganymede.
  5. An RMI registry is created and bound to a specified network port so that clients can create RMI connections to get access to the server.
  6. The previously created GanymedeServer object is registered in the registry. Clients and admin consoles can now connect to the server and call methods on the {@link arlut.csd.ganymede.rmi.Server} remote interface. Methods in this interface can in turn return remote references to other objects created in the Ganymede server, through which work is done with the server.

At this point, the server is started and ready for operations. All server operations from this point on will be initiated by the Ganymede Scheduler which is running on its own background thread, or by clients who have connected to the server through RMI. All RMI calls to the server are serviced on independent threads, which cooperate in a multithreaded context via a number of synchronization and queueing systems in the Ganymede server.

Normal clients connect to the server via a call to the Server interface's {@link arlut.csd.ganymede.rmi.Server#login(String,String)} method, which returns a remote RMI reference that implements the {@link arlut.csd.ganymede.rmi.Session} interface which is backed on the server by a client-facing {@link arlut.csd.ganymede.server.GanymedeSession} object. Each client has its own GanymedeSession object, which lives in the server for the duration of the client's connection and which is responsible for tracking security restrictions on the client and providing appropriately limited access.

Each GanymedeSession, in turn, references a unique {@link arlut.csd.ganymede.server.DBSession} object which is responsible for supporting operations on the server's single underlying {@link arlut.csd.ganymede.server.DBStore} database object.

Each DBSession contains a reference to a unique {@link arlut.csd.ganymede.server.DBEditSet} transaction manager which coordinates checkpointing, rollback, and commit for changes made by that DBSession.