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"; | |
| 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 | |
| 16 // This class is the proto definition of | |
| 17 // blimp/net/helium/vector_clock.h | |
| 18 message VectorClock { | |
| 19 uint32 local_revision = 1; | |
| 20 uint32 remote_revision = 2; | |
| 21 } | |
| 22 | |
| 23 // A FIFO queue of BlimpMessages, for compatibility with features which use | |
| 24 // the legacy protocol. Should be removed once all features use Helium. | |
| 25 // This is to allow all messages going through transport 1.0, even though | |
| 26 // they are still using the old style of messages. | |
| 27 message LegacyChangeset { | |
|
Kevin M
2016/09/29 20:01:16
I think we should cross this particular bridge whe
scf
2016/09/29 23:13:38
Done.
| |
| 28 repeated BlimpMessage messages = 1; | |
| 29 } | |
| 30 | |
| 31 // A "union" of the allowed types that are going to be serialized. There will | |
| 32 // be one for each feature that requires serialization. | |
|
Kevin M
2016/09/29 20:01:16
feature => Helium Object?
scf
2016/09/29 23:13:38
Done.
| |
| 33 // For example: GeoLocation, EngineSettings, etc. | |
| 34 message Changeset { | |
| 35 oneof data { | |
| 36 // Support for legacy style of messages | |
| 37 LegacyChangeset legacy = 1; | |
| 38 }; | |
| 39 } | |
| 40 | |
| 41 // A message encapsulates the actual Changeset with the identifier of the | |
| 42 // object and the timestamp of the checkpoint. | |
| 43 message Message { | |
|
Kevin M
2016/09/29 20:01:16
"Message" is too overloaded - HeliumMessage?
scf
2016/09/29 23:13:38
Done.
| |
| 44 // Identifies the local revision that this changeset applies to (relative | |
| 45 // to the sender), and the remote revision that the local side most recently | |
| 46 // received (i.e. an ACK, in effect). | |
| 47 VectorClock from = 1; | |
|
Kevin M
2016/09/29 20:01:16
Use blank lines to separate commented field blocks
scf
2016/09/29 23:13:38
Done.
| |
| 48 // Provides the local view of the vector-clock following application of | |
| 49 // the changeset. This allows a single changeset to collate changes across | |
| 50 // several revisions, following a break in connectivity, rather than simply | |
| 51 // re-transmitting the lost changesets. | |
| 52 VectorClock to = 2; | |
| 53 // Identifies the Object to which this changeset applies. | |
| 54 uint32 object_id = 3; | |
| 55 // The changeset that contain the actual changes | |
| 56 Changeset change = 4; | |
| 57 } | |
| OLD | NEW |