Definition of Facet Types
A Facet Type is a unit of capability (or method) represented by a piece of executable code (a Java class) intended to process a request. The facet type’s method selection is based on the facet lifecycle event model. In short, the TQLEngine invokes the appropriate facet type method using the current facet pipeline connection context and facet instance information as argument.
Facet Types in the TQLEngine
Name | Type Name | Description |
---|---|---|
Message | SffMsgFacet | Generic Message Communication. |
Network | SffNetworkFacet | TQLEngine cluster support. Define the list of TQLEngine(s) that can participate in syncing their data |
Tql | SffTqlFacet | Thing Query Language Support (Thing Definition, Thing Interaction) |
Workflow | SffWdlFacet | Workflow Language Support |
Behavior Trees | SffBdlFacet | Behavior Tree Implementation |
Topic | SffTopicFacet | Subscription and Notification of Model changes |
Scheduling | SffSequenceFacet | Schedule tasks / jobs (piece of Model code) to be executed in a repeated sequence of defined interval. |
Static Files | SffStaticFileFacet | Serve static files using TQLEngine. |
Message
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used in <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Network
Network Facet Type allows TQL users to specify network definition of their TQLEngines. Network Facet Type is normally used to create a cluster of TQLEngines so that the TQL storage can be shared across those TQLEngines.
Facet Type Name | SffNetworkFacet |
---|---|
Language Support | Network Definition using <Network> Tag. |
Transports | WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. Network defintion is created at the time of OnActivate Facet Instance Lifecycle. SffMsgFacet Example <!-- Define Cluster / Network --> <NewFacetInstance fid="cluster" name="cluster" type="SffNetworkFacet"> <OnActivate> <Process> <Network> <Group name="FarmGatewayGroup" /> <TqlEngine name="Cloud0" url="ws://10.0.1.4:8080/fid-cluster" group="FarmGatewayGroup" replicateTo="FarmCloudGroup" documentation="Cloud Summary Holder" /> <Group name="FarmCloudGroup" /> <TqlEngine name="Cloud1" url="ws://farm.atomiton.com:8080/fid-cluster" group="FarmCloudGroup" replicateTo="FarmCloudGroup" documentation="Cloud Summary Holder" /> </Network> </Process> </OnActivate> <OnOpen ModifyPipeline="WsServerExtensionArgs" /> </NewFacetInstance> |
Associating with other FacetTypes | Instances of Network Facet Types are normally associated with the TQL Facet types so that the data can be replicated. Association can be done as follows: SffMsgFacet Example <!-- Cluster specific replication --> <NewFacetInstance fid="SmartParking" Name="TQL" Type="SffTqlFacet"> <OnActivate> <!-- Associating Instance of Network facet --> <NetworkFacet>cluster</NetworkFacet> </NewFacetInstance> |
Use Cases |
|
TQL
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Workflow
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Behavior Trees
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Topic
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Scheduling
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|
Static Files
Message Facet Type is a generic Message processing over any given specified transport. Message Facet Type does not support any specific payload to process unlike other Facet types. Message Facet Type can be used process any payload that is passed to it.
Facet Type Name | SffMsgFacet |
---|---|
Language Support | FacetScript |
Transports | HttpServerExtensionArgs WsServerExtensionArg |
Usage | Facet Types are used using <NewFacetInstance> when creating a Package (Deployment) definition for your models. SffMsgFacet Example <NewFacetInstance fid="smartparking" name="SmartParking" type="SffMsgFacet"> <OnOpen ModifyPipeline="HttpServerExtensionArgs" /> <OnRequest> <!-- Handle Request --> <!-- Any FacetScript Code can go in here... -> <DoResponse> <!-- Send the response back.. -> </DoResponse> </OnRequest> </NewFacetInstance> |
Other Names | SffTcpFacet |
Use Cases |
|