Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • The client could be either a CLI or a Web Service
  • A service gateway component that exposes a an API REST or 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

...

  • Add new science projects
    • User interacts with  interacts with CLI / WS
    • CLI / WS connects  connects through JSON RPC API method XXXX with Service  with Gateway Component
    • Service Gateway Component interacts with with Database Component to  to add the new science project
  • Remove science projects only if they haven't been observed yet (and are not being observed).
    • User interacts with CLI / WS
    • CLI / WS connects through JSON RPC API method XXXX with Service Gateway Component
    • Service Gateway Component interacts with Database Component to remove science project
      • Database Component removes the science project if possible
      • Database Component should raise an exception if the project is being observed or has already been observed
  • Retrieve next N projects
    • User interacts with CLI / WS
    • CLI / WS connects through JSON RPC API method XXXX with Service Gateway Component
    • Service Gateway Component interacts with Scheduling Component and requests the next 10 projects to be observed
  • Schedule projects
    • Scheduling Component regularly checks the available projects with the the Database Component
    • If there are projects available, then it prioritizes them and queues them in an internal list
    • A different thread is regularly checking with the Observing Mode component whether it is able to observe
      • If the Observing Mode component is IDLE, then the the Scheduling Component sends an observation request
  • Observe project
    • The The Observing Mode Mode component is a very simple participant that receives a request to observe
      • If it is already observing it should raise an exception
      • Otherwise it should mark the project as "Running" with the the Database Component and start the observation
        • It should simulate the observation by waiting a configured time in the project
        • Once it finishes it should mark the project as either "Success" or "Failure" with the Database 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 : 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:

...

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

...

  • 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 ProjectAlreadyObservedProjectDoesNotExist
  • clearProjects : void (void)

...

Gateway Component

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

...

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 service componentGateway Component:

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