ballerina-platform / ballerina-spec

Ballerina Language and Platform Specifications
Other
168 stars 53 forks source link

Requirements for language support for workflow #385

Open jclark opened 4 years ago

jclark commented 4 years ago

Issue for gathering requirements for language support for workflow.

jclark commented 4 years ago

Please also add any good references on workflow that will help me understand the space better.

hasithaa commented 4 years ago

@chathurace, @vinok88 @warunalakshitha Could you please share old ballerina workflow references?

jclark commented 4 years ago

From @sanjiva: https://www.academia.edu/4269223/ADoc-Oriented_Programming

jclark commented 4 years ago

Look at Amazon Simple Workflow Service: https://aws.amazon.com/swf/

jclark commented 4 years ago

@sameerajayasoma I am wondering what is feasible in terms of suspend/resume on top of jBallerina.

jclark commented 4 years ago

Other things to look at from Frank:

  1. https://netflix.github.io/conductor/
  2. https://cloudacademy.com/blog/aws-step-functions-a-serverless-orchestrator/
  3. https://github.com/ibm-functions/composer/tree/master/docs
  4. https://github.com/ing-bank/baker
vinok88 commented 4 years ago

Please find the old ballerina workflow references. Aggregated doc on Checkpointing and Channels etc - https://docs.google.com/document/d/17ukPQzF9nMilm0lxzuu2oqn0c2ryKCEiYDhDUCNoEMg/edit#heading=h.vlfrv8syhdfy This is on Compensations - https://docs.google.com/document/d/11UoU6-mkT9DUd4rJJcmLdM8C8Zg10UJuimWCK_dWqpU/edit#heading=h.xyssmwr9zxxn

vinok88 commented 4 years ago

Look like above docs are private. Attached the PDFs. Ballerina workflows.pdf Ballerina Checkpointing.pdf Ballerina Compensations.pdf

vinok88 commented 4 years ago

@sameerajayasoma I am wondering what is feasible in terms of suspend/resume on top of jBallerina.

@jclark this what we were trying to do with Checkpointing.

jclark commented 4 years ago

@vinok88 Do you think the checkpointing can be made to work on top of jBallerina?

vinok88 commented 4 years ago

@jclark I think it is feasible.

To persist a checkpoint, we saved context information and the instruction pointer by injecting the persisting instructions within selected instructions in the BVM. In jBallerina, we can do a similar thing at the bytecode generation phase.

In jBallerina, in order to support nonblocking, we generate code as a huge switch-case, so that the scheduler can resume a strand in middle as well. This can be used for resuming a checkpointed program as well. By persisting the current case number of the switch case and the frame classes, we should be able to recreate the strands and ask the scheduler to run them from the given switch case.

@chathurace, @warunalakshitha please correct me if I'm wrong.