Skip to content

Commit a1dc714

Browse files
committed
draft implementation for registry service
1 parent c474ccd commit a1dc714

File tree

7 files changed

+1139
-1
lines changed

7 files changed

+1139
-1
lines changed
Lines changed: 334 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,334 @@
1+
syntax = "proto3";
2+
3+
package feast.registry;
4+
5+
import "google/protobuf/timestamp.proto";
6+
import "google/protobuf/empty.proto";
7+
import "feast/core/Registry.proto";
8+
import "feast/core/Entity.proto";
9+
import "feast/core/DataSource.proto";
10+
import "feast/core/FeatureView.proto";
11+
import "feast/core/RequestFeatureView.proto";
12+
import "feast/core/StreamFeatureView.proto";
13+
import "feast/core/OnDemandFeatureView.proto";
14+
import "feast/core/FeatureService.proto";
15+
import "feast/core/SavedDataset.proto";
16+
import "feast/core/ValidationProfile.proto";
17+
import "feast/core/InfraObject.proto";
18+
19+
// TODO Are Separate RPCs for each object necessary?
20+
// TODO What about Separate RPCs but shared message types?
21+
22+
service RegistryService {
23+
// Entity RPCs
24+
rpc ApplyEntity (ApplyEntityRequest) returns (google.protobuf.Empty) {}
25+
rpc GetEntity (GetEntityRequest) returns (feast.core.Entity) {}
26+
rpc ListEntities (ListEntitiesRequest) returns (ListEntitiesResponse) {}
27+
rpc DeleteEntity (DeleteEntityRequest) returns (google.protobuf.Empty) {}
28+
29+
// DataSource RPCs
30+
rpc ApplyDataSource (ApplyDataSourceRequest) returns (google.protobuf.Empty) {}
31+
rpc GetDataSource (GetDataSourceRequest) returns (feast.core.DataSource) {}
32+
rpc ListDataSources (ListDataSourcesRequest) returns (ListDataSourcesResponse) {}
33+
rpc DeleteDataSource (DeleteDataSourceRequest) returns (google.protobuf.Empty) {}
34+
35+
// FeatureView RPCs
36+
rpc ApplyFeatureView (ApplyFeatureViewRequest) returns (google.protobuf.Empty) {}
37+
rpc GetFeatureView (GetFeatureViewRequest) returns (feast.core.FeatureView) {}
38+
rpc ListFeatureViews (ListFeatureViewsRequest) returns (ListFeatureViewsResponse) {}
39+
rpc DeleteFeatureView (DeleteFeatureViewRequest) returns (google.protobuf.Empty) {}
40+
41+
// RequestFeatureView RPCs
42+
rpc GetRequestFeatureView (GetRequestFeatureViewRequest) returns (feast.core.RequestFeatureView) {}
43+
rpc ListRequestFeatureViews (ListRequestFeatureViewsRequest) returns (ListRequestFeatureViewsResponse) {}
44+
45+
// StreamFeatureView RPCs
46+
rpc GetStreamFeatureView (GetStreamFeatureViewRequest) returns (feast.core.StreamFeatureView) {}
47+
rpc ListStreamFeatureViews (ListStreamFeatureViewsRequest) returns (ListStreamFeatureViewsResponse) {}
48+
49+
// OnDemandFeatureView RPCs
50+
rpc GetOnDemandFeatureView (GetOnDemandFeatureViewRequest) returns (feast.core.OnDemandFeatureView) {}
51+
rpc ListOnDemandFeatureViews (ListOnDemandFeatureViewsRequest) returns (ListOnDemandFeatureViewsResponse) {}
52+
53+
// FeatureService RPCs
54+
rpc ApplyFeatureService (ApplyFeatureServiceRequest) returns (google.protobuf.Empty) {}
55+
rpc GetFeatureService (GetFeatureServiceRequest) returns (feast.core.FeatureService) {}
56+
rpc ListFeatureServices (ListFeatureServicesRequest) returns (ListFeatureServicesResponse) {}
57+
rpc DeleteFeatureService (DeleteFeatureServiceRequest) returns (google.protobuf.Empty) {}
58+
59+
// SavedDataset RPCs
60+
rpc ApplySavedDataset (ApplySavedDatasetRequest) returns (google.protobuf.Empty) {}
61+
rpc GetSavedDataset (GetSavedDatasetRequest) returns (feast.core.SavedDataset) {}
62+
rpc ListSavedDatasets (ListSavedDatasetsRequest) returns (ListSavedDatasetsResponse) {}
63+
rpc DeleteSavedDataset (DeleteSavedDatasetRequest) returns (google.protobuf.Empty) {}
64+
65+
// ValidationReference RPCs
66+
rpc ApplyValidationReference (ApplyValidationReferenceRequest) returns (google.protobuf.Empty) {}
67+
rpc GetValidationReference (GetValidationReferenceRequest) returns (feast.core.ValidationReference) {}
68+
rpc ListValidationReferences (ListValidationReferencesRequest) returns (ListValidationReferencesResponse) {}
69+
rpc DeleteValidationReference (DeleteValidationReferenceRequest) returns (google.protobuf.Empty) {}
70+
71+
rpc ApplyMaterialization (ApplyMaterializationRequest) returns (google.protobuf.Empty) {}
72+
rpc ListProjectMetadata (ListProjectMetadataRequest) returns (ListProjectMetadataResponse) {}
73+
rpc UpdateInfra (UpdateInfraRequest) returns (google.protobuf.Empty) {}
74+
rpc GetInfra (GetInfraRequest) returns (feast.core.Infra) {}
75+
rpc Commit (google.protobuf.Empty) returns (google.protobuf.Empty) {}
76+
rpc Refresh (RefreshRequest) returns (google.protobuf.Empty) {}
77+
rpc Proto (google.protobuf.Empty) returns (feast.core.Registry) {}
78+
79+
}
80+
81+
message RefreshRequest {
82+
string project = 1;
83+
}
84+
85+
message UpdateInfraRequest {
86+
feast.core.Infra infra = 1;
87+
string project = 2;
88+
bool commit = 3;
89+
}
90+
91+
message GetInfraRequest {
92+
string project = 1;
93+
bool allow_cache = 2;
94+
}
95+
96+
message ListProjectMetadataRequest {
97+
string project = 1;
98+
bool allow_cache = 2;
99+
}
100+
101+
message ListProjectMetadataResponse {
102+
repeated feast.core.ProjectMetadata project_metadata = 1;
103+
}
104+
105+
message ApplyMaterializationRequest {
106+
feast.core.FeatureView feature_view = 1;
107+
string project = 2;
108+
google.protobuf.Timestamp start_date = 3;
109+
google.protobuf.Timestamp end_date = 4;
110+
bool commit = 5;
111+
}
112+
113+
message ApplyEntityRequest {
114+
feast.core.Entity entity = 1;
115+
string project = 2;
116+
bool commit = 3;
117+
}
118+
119+
message GetEntityRequest {
120+
string name = 1;
121+
string project = 2;
122+
bool allow_cache = 3;
123+
}
124+
125+
message ListEntitiesRequest {
126+
string project = 1;
127+
bool allow_cache = 2;
128+
}
129+
130+
message ListEntitiesResponse {
131+
repeated feast.core.Entity entities = 1;
132+
}
133+
134+
message DeleteEntityRequest {
135+
string name = 1;
136+
string project = 2;
137+
bool commit = 3;
138+
}
139+
140+
// DataSources
141+
142+
message ApplyDataSourceRequest {
143+
feast.core.DataSource data_source = 1;
144+
string project = 2;
145+
bool commit = 3;
146+
}
147+
148+
message GetDataSourceRequest {
149+
string name = 1;
150+
string project = 2;
151+
bool allow_cache = 3;
152+
}
153+
154+
message ListDataSourcesRequest {
155+
string project = 1;
156+
bool allow_cache = 2;
157+
}
158+
159+
message ListDataSourcesResponse {
160+
repeated feast.core.DataSource data_sources = 1;
161+
}
162+
163+
message DeleteDataSourceRequest {
164+
string name = 1;
165+
string project = 2;
166+
bool commit = 3;
167+
}
168+
169+
// FeatureViews
170+
171+
message ApplyFeatureViewRequest {
172+
feast.core.FeatureView feature_view = 1;
173+
string project = 2;
174+
bool commit = 3;
175+
}
176+
177+
message GetFeatureViewRequest {
178+
string name = 1;
179+
string project = 2;
180+
bool allow_cache = 3;
181+
}
182+
183+
message ListFeatureViewsRequest {
184+
string project = 1;
185+
bool allow_cache = 2;
186+
}
187+
188+
message ListFeatureViewsResponse {
189+
repeated feast.core.FeatureView feature_views = 1;
190+
}
191+
192+
message DeleteFeatureViewRequest {
193+
string name = 1;
194+
string project = 2;
195+
bool commit = 3;
196+
}
197+
198+
// RequestFeatureView
199+
200+
message GetRequestFeatureViewRequest {
201+
string name = 1;
202+
string project = 2;
203+
bool allow_cache = 3;
204+
}
205+
206+
message ListRequestFeatureViewsRequest {
207+
string project = 1;
208+
bool allow_cache = 2;
209+
}
210+
211+
message ListRequestFeatureViewsResponse {
212+
repeated feast.core.RequestFeatureView request_feature_views = 1;
213+
}
214+
215+
// StreamFeatureView
216+
217+
message GetStreamFeatureViewRequest {
218+
string name = 1;
219+
string project = 2;
220+
bool allow_cache = 3;
221+
}
222+
223+
message ListStreamFeatureViewsRequest {
224+
string project = 1;
225+
bool allow_cache = 2;
226+
}
227+
228+
message ListStreamFeatureViewsResponse {
229+
repeated feast.core.StreamFeatureView stream_feature_views = 1;
230+
}
231+
232+
// OnDemandFeatureView
233+
234+
message GetOnDemandFeatureViewRequest {
235+
string name = 1;
236+
string project = 2;
237+
bool allow_cache = 3;
238+
}
239+
240+
message ListOnDemandFeatureViewsRequest {
241+
string project = 1;
242+
bool allow_cache = 2;
243+
}
244+
245+
message ListOnDemandFeatureViewsResponse {
246+
repeated feast.core.OnDemandFeatureView on_demand_feature_views = 1;
247+
}
248+
249+
// FeatureServices
250+
251+
message ApplyFeatureServiceRequest {
252+
feast.core.FeatureService feature_service = 1;
253+
string project = 2;
254+
bool commit = 3;
255+
}
256+
257+
message GetFeatureServiceRequest {
258+
string name = 1;
259+
string project = 2;
260+
bool allow_cache = 3;
261+
}
262+
263+
message ListFeatureServicesRequest {
264+
string project = 1;
265+
bool allow_cache = 2;
266+
}
267+
268+
message ListFeatureServicesResponse {
269+
repeated feast.core.FeatureService feature_services = 1;
270+
}
271+
272+
message DeleteFeatureServiceRequest {
273+
string name = 1;
274+
string project = 2;
275+
bool commit = 3;
276+
}
277+
278+
// SavedDataset
279+
280+
message ApplySavedDatasetRequest {
281+
feast.core.SavedDataset saved_dataset = 1;
282+
string project = 2;
283+
bool commit = 3;
284+
}
285+
286+
message GetSavedDatasetRequest {
287+
string name = 1;
288+
string project = 2;
289+
bool allow_cache = 3;
290+
}
291+
292+
message ListSavedDatasetsRequest {
293+
string project = 1;
294+
bool allow_cache = 2;
295+
}
296+
297+
message ListSavedDatasetsResponse {
298+
repeated feast.core.SavedDataset saved_datasets = 1;
299+
}
300+
301+
message DeleteSavedDatasetRequest {
302+
string name = 1;
303+
string project = 2;
304+
bool commit = 3;
305+
}
306+
307+
// ValidationReference
308+
309+
message ApplyValidationReferenceRequest {
310+
feast.core.ValidationReference validation_reference = 1;
311+
string project = 2;
312+
bool commit = 3;
313+
}
314+
315+
message GetValidationReferenceRequest {
316+
string name = 1;
317+
string project = 2;
318+
bool allow_cache = 3;
319+
}
320+
321+
message ListValidationReferencesRequest {
322+
string project = 1;
323+
bool allow_cache = 2;
324+
}
325+
326+
message ListValidationReferencesResponse {
327+
repeated feast.core.ValidationReference validation_references = 1;
328+
}
329+
330+
message DeleteValidationReferenceRequest {
331+
string name = 1;
332+
string project = 2;
333+
bool commit = 3;
334+
}

sdk/python/feast/feature_store.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,10 @@ def __init__(
164164
self._registry = SnowflakeRegistry(
165165
registry_config, self.config.project, None
166166
)
167+
elif registry_config and registry_config.registry_type == "remote":
168+
from feast.infra.registry.remote import RemoteRegistry
169+
170+
self._registry = RemoteRegistry(registry_config, self.config.project, None)
167171
else:
168172
r = Registry(self.config.project, registry_config, repo_path=self.repo_path)
169173
r._initialize_registry(self.config.project)

sdk/python/feast/infra/registry/registry.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ def __new__(
178178
from feast.infra.registry.snowflake import SnowflakeRegistry
179179

180180
return SnowflakeRegistry(registry_config, project, repo_path)
181+
elif registry_config and registry_config.registry_type == "remote":
182+
from feast.infra.registry.remote import RemoteRegistry
183+
184+
return RemoteRegistry(registry_config, project, repo_path)
181185
else:
182186
return super(Registry, cls).__new__(cls)
183187

0 commit comments

Comments
 (0)