Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the difference between Task based asynchronous pattern and Event based asynchronous pattern?

Both the patterns seem similar to me. In both the patterns, a persistence mechanism is involved which stores the events in case of Event-based asynchronous pattern and tasks in case of Task-Based asynchronous pattern. Secondly, both the patterns involve a manager which keeps track of what is happening with each event or tasks. I couldn't find any differences between the two. Help explain.

like image 540
Saurabh.V Avatar asked Sep 16 '25 07:09

Saurabh.V


1 Answers

from Petri Net point of view, both tasks and events are tokens. The computation proceeds as follows: events are added to tasks just as arguments are added to a function call. When all arguments/events are collected, the transition fires and the task is executed. While running, the task emits other events and tasks.

That is, actually there exists only one, task-event model, which is usually called either event or task model, for brevity.

like image 127
Alexei Kaigorodov Avatar answered Sep 19 '25 14:09

Alexei Kaigorodov