Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handover #1

Merged
merged 6 commits into from
Feb 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# SPDX-License-Identifier: MIT
# SPDX-License-Identifier: Apache-2.0

# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
Expand All @@ -14,4 +14,4 @@
# This should make it easy to add new rules without breaking existing ones.

# Global rule:
# * @ADD_CODEOWNERS_HERE
* @marvin-hansen @jovezhong
12 changes: 1 addition & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,6 @@

# Contributing

Proton is an open project, and you can contribute to it in many ways. You can help with ideas, code, or documentation. We appreciate any efforts that help us to make the project better. If you are looking for issues to work on, try looking at [the issue list](https://github.com/timeplus-io/proton/issues).
Proton is an open project, and you can contribute to it in many ways. This is the Rust client for Proton. You can help with ideas, code, or documentation. We appreciate any efforts that help us to make the project better.

Thank you!

## Legal Info

When you open your first pull-request to Proton repo, a bot will invite you to accept Proton Individual CLA (Contributor License Agreement). It is a simple few click process. For subsequent pull-requests the bot will check if you have already signed it and won't bother you again.

## Technical Info

Please follow the Proton code convention (TODO) and [Clickhouse coding style](https://clickhouse.com/docs/en/development/style) and write unit test / integration testing (TODO). See [build from source](BUILD.md) for how to compile Proton in different platforms. Besides this guide, you can find [Overview of Proton Architecture](https://docs.timeplus.com/proton-architecture)

If you want to contribute to documentation, please submit PR to https://github.com/timeplus-io/docs.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ rust-version = "1.65"
readme = "README.md"
license = "Apache-2.0"

authors = ["Marvin Hansen <[email protected]>", ]
description = "Client for the Proton / TimePlus SQL streaming engine"
authors = ["Marvin Hansen <[email protected]>"]
description = "Client for Timeplus Proton, a streaming SQL engine"
documentation = "https://docs.rs/proton_client"
homepage = "https://github.com/timeplus-io/proton-rust-client"
repository = "https://github.com/timeplus-io/proton-rust-client"
keywords = ["proton", "timeplus", "streaming", "database", "timeseries"]
keywords = ["proton", "timeplus", "streaming", "sql", "database", "timeseries"]

[lib]
name = "proton_client"
Expand All @@ -35,10 +35,10 @@ path = "examples/remove/main.rs"

[dependencies]
clickhouse = { version = "0.11", features = ["watch"] }
clickhouse-derive = { version = "0.1"}
clickhouse-derive = { version = "0.1" }
tokio = { version = "1", features = ["rt-multi-thread", "macros"] }
serde = { version = "1.0.196", features = ["derive"] }


[dev-dependencies]
clickhouse = { version = "0.11", features = ["test-util"] }
clickhouse = { version = "0.11", features = ["test-util"] }
20 changes: 10 additions & 10 deletions Handover.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (---)

# Handover
# Handover

Suggested steps to do after the repo transfer:

## Add the active maintainer
## Add the active maintainer

Add the new / active maintainer to the following files: MAINTAINERS.md, CODEOWNERS, and CONTRIBUTING.md.

Expand All @@ -16,7 +16,7 @@ Add the new / active maintainer to the following files: MAINTAINERS.md, CODEOWNE

## Verify CI / Github actions:

Currently, all GH actions trigger on pull request, unless stated otherwise, assuming[ branch protection is in place](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) (as it should).
Currently, all GH actions trigger on pull request, unless stated otherwise, assuming[ branch protection is in place](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/about-protected-branches) (as it should).

The following GH actions are pre-configured:

Expand All @@ -37,8 +37,8 @@ Rust packages are published to the crates.io registry. To do so, the following s
1) Ensure all changes are comited and pushed to origin. This is important otherwise publish will abort.
2) Verify the pre-defined meta data in Cargo.toml. Repo & homepage is already set to https://github.com/timeplus-io/proton-rust-client
3) Create a free account on https://crates.io/
4) Create an API token in the dashboard
5) Login locally, from a terminal: ```cargo login``` Then at the prompt put in the token specified.
4) Create an API token on https://crates.io/settings/tokens
5) Login locally, from a terminal: ```cargo login``` Then at the prompt put in the token specified.
6) Conduct a dry run to see if everything is correct: ```cargo publish --dry-run```
7) When the dry run completes without error, publish the first version: ```cargo publish```

Expand All @@ -48,9 +48,9 @@ https://doc.rust-lang.org/cargo/reference/publishing.html

## Enable auto-release

The conventional Rust release process requires a fair amount of manual steps, such as bumping up version number,
The conventional Rust release process requires a fair amount of manual steps, such as bumping up version number,
adding new git tags, generating changelog, publishing to crates.io etc. For full automation, the release-plz system
has already been pre-configured.
has already been pre-configured.

Release-plz automates your release process:

Expand All @@ -64,15 +64,15 @@ Release-plz updates your packages with a release Pull Request based on:
* API breaking changes (detected by cargo-semver-checks).

To enable the release-plz, edit the rust-release file in .github/workflows, uncomment the release-plz section,
and add your crates.io API token as a Github secret.
and add your crates.io API token as a Github secret.

Once the release-plz is enabled, every push to main is added to a generated release PR. When the release PR
is merged, a new Github release is generated fully automatically, a new version is
is merged, a new Github release is generated fully automatically, a new version is
published to the cargo registry, and the documentation is uploaded to rustdocs.org.

For details on how to configure release-plz, consult the documentation:
https://github.com/MarcoIeni/release-plz

For details of how to add a GH secret, see the official GH documentation:

https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
https://docs.github.com/en/actions/security-guides/using-secrets-in-github-actions
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2016-2022 ClickHouse, Inc.
Copyright 2021-2024 Timeplus, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
7 changes: 4 additions & 3 deletions MAINTAINERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@ Maintainers (sorted alphabetically)
---------------------------------------
Maintainers are actively supporting the project and have made substantial contributions to the repository. They have admin access to the repo and provide support reviewing issues and pull requests.

-
- [marvin-hansen](https://github.com/marvin-hansen) Marvin Hansen: Wrote the initial version of the client up to version 0.1.0.
- [jovezhong](https://github.com/jovezhong) Jove Zhong: Work with Marvin to maintain this client under [Timeplus GitHub Org](https://github.com/timeplus-io).

Contributors (sorted alphabetically)
-------------------------------------

- [marvin-hansen](https://github.com/marvin-hansen) Marvin Hansen: Wrote the initial version of the client up to version 0.1.0.
-

To contributors: please add your name to the list when you submit a patch to the project.
To contributors: please add your name to the list when you submit a patch to the project.
52 changes: 28 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,38 @@
[//]: # (SPDX-License-Identifier: Apache-2.0)
[//]: # (---)

# Rust Client for Proton SQL Streaming Engine
Rust client for [Proton / TimePlus]([url](https://www.timeplus.com/)https://www.timeplus.com/).
# Rust Client for Proton

Rust client for [Timeplus Proton](https://github.com/timeplus-io/proton).

Proton is a streaming SQL engine, a fast and lightweight alternative to Apache Flink, 🚀 powered by ClickHouse. It enables developers to solve streaming data processing, routing and analytics challenges from Apache Kafka, Redpanda and more sources, and send aggregated data to the downstream systems. Proton is the core engine of [Timeplus](https://timeplus.com), which is a cloud native streaming analytics platform.

The initial version(0.1.0) of the client was written by [Marvin Hansen](https://github.com/marvin-hansen). Thanks for the contribution.

## Install proton
This client uses https://crates.io/crates/clickhouse as a dependency.

```
brew install proton
```
## Install Proton

### As a single binary

1. Start the Proton server:
$ proton server start
On Linux or Mac, you can install it via `curl https://install.timeplus.com | sh`

2. In a separate terminal, connect to the server:
$ proton client
(Note: If you encounter a 'connection refused' error, use: proton client --host 127.0.0.1)
On Mac, you can also install it via `brew install proton`

3. To terminate the server, press ctrl+c in the server terminal.
After you get the `proton` binary, you can start the Proton server via `proton server start`

For detailed usage and more information, check out the Timeplus documentation:
https://docs.timeplus.com/
In a separate terminal, connect to the server via `proton client` (Note: If you encounter a 'connection refused' error, use: proton client --host 127.0.0.1)

### As a Docker container

```bash
docker run -d --pull always --name proton ghcr.io/timeplus-io/proton:latest
```

Proton is automatically started. Open the terminal of the container, and run `proton client`


For detailed usage and more information, check out the documentation: https://docs.timeplus.com/proton


## Install ProtonClient
Expand All @@ -34,7 +42,7 @@ Add the following to your Cargo.toml:

```
[dependencies]
proton_client = { git = "https://github.com/marvin-hansen/proton-rust-client.git" }
proton_client = { git = "https://github.com/timeplus-io/proton-rust-client.git" }
```

[//]: # (AFTER the release of the package on crates.io)
Expand Down Expand Up @@ -87,29 +95,25 @@ async fn main() -> Result<()> {

## What's next?

To see more examples of using Proton, check out the [examples](examples) folder.
To see more examples of using Proton, check out the [examples](https://github.com/timeplus-io/proton/tree/develop/examples) folder in Proton repo.

Check out the proton [documentation on the SQL Query syntax](https://docs.timeplus.com/query-syntax).
Please note, by default the SQL queries are in streaming mode. Learn more about SQL syntax at [Proton Documentation](https://docs.timeplus.com/query-syntax).


## Documentation

You find the full documentation for Proton at [docs.timeplus.com](https://docs.timeplus.com/proton) alongside documentation for the Timeplus (Cloud and BYOC) platform.

We also have a [FAQ](https://docs.timeplus.com/proton-faq/) for detailing how we chose Apache License 2.0, how Proton is related to ClickHouse, what features are available in Proton versus Timeplus, and more.


## Contributing

We welcome your contributions! If you are looking for issues to work on, try looking at [the issue list](FIXLINK).
We welcome your contributions!

## Need help?

Join our [Timeplus Community Slack](https://timeplus.com/slack) to connect with Timeplus engineers and other Proton users.

For filing bugs, suggesting improvements, or requesting new features, see the [open issues](FIXLINK) here on GitHub.
For filing bugs, suggesting improvements, or requesting new features, see the [open issues](https://github.com/timeplus-io/proton-rust-client/issues) here on GitHub.

## Licensing

Proton Rust Client uses Apache License 2.0. See details in the [LICENSE](LICENSE).

59 changes: 0 additions & 59 deletions SECURITY.md

This file was deleted.

34 changes: 19 additions & 15 deletions examples/README_EXAMPLES.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,30 @@


# Examples for Rust Client for Proton

# Examples for Rust Client for Proton

## Install proton

```
brew install proton
```
## Install Proton

### As a single binary

On Linux or Mac, you can install it via `curl https://install.timeplus.com | sh`

On Mac, you can also install it via `brew install proton`

1. Start the Proton server:
$ proton server start
After you get the `proton` binary, you can start the Proton server via `proton server start`

2. In a separate terminal, connect to the server:
$ proton client
(Note: If you encounter a 'connection refused' error, use: proton client --host 127.0.0.1)
In a separate terminal, connect to the server via `proton client` (Note: If you encounter a 'connection refused' error, use: proton client --host 127.0.0.1)

3. To terminate the server, press ctrl+c in the server terminal.
### As a Docker container

```bash
docker run -d --pull always --name proton ghcr.io/timeplus-io/proton:latest
```

Proton is automatically started. Open the terminal of the container, and run `proton client`

For detailed usage and more information, check out the Timeplus documentation:
https://docs.timeplus.com/

For detailed usage and more information, check out the documentation: https://docs.timeplus.com/proton


## Install ProtonClient
Expand Down Expand Up @@ -123,4 +128,3 @@ Expected output
[prepare]: Delete Stream
[prepare]: Stop
```

Loading