New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 916760 link

Starred by 3 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

ML Service: Separate bootstrapped Mojo interface from top-level MachineLearningService interface

Project Member Reported by amoylan@chromium.org, Dec 19

Issue description

Currently //chromeos/services/machine_learning/public/cpp/service_connection.h communications with Chrome OS's src/platform2/ml/daemon.cc via a MachineLearningService (
//chromeos/services/machine_learning/public/mojom/machine_learning_service.mojom) that is is bound via a one-off bootstrap using D-Bus.

All Chrome clients then share this bound MachineLearningServicePtr.
This is unpleasant since the Chrome clients may be on different threads. It would be better if they can each have their own MachineLearningServicePtr.

To this end, we should introduce an extra layer:

interface MachineLearningServiceBootstrap {
  BindMachineLearningService(MachineLearningService& service)
}

and have one of these be the top-level link between Chrome and Chrome OS.
The "client library" in Chrome can consist of a single thread-safe function:

// Call from any sequence:
void BindMachineLearningService(mojom::MachineLearningServiceRequest request);

The existing machine_learning::ServiceConnection class would be a private implementation detail of the above function.

Later, When a Service-Manager like thing comes to Chrome OS (or when ML Service comes to non-CrOS Chrome), it can be swapped in for BindMachineLearningService easily.
 

Sign in to add a comment