| 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 // 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 |
| 30 // be one for each Helium Object that requires serialization. |
| 31 // For example: GeoLocation, EngineSettings, etc. |
| 32 message Changeset { |
| 33 oneof data { |
| 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 |
| 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 |