Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

proposal(v1): Documents -> KV #549

Merged
merged 13 commits into from
Jan 24, 2024
Merged

proposal(v1): Documents -> KV #549

merged 13 commits into from
Jan 24, 2024

Conversation

tjholm
Copy link
Member

@tjholm tjholm commented Jan 10, 2024

A proposal for simplifying documents to a simple KV store.

With the intention to look at implementing RDS deployment support for richer datastores and querying capability.

@tjholm tjholm requested a review from jyecusch as a code owner January 10, 2024 22:07
Comment on lines 1 to 77
syntax = "proto3";
package nitric.proto.KeyValue.v1;

import "google/protobuf/struct.proto";

// protoc plugin options for code generation
// option go_package = "nitric/v1;v1";
option go_package = "github.com/nitrictech/nitric/core/pkg/proto/keyvalue/v1;KeyValuepb";
option java_package = "io.nitric.proto.keyvalue.v1";
option java_multiple_files = true;
option java_outer_classname = "KeyValue";
option php_namespace = "Nitric\\Proto\\KeyValue\\V1";
option csharp_namespace = "Nitric.Proto.KeyValue.v1";

// Service for storage and retrieval of simple JSON keyValue
service KeyValue {
// Get an existing document
rpc Get (KeyValueGetRequest) returns (KeyValueGetResponse);

// Create a new or overwrite an existing document
rpc Set (KeyValueSetRequest) returns (KeyValueSetResponse);

// Delete an existing document
rpc Delete (KeyValueDeleteRequest) returns (KeyValueDeleteResponse);
}

// Provides a Collection type for storing documents
message Store {
// The store name
string name = 1;
}

// Provides a document identifying key type
message Key {
// The item collection
string store = 1;

// The items unique key
string key = 2;
}

// Provides a return document type
message Value {
// The document's unique key, including collection/sub-collections
Key key = 1;

// The document content (JSON object)
google.protobuf.Struct content = 2;
}

// Service Request & Response Messages

message KeyValueGetRequest {
// Key of the document to retrieve
Key key = 1;
}

message KeyValueGetResponse {
// The retrieved value
Value value = 1;
}

message KeyValueSetRequest {
// Key of the document to set
Key key = 1 ;
// The document content to store (JSON object)
google.protobuf.Struct content = 3;
}

message KeyValueSetResponse {}

message KeyValueDeleteRequest {
// Key of the document to delete
Key key = 1;
}

message KeyValueDeleteResponse {}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Highlighting this for visibility, this was a quick rename change, but any structure we want to change here can be done quickly.

@tjholm tjholm marked this pull request as draft January 10, 2024 22:56
@tjholm tjholm changed the title feat: Documents -> KV proposal(v1): Documents -> KV Jan 10, 2024
@tjholm tjholm marked this pull request as ready for review January 18, 2024 22:08
@tjholm tjholm force-pushed the kv-proposal branch 3 times, most recently from 7b841e8 to ae783ba Compare January 23, 2024 21:17
@tjholm tjholm merged commit a8770fe into v1 Jan 24, 2024
1 of 2 checks passed
@tjholm tjholm deleted the kv-proposal branch January 24, 2024 23:46
tjholm added a commit that referenced this pull request Feb 20, 2024
Co-authored-by: Tim Holm <[email protected]>
Co-authored-by: Tim Holm <[email protected]>
Co-authored-by: Jye Cusch <[email protected]>
Co-authored-by: Ryan Cartwright <[email protected]>
Co-authored-by: David Moore <[email protected]>

Co-authored-by: Tim Holm <[email protected]>

* ci: Update go version for new std libs. (#552)

* add rates support (#551)

* fix: websocket handlers are not cleaned up (#554)

Co-authored-by: David Moore <[email protected]>

* fix: azure deployments (#555)

* fix gcp deployments (#553)

* fix schedules and topics clean up (#556)

fix: schedules and topics not cleaned up

* feat: Update cloud implementations for v1 (#558)

Co-authored-by: Tim Holm <[email protected]>
Co-authored-by: Jye Cusch <[email protected]>

* Documents -> KV (#549)

Co-authored-by: Jye Cusch <[email protected]>

* Add logic to support resource tree for pulumi destroy (#559)

* separate engine event handler methods.

* add missing returns.

* debug statements.

* build nitric parents ahead of time.

* Ensure image shows up in progress for nitric up.

* fix check for http server not registered (#564)

* v1 azure fixes (#562)

* common logger (#563)

* wip

* fix error on redeploy of torn down aws stacks

* shared logger

* move logger to core

* v1 queues

* remove redundant log output (#568)

* add results outputs (#567)

return endpoints for API, HTTP Proxies and Websockets.

* Http Proxy Bidi stream

* include queues in default order

* fix aws runtime issues

* fix aws http proxy routing

* fix gcp runtime issues. (#571)

* normalize http proxy gateway names.

* add delete permission to write to allow overwriting.

* fix topicname in subscription push endpoints.

* add missing project configuration to pre

* cleanup

* gcp deployment fixes.

* AWS schedule and ws fixes

* deploy websockets and schedules
* improve missing resource error
* fix delete replaced status mapping
* fix aws ws deployments and output

* azure fixes (#574)

Co-authored-by: Rak Siva <[email protected]>

* azure fixes

additional azure fixes and cleanup

* update pulumi sdk (#576)

* prevent panics from missing pulumi events. (#578)

* make pulumi refresh configurable. (#577)

* allow multiple deployment result types. (#581)

* allow multiple deployment result types.

* change simple -> text.

* missing httpproxy for gcp provider (#580)

* linting and test updates. (#579)

* contract renaming (#583)

Co-authored-by: Jye Cusch <[email protected]>

* remove references to develop branch (#585)

* fix debug provider

* improve error output (#586)

---------

Co-authored-by: Ryan Cartwright <[email protected]>
Co-authored-by: David Moore <[email protected]>
Co-authored-by: Jye Cusch <[email protected]>
Co-authored-by: David Moore <[email protected]>
Co-authored-by: David Moore <[email protected]>
Co-authored-by: Jye Cusch <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants