Skip to content

Commit 25feae1

Browse files
committed
chore: Refactoring Feast Serving to have fewer packages (feast-dev#3032)
* refactor: no-op refactor that removes some unused classes and reduces the number of modules in Feast Serving Signed-off-by: Danny Chiao <[email protected]> * fix test Signed-off-by: Danny Chiao <[email protected]> * Add more details to README in java Signed-off-by: Danny Chiao <[email protected]> * Move server config modules to service Signed-off-by: Danny Chiao <[email protected]> * revert breakage Signed-off-by: Danny Chiao <[email protected]> * Complete docs Signed-off-by: Danny Chiao <[email protected]> * Complete docs Signed-off-by: Danny Chiao <[email protected]>
1 parent d584ecd commit 25feae1

File tree

73 files changed

+178
-1892
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+178
-1892
lines changed

java/CONTRIBUTING.md

Lines changed: 34 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,48 @@
22
> The higher level [Development Guide](https://docs.feast.dev/v/master/project/development-guide)
33
> gives contributing to Feast codebase as a whole.
44
5-
### Overview
5+
## Overview
66
This guide is targeted at developers looking to contribute to Feast components in
77
the feast-java Repository:
88
- [Feast Serving](#feast-serving)
9-
- [Feast Java Client](#feast-java-client)
9+
- [Feast Serving Client](#feast-serving-client)
1010

1111
> Don't see the Feast component that you want to contribute to here?
1212
> Check out the [Development Guide](https://docs.feast.dev/v/master/project/development-guide)
1313
> to learn how Feast components are distributed over multiple repositories.
1414
15-
#### Common Setup
15+
### Repository structure
16+
There are four key top level packages:
17+
- `serving`: Feast Serving (a gRPC service to serve features)
18+
- `serving-client`: Feast Serving Client (a thin Java client to communicate with Feast serving via gRPC )
19+
- `datatypes`: A symlink to the overall project protos. These include the core serving gRPC protos, proto representations of all objects in the Feast registry.
20+
- `coverage`: Generates JaCoCo coverage reports
21+
22+
#### Feast Serving
23+
> **Note:** there are references to metrics collection in the code. These are unused and exist for legacy reasons (from when this used Spring Boot), but remain in the code until published to StatsD / Prometheus Pushgateway.
24+
25+
The primary entrypoint into the Feast Serving server is `ServingGuiceApplication`, which connects to the rest of the packages:
26+
- `connectors`: Contains online store connectors (e.g. Redis)
27+
- `exception`: Contains user-facing exceptions thrown by Feast Serving
28+
- `registry`: Logic to parse a Feast file-based registry (in GCS, S3, or local) into the `Registry` proto object, and automatically re-sync the registry.
29+
- `service`: Core logic that exposes and backs the serving APIs. This includes communication with a feature transformation server to execute on demand transformations
30+
- The root code in this package creates the main entrypoint (`ServingServiceV2`) which is injected into `OnlineServingGrpcServiceV2` in `grpc/` implement the gRPC service.
31+
- `config`: Guice modules to power the server and config
32+
- Includes server config / guice modules in `ServerModule`
33+
- Maps overall Feast Serving user configuration from Java to YAML in `ApplicationPropertiesModule` and `ApplicationProperties`
34+
- `controller`: server controllers (right now, only a gRPC health check)
35+
- `grpc`: Implementation of the gRPC serving service
36+
- `interceptors`: gRPC interceptors (currently used to produce metrics around each gRPC request)
37+
38+
### Common Setup
1639
Common Environment Setup for all feast-java Feast components:
1740

1841
Ensure following development tools are installed:
1942
- Java SE Development Kit 11
2043
- Maven 3.6
2144
- `make`
2245

23-
#### Code Style
46+
### Code Style
2447
Feast's Java codebase conforms to the [Google Java Style Guide](https://google.github.io/styleguide/javaguide.html).
2548

2649
Automatically format the code to conform the style guide by:
@@ -33,7 +56,7 @@ mvn spotless:apply
3356
> If you're using IntelliJ, you can import these [code style settings](https://github.com/google/styleguide/blob/gh-pages/intellij-java-google-style.xml)
3457
> if you'd like to use the IDE's reformat function.
3558
36-
#### Project Makefile
59+
### Project Makefile
3760
The Project Makefile provides useful shorthands for common development tasks:
3861

3962

@@ -42,18 +65,18 @@ Run all Unit tests:
4265
make test-java
4366
```
4467

45-
Run all Integration tests:
68+
Run all Integration tests (note: this also runs GCS + S3 based tests which should fail):
4669
```
4770
make test-java-integration
4871
```
4972

50-
Building Docker images for Feast Core &amp; Feast Serving:
73+
Building Docker images for Feast Serving:
5174
```
5275
make build-docker REGISTRY=gcr.io/kf-feast VERSION=develop
5376
```
5477

5578

56-
#### IDE Setup
79+
### IDE Setup
5780
If you're using IntelliJ, some additional steps may be needed to make sure IntelliJ autocomplete works as expected.
5881
Specifically, proto-generated code is not indexed by IntelliJ. To fix this, navigate to the following window in IntelliJ:
5982
`Project Structure > Modules > datatypes-java`, and mark the following folders as `Source` directorys:
@@ -64,12 +87,12 @@ Specifically, proto-generated code is not indexed by IntelliJ. To fix this, navi
6487
## Feast Serving
6588
See instructions [here](serving/README.md) for developing.
6689

67-
## Feast Java Client
90+
## Feast Serving Client
6891
### Environment Setup
69-
Setting up your development environment for Feast Java SDK:
92+
Setting up your development environment:
7093
1. Complete the feast-java [Common Setup](#common-setup)
7194

72-
> Feast Java Client is a Java Client for retrieving Features from a running Feast Serving instance.
95+
> Feast Serving Client is a Serving Client for retrieving Features from a running Feast Serving instance.
7396
> See the [Feast Serving Section](#feast-serving) section for how to get a Feast Serving instance running.
7497
7598
### Building

java/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
### Overview
44

55
This repository contains the following Feast components.
6-
* Feast Serving: A service used to serve the latest feature values to models.
7-
* Feast Java SDK: A client used to retrieve features from Feast Serving.
6+
* Feast Serving: A gRPC service used to serve the latest feature values to models.
7+
* Feast Serving Client: A client used to retrieve features from Feast Serving.
88

99
### Architecture
1010

@@ -16,6 +16,7 @@ Guides on Contributing:
1616
- [Contribution Process for Feast](https://docs.feast.dev/v/master/project/contributing)
1717
- [Development Guide for Feast](https://docs.feast.dev/v/master/project/development-guide)
1818
- [Development Guide for feast-java (this repository)](CONTRIBUTING.md)
19+
- **Note**: includes installing without using Helm
1920

2021
### Installing using Helm
2122
Please see the Helm charts in [infra/charts/feast](../infra/charts/feast).

java/common/pom.xml

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)