Skip to content

Commit 22b98e9

Browse files
committed
Add proto definitions
1 parent ec9def2 commit 22b98e9

19 files changed

+1079
-0
lines changed

protos/Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.PHONY: go
2+
3+
dirs = core jobs serving specs storage types
4+
5+
gen-go:
6+
@$(foreach dir,$(dirs),protoc -I/usr/local/include -I. --go_out=plugins=grpc:$$GOPATH/src feast/$(dir)/*.proto;)

protos/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Feast Protos
2+
3+
## Overview
4+
5+
Shared protobuf files across Feast components.
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
/*
2+
* Copyright 2018 The Feast Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
syntax = "proto3";
18+
19+
package feast.core;
20+
21+
import "feast/specs/EntitySpec.proto";
22+
import "feast/specs/FeatureSpec.proto";
23+
import "feast/specs/FeatureGroupSpec.proto";
24+
import "feast/specs/StorageSpec.proto";
25+
import "google/protobuf/empty.proto";
26+
27+
option java_package = "feast.core";
28+
option java_outer_classname = "CoreServiceProto";
29+
option go_package = "feast/go-feast-proto/feast/core";
30+
31+
service CoreService {
32+
/*
33+
Get entities specified in request.
34+
This process returns a list of entity specs.
35+
*/
36+
rpc GetEntities(CoreServiceTypes.GetEntitiesRequest) returns (CoreServiceTypes.GetEntitiesResponse){};
37+
38+
/*
39+
Get all entities
40+
This process returns a list of entity specs.
41+
*/
42+
rpc ListEntities(google.protobuf.Empty) returns (CoreServiceTypes.ListEntitiesResponse) {};
43+
44+
/*
45+
Get features specified in request.
46+
This process returns a list of feature specs.
47+
*/
48+
rpc GetFeatures(CoreServiceTypes.GetFeaturesRequest) returns (CoreServiceTypes.GetFeaturesResponse){};
49+
50+
/*
51+
Get all features.
52+
This process returns a list of entity specs.
53+
*/
54+
rpc ListFeatures(google.protobuf.Empty) returns (CoreServiceTypes.ListFeaturesResponse) {};
55+
56+
/*
57+
Get storage specs specified in request.
58+
This process returns a list of storage specs.
59+
*/
60+
rpc GetStorage(CoreServiceTypes.GetStorageRequest) returns (CoreServiceTypes.GetStorageResponse){};
61+
62+
/*
63+
Get all storage specs.
64+
This process returns a list of storage specs.
65+
*/
66+
rpc ListStorage(google.protobuf.Empty) returns (CoreServiceTypes.ListStorageResponse) {};
67+
68+
/*
69+
Register a new feature to the metadata store.
70+
If any validation errors occur, only the first encountered error will be returned.
71+
*/
72+
rpc RegisterFeature(feast.specs.FeatureSpec) returns (CoreServiceTypes.RegisterFeatureResponse) {};
73+
74+
/*
75+
Register a new feature group to the metadata store.
76+
If any validation errors occur, only the first encountered error will be returned.
77+
*/
78+
rpc RegisterFeatureGroup(feast.specs.FeatureGroupSpec) returns (CoreServiceTypes.RegisterFeatureGroupResponse) {};
79+
80+
/*
81+
Register a new entity to the metadata store.
82+
If any validation errors occur, only the first encountered error will be returned.
83+
*/
84+
rpc RegisterEntity(feast.specs.EntitySpec) returns (CoreServiceTypes.RegisterEntityResponse) {};
85+
86+
/*
87+
Register a new storage spec to the metadata store.
88+
If any validation errors occur, only the first encountered error will be returned.
89+
*/
90+
rpc RegisterStorage(feast.specs.StorageSpec) returns (CoreServiceTypes.RegisterStorageResponse) {};
91+
}
92+
93+
message CoreServiceTypes {
94+
message GetEntitiesRequest {
95+
repeated string ids = 1;
96+
}
97+
98+
message GetEntitiesResponse {
99+
repeated feast.specs.EntitySpec entities = 1;
100+
}
101+
102+
message ListEntitiesResponse {
103+
repeated feast.specs.EntitySpec entities = 1;
104+
}
105+
106+
// Feature retrieval
107+
message GetFeaturesRequest {
108+
repeated string ids = 1;
109+
}
110+
111+
message GetFeaturesResponse {
112+
repeated feast.specs.FeatureSpec features = 1;
113+
}
114+
115+
message ListFeaturesResponse {
116+
repeated feast.specs.FeatureSpec features = 1;
117+
}
118+
119+
// Storage spec retrieval
120+
message GetStorageRequest {
121+
repeated string ids = 1;
122+
}
123+
124+
message GetStorageResponse {
125+
repeated feast.specs.StorageSpec storageSpecs = 1;
126+
}
127+
128+
message ListStorageResponse {
129+
repeated feast.specs.StorageSpec storageSpecs = 1;
130+
}
131+
132+
// Entity registration response
133+
message RegisterEntityResponse {
134+
string entityName = 1;
135+
}
136+
137+
// Feature registration response
138+
message RegisterFeatureResponse {
139+
string featureId = 1;
140+
}
141+
142+
// Feature group registration response
143+
message RegisterFeatureGroupResponse {
144+
string featureGroupId = 1;
145+
}
146+
147+
// Storage registration response
148+
message RegisterStorageResponse {
149+
string storageId = 1;
150+
}
151+
}

protos/feast/core/JobService.proto

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
/*
2+
* Copyright 2018 The Feast Authors
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
syntax = "proto3";
18+
19+
package feast.core;
20+
21+
import "feast/specs/ImportSpec.proto";
22+
import "google/protobuf/empty.proto";
23+
import "google/protobuf/timestamp.proto";
24+
25+
option java_package = "feast.core";
26+
option java_outer_classname = "JobServiceProto";
27+
option go_package = "feast/go-feast-proto/feast/core";
28+
29+
service JobService {
30+
// Submit a job to feast to run. Returns the job id.
31+
rpc SubmitJob (JobServiceTypes.SubmitImportJobRequest) returns (JobServiceTypes.SubmitImportJobResponse);
32+
33+
// List all jobs submitted to feast.
34+
rpc ListJobs (google.protobuf.Empty) returns (JobServiceTypes.ListJobsResponse);
35+
36+
// Get Job with ID
37+
rpc GetJob (JobServiceTypes.GetJobRequest) returns (JobServiceTypes.GetJobResponse);
38+
39+
// Abort job with given ID
40+
rpc AbortJob(JobServiceTypes.AbortJobRequest) returns (JobServiceTypes.AbortJobResponse);
41+
}
42+
43+
message JobServiceTypes {
44+
message SubmitImportJobRequest {
45+
feast.specs.ImportSpec importSpec = 1;
46+
string name = 2; // optional
47+
}
48+
49+
message SubmitImportJobResponse {
50+
string jobId = 1;
51+
}
52+
53+
message ListJobsResponse {
54+
repeated JobDetail jobs = 1;
55+
}
56+
57+
message GetJobRequest {
58+
string id = 1;
59+
}
60+
61+
message GetJobResponse {
62+
JobDetail job = 1;
63+
}
64+
65+
message AbortJobRequest {
66+
string id = 1;
67+
}
68+
69+
message AbortJobResponse {
70+
string id = 1;
71+
}
72+
73+
// Expanded view of a given job. Returns job information, as well
74+
// as latest metrics.
75+
message JobDetail {
76+
string id = 1;
77+
string extId = 2;
78+
string type = 3;
79+
string runner = 4;
80+
string status = 5;
81+
repeated string entities = 6;
82+
repeated string features = 7;
83+
map<string,double> metrics = 8;
84+
google.protobuf.Timestamp lastUpdated = 9;
85+
google.protobuf.Timestamp created = 10;
86+
}
87+
}

0 commit comments

Comments
 (0)