Chromium Code Reviews| Index: blimp/common/proto/helium.proto |
| diff --git a/blimp/common/proto/helium.proto b/blimp/common/proto/helium.proto |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..e82e2e76f41b9cc03279e989d5e12cf2132bee1b |
| --- /dev/null |
| +++ b/blimp/common/proto/helium.proto |
| @@ -0,0 +1,61 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| +// |
| +// Over-the-wire message definitions used for the Helium synchronization |
| +// protocol. |
| + |
| +syntax = "proto3"; |
| + |
| +option optimize_for = LITE_RUNTIME; |
| + |
| +import "blimp_message.proto"; |
| + |
| +package blimp.helium; |
|
Kevin M
2016/10/03 22:30:35
Recommend using the package "blimp.proto", so that
scf
2016/10/03 22:52:33
Done.
|
| + |
| +// Vector clock that is used to get the partial order of changes. |
| +// This class is the proto definition of |
| +// //blimp/net/helium/vector_clock.h |
| +message VectorClockMessage { |
| + uint32 local_revision = 1; |
| + uint32 remote_revision = 2; |
| +} |
| + |
| +// Sample proto for test purposes. |
| +message TestChangesetMessage { |
| + int32 value1 = 1; |
| + int32 value2 = 2; |
| +} |
| + |
| +// A union of serializable Changeset types. There will be one for each Helium |
| +// Object that requires serialization. |
| +message ChangesetMessage { |
| + oneof data { |
| + // Sample message for the test |
| + TestChangesetMessage test = 1; |
| + }; |
| +} |
| + |
| +// Message that encapsulates a change for a helium object. It contains |
| +// information required to restore the object from the time specified in |from| |
| +// until |to|. |
| +// |
| +// This is the main object that will be sent in the Helium transport |
| +message HeliumMessage { |
| + // Identifies the local revision that this changeset applies to (relative |
| + // to the sender), and the remote revision that the local side most recently |
| + // received (i.e. an ACK, in effect). |
| + VectorClockMessage from = 1; |
| + |
| + // Provides the local view of the vector-clock following application of |
| + // the changeset. This allows a single changeset to collate changes across |
| + // several revisions, following a break in connectivity, rather than simply |
| + // re-transmitting the lost changesets. |
| + VectorClockMessage to = 2; |
| + |
| + // Identifies the Object to which this changeset applies. |
| + uint32 object_id = 3; |
| + |
| + // The changeset that contain the actual changes. |
| + ChangesetMessage change = 4; |
| +} |