Nothing Special   »   [go: up one dir, main page]

Skip to content
Ruben Taelman edited this page Mar 13, 2018 · 3 revisions

This document describes the architecture of this project.

Architecture

In general, this architecture allows certain tasks to be performed by one or more actors in a certain bus, and where a mediator can choose one or more appropriate actors to perform the actual task.

The main modules we have are the following:

  • Bus: Accepts messages and sends those to different actors.
  • Actor: Performs a certain action, based on a message from a bus. Can also send messages to other buses.
  • Mediator: Wraps over a bus, to detect the best actor for a certain task based on some conditions. For example, a certain mediator could find the fastest HTTP actor.
  • Mediator type: A certain category of mediators. For example, different mediation implementations could exist for finding such a fastest HTTP actor.

A message can either can either be a 'can'-message, or an 'action'-message. A 'can'-message is sent to ask actors if they can solve the task, while the 'action'-message tells them to actually perform the task.

Modularity

Comunica-core only contains the implementation of the core classes of this architecture. Each actor, mediator and mediator type must be a separate module.

We use the following naming convenient for (NPM) modules:

  • Bus types: @comunica/bus-[name-of-bus-type]
  • Mediator types: @comunica/mediatortype-[name-of-mediator-type]
  • Mediators: @comunica/mediator-[name-of-mediator]
  • Actors: @comunica/actor-[name-of-bus-type]-[name-of-actor]

Technology

TypeScript

Easier development because of static typing.

Components.js

Modular component injection, with a semantic config file describing how each component should be wired.

Clone this wiki locally