azist / azos

A to Z Sky Operating System / Microservice Chassis Framework
MIT License
213 stars 29 forks source link

Add abstraction of `Azos.Sky.Fabric.Fiber` - an orchestration context (e.g. result mailslot address) to execute distributed cloud services/units of work #813

Open itadapter opened 1 year ago

itadapter commented 1 year ago

Processes provide:

  1. Unique mutext ID whih can be used for
  2. Result/mailslot address for actors
  3. Chronicle execution log correlation
  4. Management, status tracking
  5. Supervisor actors ensure process final state machine transition

This new model supersedes prior art here: https://github.com/azist/azos/tree/master/src/Azos.Sky.Server/Workers

Process - a global context of the larger task execution, establishes context for multiple instances of asynchronous Todos, captures the final result of multiple Todos; reacts to Signals

IMPORTANT The system should be able to handle millions of active executing processes (i.e. not keep all in ram), as processes may represent certain business activities, such as a contract execution paused on a customer signature step) etc.. Sharding and Fail-over is 100% required as processes represent the ultimate distributed process supervision orchestration primitive

itadapter commented 1 year ago
  GDID
  GUID

  parent_ID
  priority
  scheduled_time

  Creator_User  EntityId
  Create_Origin Atom
  CreateUtc 
  Tenant   string
  ShardKey

  Description
  Note

  Namespace   string
  Image  string;// fully qualified exeutable package (e.g. assembly)

  Status
  State  

  Result:()

ProcessResources (CPU, Memory, Disk) ExitResult : Json Memory(PID, Segment): (ctype, bin[])

itadapter commented 1 year ago

image

itadapter commented 1 year ago

Worked on #824 which is needed for CPU measurement smoothing for dynamic workload balancing

itadapter commented 1 year ago

todo

itadapter commented 1 year ago

~Need to test case: When BIX atr is forgotten on slot - we need not crash the Fiber... need to review exception types~

incorrect, this must crash fiber as it is impossible to handle this otherwise, the exception may surface only WHEN accessing certain state slot which is not decorated... so it is a regular fiber exception and program can not continue