Difference between revisions of "CRUD promises"
From AMTech WikiDocs
Line 1: | Line 1: | ||
* Most operations in the DAP are executed through promises. This means that they are queued for execution and the real execution occurs asynchronously. This is the case of CREATEs, UPDATEs and DELETEs of things coming from the Activity's Execution Engine. | * Most operations in the DAP are executed through promises. This means that they are queued for execution and the real execution occurs asynchronously. This is the case of CREATEs, UPDATEs and DELETEs of things coming from the Activity's Execution Engine. | ||
− | * In case of errors in the execution of queued promises, this error is reported through the /sensor_network/promise_feedback topic in the form of an observation. Under this topic | + | * In case of errors in the execution of queued promises, this error is reported through the /sensor_network/promise_feedback topic in the form of an observation. Under this topic you will find a subtopic for the thing type a subtopic for the thing ID inside this one. |
* For instance, the result of a CRUD operation over the thing '''truckInstance''' of type '''truck''' will be reported under <code>/sensor_network/promise_feedback/truck/truckInstance</code>. | * For instance, the result of a CRUD operation over the thing '''truckInstance''' of type '''truck''' will be reported under <code>/sensor_network/promise_feedback/truck/truckInstance</code>. | ||
* The feedback for operations that occur in the execution engine are only visible to the creator of the activity. | * The feedback for operations that occur in the execution engine are only visible to the creator of the activity. |
Revision as of 09:36, 2 October 2017
- Most operations in the DAP are executed through promises. This means that they are queued for execution and the real execution occurs asynchronously. This is the case of CREATEs, UPDATEs and DELETEs of things coming from the Activity's Execution Engine.
- In case of errors in the execution of queued promises, this error is reported through the /sensor_network/promise_feedback topic in the form of an observation. Under this topic you will find a subtopic for the thing type a subtopic for the thing ID inside this one.
- For instance, the result of a CRUD operation over the thing truckInstance of type truck will be reported under
/sensor_network/promise_feedback/truck/truckInstance
.
- The feedback for operations that occur in the execution engine are only visible to the creator of the activity.