TQL Application Architecture
Logical architecture of TQL IoT Applications
IoT Applications built using TQL generally have the following architecture:
- The ThingFacet layer interacts with external things (sensors, actuators, devices) via events and messages. it captures the partial or complete behavior of the device.
- The model layer represents the current persisted states of any entity. There are ThingModels (e.g. a truck, an irrigation motor), AppModels and DataModels. Thing Models represent actual physical active objects. Data Models are used to represent logical concepts (invoice, purchase order, etc.) and passive things like (parking lot, lamp post, etc.). App Models are used to encapsulate domain logic, which may include computations and integrations with other software services.
- The client layer (i.e. apps or external systems) use TQL queries to interact with both things and data via the models, and use TQL subscriptions to receive messages on change of model states.
This architecture decouples domain logic (models) and business logic (queries, subscriptions and apps) from the device logic (ThingFacets).
The client apps can be developed in any languages like javascript, HTML5, React, etc. Client apps interact with TQL http/s or WebSocket.
TQL Projects can be easily deployed from TQLStudio on the A-Stack running in the sandbox or onto any other A-Stack installed on your local hardware environments.