Skip to content

CURA-13217 improve engine communication - #1067

Open
Erwan MATHIEU (wawanbreton) wants to merge 25 commits into
mainfrom
CURA-13217_improve-engine-communication
Open

Erwan MATHIEU (wawanbreton) wants to merge 25 commits into
mainfrom
CURA-13217_improve-engine-communication

Conversation

@wawanbreton

@wawanbreton Erwan MATHIEU (wawanbreton) commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

This PR provides a few changes that improve the communication between Cura front-end and CuraEngine, to make sure that we can send large objects and/or build plates without crashes or visible latency:

  • Replace libArcus/pyArcus by asio-grpc/grpcio
    • Use modern robust libraries instead of custom code
    • Can handle large amounts of data, super fast
    • Protobuf classes are generated at development instead of runtime (front-end only)
    • asio-grpc is already a dependency of CuraEngine for the communication with the plugins
  • Split the single huge Slice message sent to the engine into multiple messages sent in a row
    • Allows sending many very large models for a single slice
  • Start sending messages to the engine as soon as they are individually completed
    • Less waiting time before we actually start slicing
    • Reduces the max amount of memory used by the front-end

In practice, this seems to significantly reduce the time spent in the front-end to generate and send the slicing data. When using the dragon cup model, I went from ~25s with the UI frozen to not noticeable. I could also send a build plate containing 50 of them without issues.

Requires Ultimaker/Cura#21892
Requires Ultimaker/CuraEngine#2418
CURA-13217

@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

2 403 tests   2 388 ✅  16s ⏱️
    1 suites     15 💤
    1 files        0 ❌

Results for commit 8f1c447.

♻️ This comment has been updated with latest results.

@wawanbreton
Erwan MATHIEU (wawanbreton) marked this pull request as ready for review November 11, 2026 11:05
Copilot AI balanced review requested due to automatic review settings November 11, 2026 11:05

Copilot AI 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.

🟡 Changes recommended

Unresolved backend regressions can crash engine-command lookup, silently discard accepted messages, and let overlapping streams corrupt each other’s connection state.

5 open issues
What changed in this PR

This PR migrates Uranium’s backend communication from Arcus to gRPC, supporting the coordinated Cura and CuraEngine changes for streaming large slicing workloads with less latency and memory use.

Changes:

  • Introduces a gRPC server with queued outgoing messages and concurrent incoming-message handling.
  • Updates backend startup, shutdown, and message dispatch for gRPC.
  • Replaces Arcus dependencies and adapts backend tests.
File Description
UM/​Backend/​SignalSocket.py Removes the Arcus socket wrapper.
UM/​Backend/​GrpcBackendServer.py Adds gRPC streaming, message queues, and lifecycle handling.
UM/​Backend/​Backend.py Integrates gRPC communication and updates engine startup.
tests/​TestBackend.py Adapts backend tests and adds streaming and queue checks.
plugins/​Tools/​CameraTool/​tests/​TestCameraTool.py Removes the Arcus import workaround.
conanfile.py Removes the Arcus shared-library option.
conandata.yml Replaces Arcus with gRPC and Protobuf dependencies and generation tools.

Review effort: Balanced

Comment thread UM/Backend/Backend.py Resolved
Comment thread UM/Backend/GrpcBackendServer.py Resolved
Comment thread UM/Backend/GrpcBackendServer.py Resolved
Comment thread UM/Backend/Backend.py Resolved
Comment thread UM/Backend/GrpcBackendServer.py Resolved
CURA-13217

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants