Leverege Platform

Leverege Platform

  • Overview
  • JSDocs
  • REST API
  • Help

›Services

Platform Overview

  • Overview
  • Architecture
  • Core Concepts

Guides

  • Platform Setup
  • Building a Project
  • API UI

Services

  • API Server
  • Message Processor
  • Transponder
  • Reason
  • Scheduler
  • Messenger
  • Emailer
  • Rest Server
  • DB Curator

API

  • API
  • Interface
  • Project
  • System
  • Device
  • Blueprint
  • Collection
  • Child
  • History
  • Scenario
  • Script
  • Template
  • Timer
  • User
  • Users

Server Libraries

  • Log
  • Messages
  • Message Queue
  • Cache
  • Lock
  • Limit
  • Cluster Manager
  • Error
  • Exit

Utilities

  • Promise
  • Data Store
  • Factory
  • Path
  • Reasoner
  • Object Util
  • Array Util
  • String Util
  • Base62 Util
  • Value Cache
  • Validator
  • Lol

UI

  • API Redux
  • UI Builder
  • UI Elements
  • UI Redux
  • UI Mapbox Elements
  • UI Active Theme
  • UI Color Elements
  • UI Linear View Elements

Message Processor

Message Processor is a service responsible for receiving, processing, and then forwarding inbound messages along into the Leverege Platform.

The first step in processing a message is to check the type of id. If the device has an external network id attached, message-processor will look up the device against that network. The next step in processing the inbound message is to create a message with a type corresponding to the internal version of the message. Then, that message gets device data, system data, project data and blueprint data attached. If the blueprint has a Message Route defined, it will be assigned onto the message.

The route that gets attached onto the message is responsible for telling the system which order and services the message will be sent to. A message route is created under the msg routes section of the Leverege UI, and then attached to a blueprint, or a specific device under their respective info tabs. The message route is a JSON structure that defines what the routes that different types of messages will follow.

Configuration

Required

NameDescription
MODEL_FIREBASE_SERVICE_ACCOUNTservice account key to firebase database for models
MODEL_FIREBASE_DATABASE_URLurl to firebase database for models

Optional

NameDescriptionDefault
TRANSPORT_CONFIGconfig for readers and writers{ type, host, port }
NSQ_HOST_ADDRhost address for NSQ, not needed if TRANSPORT_CONFIG is specified'127.0.0.1'
NSQ_HOST_PORTport for NSQ, not needed if TRANSPORT_CONFIG is specified4150
CACHE_CONFIGconfiguration for the cache db{ type, connection : { host, port } }
← API ServerTransponder →
  • Configuration
Leverege Platform
Docs
Overview
Connect
FacebookLinkedInTwitter
Facebook Open Source