Skip to main content
Version: 1.2

Terms, definitions and components

Definitions

  • A protocol is an independent and agnostic module that delivers a high level functionality by handling its complete lifecycle and accessing a set of server resources via Engine APIs
  • A model is the database representation of a table, when used in a protocol it can incorporate a Servable.App.Object subclass
  • A Servable Engine is a module that serves as a bridge to an actual Node JS framework that will handle the actual routing, database management etc
  • An Servable Engine API is a set of coherent apis that fill a certain high level need like Object, Query, ...

Servable Manifest 🐻

The Servable Framework is built around a set of simple requirements:

  • A protocol can be applied to multiple models
  • A protocol can have multiple models
  • A model can be pollinated by multiple protocols
  • A model belongs to a protocol
  • A Servable service is a protocol itself
  • A Servable engine is required for doing the actual heavy server work, ie routing, database and files management, etc.
  • A Servable engine chooses to implement partially or fully Engine APIs
  • A Servable service can switch between Servable engines as long as they implement the same set of Engine APIs
  • A protocol declares a list of required Engine APIs it needs to work
AppModel AModel BModel CProtocol Protocol βProtocol 𝛄Protocol appServable ServerLaunchCompute schemaStart server. Migrate database if neededRegister route, config, seeds, cron jobs, servicesStart local system artefactsServer EngineQueryObjectAuthRoutesJobs...Engine APIsDatabase
File storage
File storage
Text is not SVG - cannot display

Servable server

The Servable server acts as a central orchestrator and mediator. It computes the target schema, calls for a database migration if needed, loads protocols, registers seeding, configuration, routes, jobs, etc.

Protocols

Servable streamlines the server development by separating every "groupable" logic to be a protocol, so that it is organically extracted from the base code and possibly migrated into its own package. By doing so, Servable enforces a clear separation of concerns pattern out of the box. More

Just like a docker image is made to be platform agnostic, a protocol is designed to be as independent as possible from the current environment it's being used in. A protocol might depend on other protocols, but it does not need to know which application it is used for, or call any of its API, unless they are registered as a Service

Framework engine

The framework engine is a bridge to a more traditional Node JS framework. It conforms to Servable's engine APIs. By separating the actual implementation from the high level object manipulation, the Servable framework allows for a high reusability of your server and protocols code from the get-go. More

Model-protocol relationship

Model AModel BModel CProtocol Protocol βProtocol 𝛄Protocol appModel DModel EProtocol βProtocol ε
A view of a Servable model-protocol relationship tree