Possible API extension: Waiting for successful connection

Open
#512 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
cpp

Research direction

Start with the ILmControl::Create example and the current get_active_run_target() polling behavior described in the issue. Read the linked pull-request discussion for existing context on the API extension and service-discovery behavior. Done means reaching and documenting a decision on whether wait_until_connected(timeout), is_connected(), or another interface should be added.

Written by the indexing model from the issue text.

Description

com
What

In case mw::com is used with a network binding, the connection between StateManager and LaunchManager may not be established immediately. It will take time to do the service discovery.
Currently, there is no clear way to wait until the connection is established other than doing e.g. Polling of ``´get_active_run_target()until it no longer reportskCommunicationError`.

A nicer way would be to introduce something like wait_until_connected(timeout) or is_connected() for this purpose.

Example:

auto result = ILmControl::Create("my/instance");
// check for error...
// ..
auto lmcontrol = std::move(result.value());
auto result = lmcontrol->wait_until_connected(100ms);
if(result) {
  // connection is established.
  // calls may still fail if connection goes away (mostly relevant with network binding)
}

See also: https://github.com/eclipse-score/lifecycle/pull/478#discussion_r3828461201

Acceptance Criteria (DoD)
  • Decide on the extension
How

No response

Dominant language
C++
Stars
6
Forks
34
Avg merge
1d 23h
Merged PRs (30d)
83

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from eclipse-score/lifecycle

All issues in eclipse-score/lifecycle

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.