Skip to content

Create a separate web server for workflow execution - #3029

Merged
shengquan-ni merged 24 commits into
masterfrom
shengquan-execution-server
Dec 8, 2024
Merged

shengquan-ni merged 24 commits into
masterfrom
shengquan-execution-server

Conversation

@shengquan-ni

@shengquan-ni shengquan-ni commented Nov 12, 2024 •

Copy link
Copy Markdown
Contributor

This PR adds a dedicated web server for workflow execution, named ComputingUnitMaster. It is a master node with the ability to execute workflows. This PR also renames TexeraRunWorker to ComputingUnitWorker. If the cluster requires additional workers, running ComputingUnitWorker will add a worker node to the Akka cluster.

For ComputingUnitMaster:

  1. Initializes the WebSocket, Amber client, and Akka actor system. Handles all requests from the UI through WebSocket.
  2. Runs temporarily on port 8085.

Important Notes:

  1. All operators can now be created on the master node, lifting the previous restriction on non-source, non-sink operators.
  2. The execution server code will stay in the amber folder for now and will be moved later after Daniel's configuration changes. We will use amber folder for the engine and computing unit. Possibly will rename this folder to workflow-execution-service. All other components like Auth, Community will be moved out.

@shengquan-ni shengquan-ni self-assigned this Nov 12, 2024
@shengquan-ni
shengquan-ni marked this pull request as draft November 12, 2024 00:24
@shengquan-ni
shengquan-ni marked this pull request as ready for review November 15, 2024 07:52
@shengquan-ni shengquan-ni added the refactor Refactor the code label Nov 15, 2024
@shengquan-ni shengquan-ni reopened this Dec 3, 2024

@Yicong-Huang Yicong-Huang left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@shengquan-ni
shengquan-ni merged commit 98c51aa into master Dec 8, 2024
@shengquan-ni
shengquan-ni deleted the shengquan-execution-server branch December 8, 2024 02:16
SarahAsad23 pushed a commit to madisonmlin/texera that referenced this pull request May 20, 2026
This PR adds a dedicated web server for workflow execution, named
`ComputingUnitMaster`. It is a master node with the ability to execute
workflows. This PR also renames `TexeraRunWorker` to
`ComputingUnitWorker`. If the cluster requires additional workers,
running `ComputingUnitWorker` will add a worker node to the Akka
cluster.

For `ComputingUnitMaster`:
1. Initializes the WebSocket, Amber client, and Akka actor system.
Handles all requests from the UI through WebSocket.
2. Runs temporarily on port 8085.


**Important Notes:**
1. All operators can now be created on the master node, lifting the
previous restriction on non-source, non-sink operators.
2. ~~The execution server code will stay in the amber folder for now and
will be moved later after Daniel's configuration changes.~~ We will use
`amber` folder for the engine and computing unit. Possibly will rename
this folder to `workflow-execution-service`. All other components like
Auth, Community will be moved out.
yangzhang75 pushed a commit to yangzhang75/texera that referenced this pull request Jun 22, 2026
This PR adds a dedicated web server for workflow execution, named
`ComputingUnitMaster`. It is a master node with the ability to execute
workflows. This PR also renames `TexeraRunWorker` to
`ComputingUnitWorker`. If the cluster requires additional workers,
running `ComputingUnitWorker` will add a worker node to the Akka
cluster.

For `ComputingUnitMaster`:
1. Initializes the WebSocket, Amber client, and Akka actor system.
Handles all requests from the UI through WebSocket.
2. Runs temporarily on port 8085.


**Important Notes:**
1. All operators can now be created on the master node, lifting the
previous restriction on non-source, non-sink operators.
2. ~~The execution server code will stay in the amber folder for now and
will be moved later after Daniel's configuration changes.~~ We will use
`amber` folder for the engine and computing unit. Possibly will rename
this folder to `workflow-execution-service`. All other components like
Auth, Community will be moved out.
renovate-bot pushed a commit to renovate-bot/apache-_-texera that referenced this pull request Oct 24, 2026
### What changes were proposed in this PR?

Removes the `AmberConfig` object, whose only member, `masterNodeAddr`,
is written but never read. **+8/−57 lines.** There is no behaviour
change.

- **`AmberConfig.scala`:** deleted.
- **`AmberRuntime.scala`:** the two `AmberConfig.masterNodeAddr =
createMasterAddress(...)` writes in `startActorMaster` /
`startActorWorker`, the private `createMasterAddress` helper that only
fed them, and the `Address` import. The seed nodes, hostname and actor
system the two methods build are unchanged.
- **`ScheduleGenerator.scala`:** a ScalaDoc line cited
`AmberConfig.maxConcurrentRegions`; the value lives in
`ApplicationConfig`.
- **`AmberRuntimeSpec`:** drops the save/restore of the global, the
sentinel, and the one case that only observed `masterNodeAddr`. Every
case covering the surviving `AmberRuntime` behaviour stays.

### History

| | |
| --- | --- |
| **Introduced by** | apache#811 (2020-08-22), "Merge Amber master into texera
master": `masterNodeAddr`, for `ClusterListener` to tell the master node
apart. apache#1439 (2022-02-12) added `createMasterAddress`, and apache#2245
(2023-12-06) moved the field into `AmberConfig` |
| **Usage removed by** | apache#3029 (2024-12-08), "Create a separate web
server for workflow execution". It deleted the last reader,
`member.address != AmberConfig.masterNodeAddr` in `ClusterListener`.
apache#3466 (2025-06-13) then moved every other `AmberConfig` member to
`common/config`, leaving only this field |

It has been write-only for nearly two years.

### Any related issues, documentation, discussions?

Closes apache#9025

### How was this PR tested?

No new tests. `AmberRuntimeSpec` keeps its coverage of the master and
worker startup paths.

Locally, from the repo root with Java 17:

- `sbt "WorkflowExecutionService/Test/compile"
"WorkflowExecutionService/scalafmtCheckAll"
"WorkflowExecutionService/scalafixAll --check"`: success.
- `sbt "WorkflowExecutionService/testOnly *AmberRuntimeSpec
*ComputingUnitMasterSpec *ClusterListenerSpec
*CostBasedScheduleGeneratorSpec"`: 4 suites, 68 tests, all pass.

To re-check:

```
git grep -n -w -e AmberConfig -e masterNodeAddr -e createMasterAddress -- amber   # no hits
```

### Was this PR authored or co-authored using generative AI tooling?

Generated-by: Claude Code (Claude Opus 5.5)

🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Refactor the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants