Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce TexeraWorkflowCompilingService for Workflow Compilation #2796

Merged
merged 20 commits into from
Sep 6, 2024

Conversation

bobbai00
Copy link
Collaborator

@bobbai00 bobbai00 commented Aug 21, 2024

This PR adds a standalone web service called TexeraWorkflowCompilingService.

The purpose of having a standalone compilation service

Separate the Texera Workflow Compilation with Workflow Execution.

The configuration of this service

1. Web Server Config

All the configuration items are put in core/amber/src/main/resources/texera-compiler-web-config.yml. By default, this server runs at port 9090.

2. Application Config

This service shares the same application configuration file, i.e. core/amber/src/main/resources/application.conf. To ensure that JWT token can be recognized by both TexeraWebApplication and TexeraWorkflowCompilingService, user-sys.jwt.256-bit-secret must NOT be set as random, instead it must be set as a fixed 256-bit string.

The Endpoint provided by TexeraWorkflowCompilingService

A single endpoint is provided by this web application:

POST    /api/texera/compilation/{wid}
  • request format: the serialized workflow json string
  • response:
    • physicalPlan: Option[PhysicalPlan] // the physical plan of the workflow, if None, the compilation is failed
    • operatorInputSchemas: Map[String, List[Option[List[Attribute]]]]. // from OpId to list of Schema(List of attributes) indexed by port id
    • operatorErrors: Map[String, String] // from OpId to error of this operator

Future TODO after this PR

  1. Use this web service when GUI is doing the workflow editing, maintain the physical plan in GUI.
  2. Change all the deployment scripts, including terminate-daemon.sh, deploy-daemon.sh and Dockerfile to launch & terminate this web service
  3. Clean up the code in core/amber/src/main/scala/edu/uci/ics/texera/workflow/common/workflow/WorkflowCompiler.scala and core/amber/src/main/scala/edu/uci/ics/texera/web/service/WorkflowExecutionService.scala

@bobbai00 bobbai00 self-assigned this Aug 21, 2024
@bobbai00 bobbai00 added the refactoring Refactor the code label Aug 21, 2024
@bobbai00 bobbai00 force-pushed the jiadong-separate-workflow-compiler branch from 2bf266e to 5738e9d Compare August 21, 2024 16:28
@bobbai00 bobbai00 marked this pull request as ready for review August 21, 2024 16:49
Copy link
Collaborator

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please address the comments. For some topics feel free to have discussions.

@bobbai00 bobbai00 force-pushed the jiadong-separate-workflow-compiler branch from 5738e9d to a9f102d Compare August 24, 2024 02:26
@bobbai00 bobbai00 changed the title Introduce TexeraCompilerWebApplication for Workflow Compilation Introduce TexeraWorkflowCompilingService for Workflow Compilation Aug 25, 2024
@bobbai00 bobbai00 force-pushed the jiadong-separate-workflow-compiler branch from d34d7ca to 730561a Compare September 3, 2024 02:50
@Yicong-Huang
Copy link
Collaborator

@bobbai00 please reply to previous comments so I know what's changed or to expect.

Copy link
Collaborator

@Yicong-Huang Yicong-Huang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Left some minor comments in code.

@bobbai00 bobbai00 force-pushed the jiadong-separate-workflow-compiler branch from 13c567d to b777b06 Compare September 5, 2024 00:40
@bobbai00 bobbai00 force-pushed the jiadong-separate-workflow-compiler branch from 75c1fd5 to f15a724 Compare September 5, 2024 23:57
@bobbai00 bobbai00 merged commit f30188a into master Sep 6, 2024
8 checks passed
@bobbai00 bobbai00 deleted the jiadong-separate-workflow-compiler branch September 6, 2024 00:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactoring Refactor the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants