Skip to content

Commit cbd1dde

Browse files
shuchuSHUCHU HAN
andauthored
feat: Add document of Go feature server. (#5697)
* feat: Add document of Go feature server. Signed-off-by: SHUCHU HAN <[email protected]> * fix: Fix typos. Signed-off-by: SHUCHU HAN <[email protected]> --------- Signed-off-by: SHUCHU HAN <[email protected]> Co-authored-by: SHUCHU HAN <[email protected]>
1 parent aa2c838 commit cbd1dde

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Go feature server (Alpha)
2+
3+
## Overview
4+
The Go feature server is an HTTP/gRPC endpoint that serves features. It is written in Go.
5+
6+
## Configuration of `feature_store.yaml`
7+
The current Go feature server needs a Python based feature Transformation service support. Please refer to the following code as an example:
8+
```
9+
# -*- coding: utf-8 -*-
10+
from feast.feature_store import FeatureStore
11+
12+
13+
def main():
14+
# Init the Feature Store
15+
store = FeatureStore(repo_path="./feature_repo/")
16+
17+
# Start the feature transformation server
18+
# default port is 6569
19+
store.serve_transformations(6569)
20+
21+
if __name__ == "__main__":
22+
main()
23+
```
24+
At the same time, we need to configure the `feature_store.yaml` as following:
25+
26+
```
27+
...
28+
entity_key_serialization_version: 3
29+
feature_server:
30+
type: local
31+
transformation_service_endpoint: "localhost:6569"
32+
...
33+
```
34+
## Supported APIs
35+
Here is the list of supported APIs:
36+
| Method | API | Comment |
37+
|:---: | :---: | :---: |
38+
| POST | /get-online-features | Retrieve features of one or many entities |
39+
| GET | /health | Status of the Go Feature Server |
40+
41+
## OTEL based Observability
42+
The Go feature server support [OTEL](https://opentelemetry.io/) based Observabilities.
43+
To enable it, we need to set the global env `ENABLE_OTEL_TRACING` to `"true"` (as a string type!) in the container or your local OS.
44+
```
45+
export ENABLE_OTEL_TRACING='true'
46+
```
47+
There are example OTEL infra setup under the `/go/infra/docker/otel` folder.
48+
49+
## Demo
50+
Please check the Reference[2] for a local demo of Go feature server. If you want to see a real world example of applying Go feature server in Production, please check Reference[1].
51+
52+
## Reference
53+
1. [Expedia Group's Go Feature Server Implementation (in Production)](https://github.com/EXPEbdodla/feast)
54+
2. [A Go Feature server demo from Feast](https://github.com/feast-dev/feast-credit-score-local-tutorial)

0 commit comments

Comments
 (0)