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..b8e7619ff002ab80371be9897f2f744c654af5a4 |
| --- /dev/null |
| +++ b/blimp/common/proto/helium.proto |
| @@ -0,0 +1,57 @@ |
| +// 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"; |
|
Kevin M
2016/09/30 18:34:36
add blank line above this.
scf
2016/09/30 22:13:23
Done.
|
| + |
| +option optimize_for = LITE_RUNTIME; |
| + |
| +import "blimp_message.proto"; |
| + |
| +package blimp.helium; |
| + |
| +// Vector clock that is used to get the partial order of changes |
|
Kevin M
2016/09/30 18:34:36
add trailing period.
scf
2016/09/30 22:13:23
Done.
|
| +// This class is the proto definition of |
| +// blimp/net/helium/vector_clock.h |
|
Kevin M
2016/09/30 18:34:36
add double slash before blimp
scf
2016/09/30 22:13:23
Done.
|
| +message VectorClock { |
| + uint32 local_revision = 1; |
|
perumaal
2016/10/04 00:07:36
Following the semantics for timestamps, would it b
Kevin M
2016/10/04 00:49:37
+1
int32s and int64s are encoded on the wire as v
scf
2016/10/04 17:07:19
Done.
|
| + uint32 remote_revision = 2; |
| +} |
| + |
| +// Sample proto for test purposes |
| +message TestChangeset { |
| + int32 value1 = 1; |
| + int32 value2 = 2; |
| +} |
| + |
| +// A "union" of the allowed types that are going to be serialized. There will |
|
Kevin M
2016/09/30 18:34:36
Suggestion: "A union of serializable Changeset typ
scf
2016/09/30 22:13:23
Done.
|
| +// be one for each Helium Object that requires serialization. |
| +// For example: GeoLocation, EngineSettings, etc. |
|
Kevin M
2016/09/30 18:34:36
No need to provide an example; the oneof will be s
scf
2016/09/30 22:13:23
Done.
|
| +message Changeset { |
| + oneof data { |
|
Kevin M
2016/09/30 18:34:36
Choose a more specific name than "data"?
scf
2016/09/30 22:13:23
couldn't really think of anything really other tha
Kevin M
2016/10/04 00:49:37
"payload" ?
scf
2016/10/04 17:07:19
Done.
|
| + // Sample message for the test |
| + TestChangeset test = 1; |
| + }; |
| +} |
| + |
| +// A message encapsulates the actual Changeset with the identifier of the |
| +// object and the timestamp of the checkpoint. |
| +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). |
| + VectorClock from = 1; |
| + // Provides the local view of the vector-clock following application of |
|
Kevin M
2016/09/30 18:34:36
add blank line before this
scf
2016/09/30 22:13:23
Done.
|
| + // 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. |
| + VectorClock to = 2; |
| + |
| + // Identifies the Object to which this changeset applies. |
| + uint32 object_id = 3; |
| + |
| + // The changeset that contain the actual changes |
| + Changeset change = 4; |
| +} |