SlideShare uma empresa Scribd logo
1 de 8
Baixar para ler offline
cameron
Workflow Engine

https://github.com/leandrosilva/cameron




  Leandro Silva | @codezone
                 2011
What is it?
can cascade
                                               other

                                                                   is the concrete
                                                                                                        receives and
        task            is an instance of         activity        implementation      web service                             json
                                                                                                          responds
                                                                         of an




executes in parallel,
 pipelining output,                           has one or many                        is endpoint to a
   one or many




                                                                                                                          configuration
        job             is an instance of         process         always has a          start url       is defines in
                                                                                                                              files




                                                  has one




                                                                                                          is built on
                                                 workflow          can run many          cameron                            erlang/otp
                                                                                                             top of




                                                                stores data thru        logs thru          provides web
                                                                                                              api thru




       redis               is a driver to          redo                              erlang_syslog                          misultin
Process Tree
cameron




                                                      cameron_sup




             cameron_redo            cameron_process_sup             cameron_web_server           cameron_syslog




cameron_process_catalog     cameron_job_data    cameron_job_scheduler          cameron_job_runner


                                                                                   spawn_link N




                                                                                                             Being more
                                                                                  handle_task/2
                                                                                                             specific...
                                                                                                             Actually, it spawns many instances
                                                                                                             of gen_server cameron_job_runner
                                                                                                             registered as cameron_{uuid}
Walking from request to
 getting things done...
repeats thru the step 2.1., passing
                                                                                                                       current task result as payload

                                   It means, actually, spawn a new                                                                                                        yes
                                   cameron_job_runner, supervised
                                   by cameron_process_sup
                                                                                                            2.1. spawns a
                                                                                                                                                   has next activities?
                                                                                                             task handler

                                                                                    cameron_job_runner                            handle_task/2
                                                                                                                                                                          no

                                                                                    2. runs scheduled job               2.2. POST http://foo.i1/v0.0.1/start
                x. GET http://cameron.i1/api/foo/key/007/job/a93f89
                                                                                                                   {"key":"007", "data":"blah", "requestor":"bob"}
                 ← responds 200 and a JSON with the job results
                                                                                                                       ← should respond 200 when sucess



                     1. POST http://cameron.i1/api/foo/start
                  {"key":"007", "data":"blah", "requestor":"bob"}

                        ← responds 201 and the location                                             2.3. saves task result
                         url to get job status and results                                         (being sucess or error)
    requestor                                                        cameron instance 1                                           foo instance 1




                                                                    1.1. saves the request
                                                                       and schedules a
                                                                           job to run




                                                                                                                                    2.3. saves final results,
                                                                                                                                          job is done!


                                                                            redis




Which workflow?
Before make a request to a given process workflow, we need to setup it at
config/process/{environment}.config
In this case: {process, [{foo, {start_activity_url, "http://foo.i1/v0.0.1/start"}}]}.
Work in Progress
         stay tuned...

Mais conteúdo relacionado

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 

Destaque

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Destaque (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

A briefly introduction to Cameron

  • 3. can cascade other is the concrete receives and task is an instance of activity implementation web service json responds of an executes in parallel, pipelining output, has one or many is endpoint to a one or many configuration job is an instance of process always has a start url is defines in files has one is built on workflow can run many cameron erlang/otp top of stores data thru logs thru provides web api thru redis is a driver to redo erlang_syslog misultin
  • 5. cameron cameron_sup cameron_redo cameron_process_sup cameron_web_server cameron_syslog cameron_process_catalog cameron_job_data cameron_job_scheduler cameron_job_runner spawn_link N Being more handle_task/2 specific... Actually, it spawns many instances of gen_server cameron_job_runner registered as cameron_{uuid}
  • 6. Walking from request to getting things done...
  • 7. repeats thru the step 2.1., passing current task result as payload It means, actually, spawn a new yes cameron_job_runner, supervised by cameron_process_sup 2.1. spawns a has next activities? task handler cameron_job_runner handle_task/2 no 2. runs scheduled job 2.2. POST http://foo.i1/v0.0.1/start x. GET http://cameron.i1/api/foo/key/007/job/a93f89 {"key":"007", "data":"blah", "requestor":"bob"} ← responds 200 and a JSON with the job results ← should respond 200 when sucess 1. POST http://cameron.i1/api/foo/start {"key":"007", "data":"blah", "requestor":"bob"} ← responds 201 and the location 2.3. saves task result url to get job status and results (being sucess or error) requestor cameron instance 1 foo instance 1 1.1. saves the request and schedules a job to run 2.3. saves final results, job is done! redis Which workflow? Before make a request to a given process workflow, we need to setup it at config/process/{environment}.config In this case: {process, [{foo, {start_activity_url, "http://foo.i1/v0.0.1/start"}}]}.
  • 8. Work in Progress stay tuned...