LAMP Server

The platform server manages internal components and inter-component message-passing. Not all components are intended to be developed in-house, but wherever possible, open source and platform-agnostic projects should be preferred. If a component should be developed in-house, it must be open source. Unless specific requirements preclude its usage, components are to be developed and maintained in the Typescript programming language atop 64-bit Linux. Components should and must be embeddable within Docker containers for both staging and production. No specification or requirement is set forth for orchestration, but Docker Compose and Kubernetes are preferred.

  1. API Server
    1. Summary: the gatekeeper between the internal and external domains.
    2. Notes
      1. This component is implemented in Node.js.
      2. All API requests are stateless (i.e. there is no session management) and map to a single response.
  • All requests irrespective of authentication requirement must be accompanied by a client API key.
    • This pre-registered API key is recorded in the audit log with each request and serves as origination reference for resources and events.
  1. Using the Credential API, requests that require authentication and authorization are validated.
  2. Client app authentication requests are serviced through the integrated OAuth2 protocol.
  3. Data transport must be encrypted and decrypted as per security & privacy policy.
  4. Message Queue
    1. Summary: handles the synchronization of communication between all the above actors in the server layer.
    2. Notes
      1. This component is implemented by the Redis high performance key-value store, with an alternate implementation for low-power usage in Node.js.
      2. Each component upon startup must register itself with the message queue for service discovery.
  • Any component may create any number of topics for which other components may publish messages to or subscribe to.
  1. Implementation of database manipulation operations, automation events, and the audit log relies solely on subscription to the global topic; the API Server publishes requests here with a unique identifier awaiting response.
  2. Database
    1. Summary: the persistent data storage device supporting transient caching and complex querying.
    2. Notes
      1. This component is implemented by CouchDB, with an alternate implementation for low-power usage in Node.js using the PouchDB framework.
        1. A legacy adapter component shall exist to continually await changes (via polling) on the legacy Microsoft SQL Server database component and migrate documents to this active database component.
        2. As the LAMP Protocol is finalized to support audit log and revisions control, this component shall instead by implemented by Redis, Amazon S3, or for low-power usage, a naïve Dictionary/Map object in js.
      2. A key-value or document database (noSQL) is most ideal for storage needs of the LAMP Protocol, due to its hierarchical object data and high throughput access and low latency manipulation requirements.
        1. A relational database (SQL) such as Postgres or SQLite should serve as an alternate implementation consideration, only as necessary.
  • To support real-time intervention deployment and management, an intermediate in-memory cache is used to ease the load on main long-term storage databases.
    • This portion of the component shall be implemented using PouchDB in js.
    • Future implementations should either be Redis or Memcached.
    • Data from the cache shall be committed to persistent storage as constraints require.
  1. Intelligent Automations
    1. Components: Docker Environment, Attachment Container, Automation Scripts, Scheduler
    2. Summary: text
    3. Notes
      1. A compute platform such as a Docker-enabled system or AWS Lambda is used to handle actual execution of code once bundled.
      2. A dependency bundler such as Webpack, PIP, or Packrat is used to bundle each automation’s code to avoid dependency versioning conflicts that could crash or halt execution.

Was there something we didn't cover, or need more help? Let us know by making a post in the LAMP Community, or contact us directly. Thank you for your contribution! 🌟 Page last updated on January 29th, 2020.