Skip to content
This repository was archived by the owner on Aug 6, 2021. It is now read-only.

Commit b10cb01

Browse files
author
pilillo
committed
updated readmes
1 parent 525c4a5 commit b10cb01

File tree

4 files changed

+35
-19
lines changed

4 files changed

+35
-19
lines changed

abstract/featureset_dto.go

-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ type FeatureSet struct {
2222
Labels map[string]string `json:"labels,omitempty"`
2323
}
2424

25-
// Version ... definition of version for a feature set
26-
type Version struct{}
27-
2825
// Feature ... a named variable with a data type
2926
type Feature struct {
3027
Name string `json:"name,omitempty"`

doc/CATALOGUE.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,15 @@ type AssetDAOProvider interface {
3030
}
3131
```
3232

33-
Have a look at `catalogue/daos/*` for example implementations.
33+
Have a look at `catalogue/daos/*` for example implementations.
34+
35+
This is translated to the following endpoint:
36+
37+
| Verb | Endpoint | Maps to |
38+
|---------|-------------------------|-----------------------------------------------------|
39+
| **GET** | /healthcheck/asset | github.com/pilillo/mastro/catalogue.Ping |
40+
| **GET** | /asset/id/:asset_id | github.com/pilillo/mastro/catalogue.GetAssetByID |
41+
| **GET** | /asset/name/:asset_name | github.com/pilillo/mastro/catalogue.GetAssetByName |
42+
| **PUT** | /asset/ | github.com/pilillo/mastro/catalogue.UpsertAsset |
43+
| **PUT** | /assets/ | github.com/pilillo/mastro/catalogue.BulkUpsert |
44+
| **GET** | /assets/ | github.com/pilillo/mastro/catalogue.ListAllAssets |

doc/CONFIGURATION.md

+5-3
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ backend:
7373
username: mongo
7474
password: test
7575
host: "localhost:27017"
76-
schema: features
76+
database: mastro
77+
collection: mastro-featurestore
7778
```
7879
7980
### Catalogue
@@ -91,7 +92,8 @@ backend:
9192
username: mongo
9293
password: test
9394
host: "localhost:27017"
94-
schema: catalogue
95+
database: mastro
96+
collection: mastro-catalogue
9597
```
9698
9799
### Crawler
@@ -126,7 +128,7 @@ backend:
126128
schedule-period: "sunday"
127129
schedule-value: 1
128130
start-now: true
129-
catalogue-endpoint: "localhost:8085"
131+
catalogue-endpoint: "http://localhost:8085/assets"
130132
settings:
131133
host: "localhost"
132134
port: "21000"

doc/FEATURESTORE.md

+18-12
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,10 @@
44

55
A feature store is a service to store and version features.
66

7-
### FeatureSets and FeatureStates
8-
97
A Feature can either be computed on a dataset or a data stream, respectively using a batch or a stream processing pipeline.
108
This is due to the different life cycle and performance requirements for collecting and serving those data to end applications.
119

1210
```go
13-
// FeatureState ... a versioned set of features refered to a window over a reference time series or stream
14-
type FeatureState struct {
15-
Description string `json:"description,omitempty"`
16-
Features []Feature `json:"features,omitempty"`
17-
Labels map[string]string `json:"labels,omitempty"`
18-
}
19-
2011
// FeatureSet ... a versioned set of features
2112
type FeatureSet struct {
2213
InsertedAt time.Time `json:"inserted_at,omitempty"`
@@ -26,9 +17,6 @@ type FeatureSet struct {
2617
Labels map[string]string `json:"labels,omitempty"`
2718
}
2819

29-
// Version ... definition of version for a feature set
30-
type Version struct{}
31-
3220
// Feature ... a named variable with a data type
3321
type Feature struct {
3422
Name string `json:"name,omitempty"`
@@ -44,6 +32,7 @@ type FeatureSetDAOProvider interface {
4432
Init(*conf.DataSourceDefinition)
4533
Create(fs *FeatureSet) error
4634
GetById(id string) (*FeatureSet, error)
35+
GetByName(name string) (*FeatureSet, error)
4736
ListAllFeatureSets() (*[]FeatureSet, error)
4837
CloseConnection()
4938
}
@@ -61,19 +50,36 @@ var availableDAOs = map[string]func() abstract.FeatureSetDAOProvider{
6150
}
6251
```
6352

53+
## Service
54+
6455
As for the exposed service, the `featurestore/service.go` defines a basic interface to retrieve featureSets:
6556

6657
```go
6758
type Service interface {
6859
Init(cfg *conf.Config) *errors.RestErr
6960
CreateFeatureSet(fs abstract.FeatureSet) (*abstract.FeatureSet, *errors.RestErr)
7061
GetFeatureSetByID(fsID string) (*abstract.FeatureSet, *errors.RestErr)
62+
GetFeatureSetByName(fsName string) (*abstract.FeatureSet, *errors.RestErr)
7163
ListAllFeatureSets() (*[]abstract.FeatureSet, *errors.RestErr)
7264
}
7365
```
7466

67+
This is translated to the following endpoint:
68+
69+
70+
| Verb | Endpoint | Maps to |
71+
|---------|-----------------------------------|-------------------------------------------------------------|
72+
| **GET** | /healthcheck/featureset | github.com/pilillo/mastro/featurestore.Ping |
73+
| **GET** | /featureset/id/:featureset_id | github.com/pilillo/mastro/featurestore.GetFeatureSetByID |
74+
| **GET** | /featureset/name/:featureset_name | github.com/pilillo/mastro/featurestore.GetFeatureSetByName |
75+
| **PUT** | /featureset/ | github.com/pilillo/mastro/featurestore.CreateFeatureSet |
76+
| **GET** | /featureset/ | github.com/pilillo/mastro/featurestore.ListAllFeatureSets |
77+
78+
79+
7580
This is for instance how to add a new featureSet calculated in the test environment of a fictional project.
7681

82+
7783
*PUT* on `localhost:8085/featureset` with body:
7884
```json
7985
{

0 commit comments

Comments
 (0)