Skip to content

Commit

Permalink
The general idea.
Browse files Browse the repository at this point in the history
Flesh out the remaining comms, validation strategy, etc.

Replication pattern established.
  • Loading branch information
Hellblazer committed Dec 19, 2023
1 parent 0a6b2d0 commit 8ddf2fa
Show file tree
Hide file tree
Showing 11 changed files with 306 additions and 52 deletions.
22 changes: 15 additions & 7 deletions grpc/src/main/proto/leyden.proto
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,31 @@ option java_outer_classname = "LeydenProto";
option objc_class_prefix = "Ley";

import "google/protobuf/empty.proto";
import "google/protobuf/any.proto";

import "stereotomy.proto";
import "stereotomy-services.proto";
import "crypto.proto";

package leyden;


service Binder {
rpc bind(Bound) returns(google.protobuf.Empty) {}
rpc unbind(Key_) returns(google.protobuf.Empty) {}
rpc get(Key_) returns(Bound) {}
rpc bind(Binding) returns(google.protobuf.Empty) {}
rpc unbind(KeyAndToken) returns(google.protobuf.Empty) {}
rpc get(KeyAndToken) returns(Bound) {}
}

service Reconciliation {
rpc reconcile (Intervals) returns (Update) {}
rpc update (Updating) returns (google.protobuf.Empty) {}
}

message KeyAndToken {
int32 ring = 1;
bytes key = 2;
bytes token = 3;
}

message Update {
repeated Bound bindings = 1;
repeated Interval intervals = 2;
Expand All @@ -47,11 +53,13 @@ message Interval {
crypto.Digeste end = 2;
}

message Key_ {
bytes key = 1;
message Binding {
int32 ring = 1;
Bound bound = 2;
bytes token = 3;
}

message Bound {
Key_ key = 1;
bytes key = 1;
bytes value = 2;
}
4 changes: 4 additions & 0 deletions leyden/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<groupId>com.h2database</groupId>
<artifactId>h2-mvstore</artifactId>
</dependency>
<dependency>
<groupId>com.macasaet.fernet</groupId>
<artifactId>fernet-java8</artifactId>
</dependency>

<!-- Test Only Dependencies Below This Line -->
<dependency>
Expand Down
Loading

0 comments on commit 8ddf2fa

Please sign in to comment.