Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // Over-the-wire message definitions used for the Helium synchronization | |
| 6 // protocol. | |
| 7 syntax = "proto3"; | |
|
Kevin M
2016/09/30 18:34:36
add blank line above this.
scf
2016/09/30 22:13:23
Done.
| |
| 8 | |
| 9 option optimize_for = LITE_RUNTIME; | |
| 10 | |
| 11 import "blimp_message.proto"; | |
| 12 | |
| 13 package blimp.helium; | |
| 14 | |
| 15 // 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.
| |
| 16 // This class is the proto definition of | |
| 17 // 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.
| |
| 18 message VectorClock { | |
| 19 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.
| |
| 20 uint32 remote_revision = 2; | |
| 21 } | |
| 22 | |
| 23 // Sample proto for test purposes | |
| 24 message TestChangeset { | |
| 25 int32 value1 = 1; | |
| 26 int32 value2 = 2; | |
| 27 } | |
| 28 | |
| 29 // 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.
| |
| 30 // be one for each Helium Object that requires serialization. | |
| 31 // 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.
| |
| 32 message Changeset { | |
| 33 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.
| |
| 34 // Sample message for the test | |
| 35 TestChangeset test = 1; | |
| 36 }; | |
| 37 } | |
| 38 | |
| 39 // A message encapsulates the actual Changeset with the identifier of the | |
| 40 // object and the timestamp of the checkpoint. | |
| 41 message HeliumMessage { | |
| 42 // Identifies the local revision that this changeset applies to (relative | |
| 43 // to the sender), and the remote revision that the local side most recently | |
| 44 // received (i.e. an ACK, in effect). | |
| 45 VectorClock from = 1; | |
| 46 // 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.
| |
| 47 // the changeset. This allows a single changeset to collate changes across | |
| 48 // several revisions, following a break in connectivity, rather than simply | |
| 49 // re-transmitting the lost changesets. | |
| 50 VectorClock to = 2; | |
| 51 | |
| 52 // Identifies the Object to which this changeset applies. | |
| 53 uint32 object_id = 3; | |
| 54 | |
| 55 // The changeset that contain the actual changes | |
| 56 Changeset change = 4; | |
| 57 } | |
| OLD | NEW |