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

Make service runtime short-lived by default #2453

Merged
merged 7 commits into from
Sep 5, 2024

Conversation

ma2bd
Copy link
Contributor

@ma2bd ma2bd commented Sep 5, 2024

Motivation

The long-lived services are somehow experimental and are mostly used for the LLM demo.
Stability issues were solved but we should probably not activate long-lived services by default anyway.

Proposal

  • Add a configuration option
  • Use short-lived service instances by default

Test Plan

  • CI
  • Test LLM demo manually

Release Plan

  • Not breaking for validators
  • May affect users but they can pass an option on the CLI

@ma2bd ma2bd changed the title Make service runtime short lived by default Make service runtime short-lived by default Sep 5, 2024
@ma2bd ma2bd requested a review from jvff September 5, 2024 01:23
@ma2bd ma2bd marked this pull request as ready for review September 5, 2024 01:23
linera-chain/src/chain.rs Outdated Show resolved Hide resolved
linera-core/src/chain_worker/actor.rs Show resolved Hide resolved
@@ -45,6 +45,14 @@ pub struct ExecutionStateView<C> {
pub users: HashedReentrantCollectionView<C, UserApplicationId, KeyValueStoreView<C>>,
}

/// How to interact with a long-lived service runtime.
pub struct ServiceRuntimeEndpoint {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should it be ApplicationServiceEndpoint ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could do that 👍

Copy link
Contributor Author

@ma2bd ma2bd Sep 5, 2024

Choose a reason for hiding this comment

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

Ok so there are several names to change so this will have to wait another PR

Comment on lines +106 to +108
let (committee, worker) = init_worker(
storage, /* is_client */ false, /* has_long_lived_services */ false,
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Might be a nice place for bon

@ma2bd ma2bd merged commit e3d0ab1 into linera-io:main Sep 5, 2024
3 of 4 checks passed
@ma2bd ma2bd deleted the service_runtime branch September 5, 2024 14:29
jvff pushed a commit that referenced this pull request Sep 5, 2024
* Make long lived services optional (and not the default)

* fix README of LLM

* fix help

* fix worker tests

* address comments

* fix execution tests

* update CLI.md
ma2bd added a commit that referenced this pull request Sep 6, 2024
* Make long lived services optional (and not the default)

* fix README of LLM

* fix help

* fix worker tests

* address comments

* fix execution tests

* update CLI.md
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.

3 participants