You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Story

A small project which allows to interact with an user, store data, schedule and observe science projects. It consists of 4 components and 1 client:

  • The client could be either a CLI or a Web Service
  • A gateway component that exposes a JSON RPC API and interacts with the rest of the system through the internal's system protocol
  • A database component which stores the data being used
  • A scheduler component that organizes the projects and assigns jobs to the observing mode
  • An observing mode which abstracts an observation entirely

Interface

ObservingMode Component

The observing mode component has a very simple interface which should let the interested people to know the telescope state and to issue an observation. It is composed of 2 methods:

  • state : TelescopeState (void)
  • observe : void (int uid) raises TelescopeNotAvailable, ProjectInUnexpectedState

Scheduler Component

The scheduler component has to prioritize the available projects, queue them and interact with the observing mode component to issue observations. It is composed of only 1 method:

  • getNextProjects : list<Project> (int num)

But it is important to consider that it is also doing to asynchronous tasks almost at all times:

  • Checking available projects and prioritizing them
  • Checking telescope state and issuing observations

Database Component

The database component has to make CRUD actions over the projects, according to other components demands. It is composed by several methods:

  • addProject : void (Project) raises UIDMustBeZero
  • getProject : Project (int uid) raises ProjectDoesNotExist
  • getProjects : list<Project> (void)
  • updateProject : void (Project) raises ProjectDoesNotExist, ProjectBeingObserved, ProjectAlreadyObserved
  • removeProject : void (int uid) raises ProjectDoesNotExist, ProjectBeingObserved, ProjectAlreadyObserved
  • forceChangeState : void (int uid, ProjectState state) raises ProjectDoesNotExist
  • clearProjects : void (void)

Gateway Component

The Gateway Component is a proxy between the system and the user interface. It offers a JSON RPC interface to a CLI or Web Service

  • getNextProjects : list<Project> (int num)
  • addProject : void (Project)
  • getProject : Project (int uid)
  • getProjects : list<Project> (void)
  • updateProject : void (Project)
  • removeProject : void (int uid)
  • getTelescopeState : State (void)

CLI / Web Service

The interface with the user could either be a command line client or a web service offering a GUI to the user.

It should allow the user to create, display and edit a project in a "convenient" way as well as displaying other useful data from the Gateway Component:

  • Telescope State
  • Generic data on Lists of Projects
  • Specific Data on single project
  • No labels