Skip to content

Commit 3ea04a7

Browse files
authored
chore: release 0.2 (#110)
* docs: udpate readme * docs: update banner image * chore: update js package version * chore: client readme update * chore: readme fix
1 parent 495eebb commit 3ea04a7

6 files changed

Lines changed: 103 additions & 23 deletions

File tree

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
# Output of the go coverage tool, specifically when used with LiteIDE
1313
*.out
1414

15-
# Dependency directories (remove the comment below to include it)
15+
# Dependency directories
1616
vendor/
1717

1818
# IDEs

README.md

Lines changed: 88 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# Stencil
22

3-
![test workflow](https://github.com/odpf/stencil/actions/workflows/server-test.yaml/badge.svg)
4-
![release workflow](https://github.com/odpf/stencil/actions/workflows/release.yml/badge.svg)
3+
![Test](https://github.com/odpf/stencil/actions/workflows/test-server.yaml/badge.svg)
4+
![Release](https://github.com/odpf/stencil/actions/workflows/release.yml/badge.svg)
55
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg?logo=apache)](LICENSE)
66
[![Version](https://img.shields.io/github/v/release/odpf/stencil?logo=semantic-release)](Version)
77

8-
Stencil is dynamic schema registry for protobuf. [Protobuf](https://developers.google.com/protocol-buffers) is a Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data. The challenge with using generated source code from protobuf is that for every change in proto definition, it requires to recompile dependent services/packages. This approach works for most applications but it's difficult for general purpose applications that needs to operate on arbitrary protobuf schemas. Stencil enables the developers to specifically tackle this problem.
9-
10-
To work with arbitrary proto schema, application need to load proto schema definition at runtime. Protobuf allows you to define a whole proto file using [google.protobuf.FileDescriptorProto](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L62). A [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto#L57) contains list of FileDescriptorProtos. `protoc` can generate descriptorset file from proto files. Stencil heavily make use of this feature to update proto schemas in runtime.
8+
Stencil is a schema registry that provides schema mangement and validation to ensure data compatibility across applications. It enables developers to create, manage and consume schemas dynamically, efficiently, and reliably, and provides a simple way to validate data against those schemas. Stencil support multiple formats including Protobuf, Avro and JSON.
119

1210
<p align="center"><img src="./docs/static/assets/overview.svg" /></p>
1311

@@ -20,21 +18,101 @@ Discover why users choose Stencil as their main schema registry
2018
- **Flexbility** ability to skip some of the backward compatability checks while upload
2119
- **Descriptor fetch** ability to download proto descriptor files
2220
- **Metadata** provides metadata API to retrieve latest version number given a name and namespace
23-
- **Clients in multiple languages** Stencil provides clients in GO, JAVA, JS languages to interact with Stencil server and deserialize messages using dynamic schema
21+
- **Clients in multiple languages** Stencil provides clients in GO, Java, JS languages to interact with Stencil server and deserialize messages using dynamic schema
2422

25-
## Usage
23+
## Documentation
2624

2725
Explore the following resources to get started with Stencil:
2826

29-
- [Documentation](http://odpf.gitbook.io/stencil) provides guidance on using stencil.
30-
- [Server](/server) provides details on getting started with stencil server.
31-
- [Clients](/clients) provides reference to supported stencil clients.
27+
- [Documentation](http://odpf.github.io/stencil) provides guidance on using stencil.
28+
- [Server](https://odpf.github.io/stencil/docs/server/overview) provides details on getting started with stencil server.
29+
- [Clients](https://odpf.github.io/stencil/docs/clients/overview) provides reference to supported stencil clients.
30+
31+
## Installation
32+
33+
Install Stencil on macOS, Windows, Linux, OpenBSD, FreeBSD, and on any machine.
34+
35+
#### Binary (Cross-platform)
36+
37+
Download the appropriate version for your platform from [releases](https://github.com/odpf/stencil/releases) page. Once downloaded, the binary can be run from anywhere.
38+
You don’t need to install it into a global location. This works well for shared hosts and other systems where you don’t have a privileged account.
39+
Ideally, you should install it somewhere in your PATH for easy use. `/usr/local/bin` is the most probable location.
40+
41+
#### Homebrew
42+
43+
```sh
44+
# Install stencil (requires homebrew installed)
45+
$ brew install odpf/taps/stencil
46+
47+
# Upgrade stencil (requires homebrew installed)
48+
$ brew upgrade stencil
49+
50+
# Check for installed stencil version
51+
$ stencil version
52+
```
53+
54+
## Usage
55+
56+
Stencil has three major components. Server, CLI and clients. Stencil server and CLI are bundled in a single binary.
57+
58+
### Server
59+
60+
Stencil server provides a way to store and fetch schemas and enforce compatability rules. Run `stencil server --help` to see instructions to manage Stencil server.
61+
62+
### CLI
63+
64+
Stencil CLI allows users to iteract with server to create, view, and search schemas. CLI is fully featured but simple to use, even for those who have very limited experience working from the command line. Run `stencil --help` to see list of all available commands and instructions to use.
3265

3366
## Clients
3467

68+
Stencil clients allows application to interact with stencil server to eserialize and deserialize messages using schema. Stencil supports clients in multiple languages.
69+
3570
- [Java](clients/java)
3671
- [Go](clients/go)
3772
- [Javascript](clients/js)
73+
- Ruby - Coming soon
74+
- Python - Coming soon
75+
76+
## Running locally
77+
78+
<details>
79+
<summary>Dependencies:</summary>
80+
81+
- Git
82+
- Go 1.16 or above
83+
- PostgreSQL 13 or above
84+
85+
</details>
86+
87+
```sh
88+
# Clone the repo
89+
$ git clone git@github.com:odpf/stencil.git
90+
91+
# Check all build comamnds available
92+
$ make help
93+
94+
# Build meteor binary file
95+
$ make build
96+
97+
# Init server config
98+
$ cp app/config.yaml config.yaml
99+
100+
# Run database migrations
101+
$ ./stencil server migrate
102+
103+
# Start stencil server
104+
$ ./stencil server start
105+
```
106+
107+
## Running tests
108+
109+
```sh
110+
# Running all unit tests
111+
$ make test
112+
113+
# Print code coverage
114+
$ make coverage
115+
```
38116

39117
## Contribute
40118

@@ -44,8 +122,6 @@ Read our [contributing guide](docs/contribute/contribution.md) to learn about ou
44122

45123
To help you get your feet wet and get you familiar with our contribution process, we have a list of [good first issues](https://github.com/odpf/stencil/labels/good%20first%20issue) that contain bugs which have a relatively limited scope. This is a great place to get started.
46124

47-
## Credits
48-
49125
This project exists thanks to all the [contributors](https://github.com/odpf/stencil/graphs/contributors).
50126

51127
## License

clients/java/README.md

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Protobuf allows you to define a protobuf file using DescriptorSet. A FileDescrip
66

77
## Requirements
88

9-
- [Gradle v6+](https://gradle.org/)
10-
- [JDK 8+](https://openjdk.java.net/projects/jdk8/)
9+
- [Gradle v6+](https://gradle.org/)
10+
- [JDK 8+](https://openjdk.java.net/projects/jdk8/)
1111

1212
## Usage
1313

@@ -16,7 +16,7 @@ Protobuf allows you to define a protobuf file using DescriptorSet. A FileDescrip
1616
#### Gradle
1717

1818
```groovy
19-
implementation group: 'io.odpf', name: 'stencil', version: '0.1.6'
19+
implementation group: 'io.odpf', name: 'stencil', version: '0.2.0'
2020
```
2121

2222
#### Maven
@@ -42,7 +42,6 @@ import io.odpf.stencil.StencilClientFactory;
4242
StencilClient stencilClient = StencilClientFactory.getClient();
4343
```
4444

45-
4645
#### Create client with remote URL
4746

4847
```java
@@ -53,6 +52,7 @@ StencilClient stencilClient = StencilClientFacorty.getClient(url, StencilConfig.
5352
```
5453

5554
#### Creating MultiURL client
55+
5656
```java
5757
import io.odpf.stencil.config.StencilConfig;
5858

@@ -61,7 +61,6 @@ urls.add("http://localhost:8082/v1beta1/...");
6161
StencilClient stencilClient = StencilClientFacorty.getClient(urls, StencilConfig.builder().build());
6262
```
6363

64-
6564
#### With StatsD client for monitoring
6665

6766
```java
@@ -74,7 +73,9 @@ StencilClient stencilClient = StencilClientFactory.getClient(url, StencilConfig.
7473
```
7574

7675
#### With Schema Update Listener
76+
7777
Whenever schema has changed this listener will be called.
78+
7879
```java
7980
import io.odpf.stencil.SchemaUpdateListener;
8081

@@ -83,7 +84,9 @@ StencilClient stencilClient = StencilClientFactory.getClient(url, StencilConfig.
8384
```
8485

8586
#### With version based refresh strategy
87+
8688
If url belongs to stencil server, client can choose to refresh schema data only if there is a new version available.
89+
8790
```java
8891
import io.odpf.stencil.cache.SchemaRefreshStrategy;
8992

@@ -92,7 +95,9 @@ StencilClient stencilClient = StencilClientFactory.getClient(url, config);
9295
```
9396

9497
#### Passing custom headers
98+
9599
While sending request to specified URL, client can be configured to pass headers as well.
100+
96101
```java
97102
import org.apache.http.Header;
98103
import org.apache.http.HttpHeaders;
@@ -127,6 +132,7 @@ DynamicMessage message = DynamicMessage.parseFrom(descriptor, bytes);
127132
```
128133

129134
#### Using Parser interface
135+
130136
```java
131137
import io.odpf.stencil.Parser;
132138
import com.google.protobuf.DynamicMessage;

clients/js/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@odpf/stencil",
3-
"version": "0.1.7",
3+
"version": "0.2.0",
44
"description": "Stencil js client package provides a store to lookup protobuf descriptors and options to keep the protobuf descriptors upto date.",
55
"main": "main.js",
66
"scripts": {

cmd/root.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@ func New() *cobra.Command {
1717
Example: heredoc.Doc(`
1818
$ stencil namespace create
1919
$ stencil schema create
20-
$ stencil upload
21-
$ stencil download
22-
$ stencil snapshot list
2320
$ stencil server start
21+
$ stencil serve migrate
2422
`),
2523
Annotations: map[string]string{
2624
"group:core": "true",

docs/static/img/banner.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)