Saurabh.V
Saurabh.V

Reputation: 320

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.

Upvotes: 4

Views: 1147

Answers (1)

Alexei Kaigorodov
Alexei Kaigorodov

Reputation: 13535

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.

Upvotes: 3

Related Questions