Server processes: Difference between revisions

Jump to navigation Jump to search
Line 76: Line 76:
=== Processes and transactions ===
=== Processes and transactions ===


Workflow operations run asynchronously in a separate transaction. This transaction is propagated to the database only after the transaction containing its trigger is committed. Only 1 workflow process might be executed per organization at the same time. When several workflows are designed per 1 organization, the workflows are stacked in a queue and executed sequentially. In the case of concurrent workflows created for the same entity and triggered by the same event, the workflows are ordered by the system id and executed one by one.
Each workflow operation runs asynchronously in a separate transaction. This transaction is propagated to the database only after the transaction containing its trigger is committed. Only 1 workflow process might be executed per organization at the same time. When several workflows are designed per 1 organization, the workflows are stacked in a queue and executed sequentially. In the case of concurrent workflows created for the same entity and triggered by the same event, the workflows are ordered by the system id and executed one by one.


Real-time processes run in the same transaction as their initial trigger. That means the changes defined in a real-time process are propagated to the database in the same transaction as the create/update/delete operation that triggered it initially. Concurrent real-time processes (triggered by the same event) are propagated all in the same transaction as a sequence of operations.
Real-time processes run in the same transaction as their initial trigger. That means the changes defined in a real-time process are propagated to the database in the same transaction as the create/update/delete operation that triggered it initially. Concurrent real-time processes (triggered by the same event) are propagated all in the same transaction as a sequence of operations.


Jobs are scheduled, trigger-independent operations and in case the data isolation and consistency are secured, several jobs can possibly run at the same time on Resco Cloud.
Jobs are scheduled, trigger-independent operations and in case the data isolation and consistency are secured, several jobs can possibly run at the same time on Resco Cloud.
Even when server-side processes are designed in a manner that workflows and real-time processes are not interfering, there are cases, when concurrent data access may occur, and it is very important to ensure data integrity.  
Even when server-side processes are designed in a manner that workflows and real-time processes are not interfering, there are cases, when concurrent data access may occur, and it is very important to ensure data integrity.


=== Concurrency control ===
=== Concurrency control ===

Navigation menu