|
1 |
| -# TypeStream |
| 1 | +<div align="center"> |
| 2 | + <img src="/assets/avatar-transparent.png?raw=true" width="86"> |
| 3 | +</div> |
2 | 4 |
|
3 |
| -## How to install |
| 5 | +<h1 align="center">TypeStream</h1> |
| 6 | + |
| 7 | +<br /> |
| 8 | + |
| 9 | +<div align="center"> |
| 10 | + <a href="https://github.com/typestreamio/typestream/blob/main/LICENSE"> |
| 11 | + <img src="https://img.shields.io/github/license/typestreamio/typestream" /> |
| 12 | + </a> |
| 13 | + <a href="https://discord.gg/Ha9sJWXb"> |
| 14 | + <img src="https://img.shields.io/badge/Chat-on%20Discord-blue" alt="Discord invite" /> |
| 15 | + </a> |
| 16 | +</div> |
| 17 | + |
| 18 | +<p align="center"> |
| 19 | + <a href="#why-typestream">Why TypeStream?</a> |
| 20 | + · |
| 21 | + <a href="#getting-started">Getting started</a> |
| 22 | + · |
| 23 | + <a href="#how-to-contribute">How to contribute</a> |
| 24 | + · |
| 25 | + <a href="#code-of-conduct">Code of conduct</a> |
| 26 | + · |
| 27 | + <a href="#license">License</a> |
| 28 | +</p> |
| 29 | + |
| 30 | +<h3 align="center"> |
| 31 | + |
| 32 | +TypeStream is an abstraction layer on top of Kafka that allows you to write |
| 33 | +and run <i>typed</i> data pipelines with a minimal, familiar syntax. |
| 34 | + |
| 35 | +</h3 > |
| 36 | + |
| 37 | +## Why TypeStream? |
| 38 | + |
| 39 | +Building streaming data pipelines on top of Kafka comes with some fixed costs. |
| 40 | +You have to write the app, test it, then deploy and manage it in production. |
| 41 | +Even for the simplest pipelines, this can be a lot of work. |
| 42 | + |
| 43 | +With TypeStream you can write powerful, typed Kafka pipelines like you would |
| 44 | +write a simple UNIX pipeline in your terminal. For example, imagine you'd like |
| 45 | +to filter a "books" topic. With TypeStream, it's a one liner: |
| 46 | + |
| 47 | +```sh |
| 48 | +$ typestream |
| 49 | +> cat /dev/kafka/local/topics/books | grep "station" > /dev/kafka/local/topics/stations |
| 50 | +``` |
| 51 | + |
| 52 | +TypeStream will take care of type-checking your pipeline and then run it for |
| 53 | +you. Here's how grepping looks like in action: |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | +Another common use case that requires a lot of boilerplate is to enrich a topic |
| 58 | +with data from an external source. For example, you might have a topic with an |
| 59 | +ip address field and you may want to enrich it with country information. With |
| 60 | +TypeStream, you can do it (again!) in a single line: |
| 61 | + |
| 62 | +```sh |
| 63 | +$ typestream |
| 64 | +> cat /dev/kafka/local/topics/page_views | enrich { view -> http "https://api.country.is/#{$view.ip_address}" | cut .country } > /dev/kafka/local/topics/page_views_with_country |
| 65 | +``` |
| 66 | +
|
| 67 | +Here's how enriching looks like in action: |
| 68 | +
|
| 69 | + |
| 70 | +
|
| 71 | +As you can see from the previous command, in the spirit of UNIX, we used cut to |
| 72 | +extract the country field from the response. Here's the kick with TypeStream, |
| 73 | +you can use `cut` (and many other Unix commands) on streams as well: |
| 74 | +
|
| 75 | +```sh |
| 76 | +$ typestream |
| 77 | +> cat /dev/kafka/local/topics/books | cut .title > /dev/kafka/local/topics/book_titles |
| 78 | +``` |
| 79 | +
|
| 80 | +Here's how cutting looks like in action: |
| 81 | +
|
| 82 | + |
| 83 | +
|
| 84 | +Another problem that TypeStream solves is preventing you from writing faulty pipelines by type-checking them before executing them. Here's type checking in action: |
| 85 | +
|
| 86 | + |
| 87 | +
|
| 88 | +If you'd like to learn more about TypeStream, check out our |
| 89 | +[documentation](https://docs.typestream.io/). |
| 90 | +
|
| 91 | +## Getting started |
4 | 92 |
|
5 | 93 | If you use [Homebrew](https://brew.sh/):
|
6 | 94 |
|
7 | 95 | ```sh
|
8 | 96 | brew install typestreamio/tap/typestream
|
| 97 | +$ typestream --version |
9 | 98 | ```
|
10 | 99 |
|
11 |
| -If you want to build it yourself, refer to our [contributing |
12 |
| -guidelines](/CONTRIBUTING.md). |
| 100 | +if you see something like this: |
| 101 | +
|
| 102 | +```sh |
| 103 | +typestream version 2023.08.31+3 42f7762daac1872416bebab7a34d0b79a838d40a (2023-09-02 09:20:52) |
| 104 | +``` |
| 105 | +
|
| 106 | +then you're good to go! You can now run: |
| 107 | +
|
| 108 | +```sh |
| 109 | +typestream local start |
| 110 | +typestream local seed |
| 111 | +``` |
| 112 | +
|
| 113 | +to start a local TypeStream server and seed it with some sample data. Now you're |
| 114 | +ready to start writing your own pipelines! |
| 115 | +
|
| 116 | +Check out our [documentation](https://docs.typestream.io/) to learn more about |
| 117 | +TypeStream. |
13 | 118 |
|
14 | 119 | ## How to contribute
|
15 | 120 |
|
16 | 121 | We love every form of contribution! Good entry points to the project are:
|
17 | 122 |
|
18 |
| -- Our [contributing guidelines](/CONTRIBUTING.md) document |
| 123 | +- Our [contributing guidelines](/CONTRIBUTING.md) document. |
19 | 124 | - Issues with the tag
|
20 |
| - [gardening](https://github.com/typestreamio/typestream/issues?q=is%3Aissue+is%3Aopen+label%3Agardening) |
| 125 | + [gardening](https://github.com/typestreamio/typestream/issues?q=is%3Aissue+is%3Aopen+label%3Agardening). |
21 | 126 | - Issues with the tag [good first
|
22 |
| - patch](https://github.com/typestreamio/typestream/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+patch%22) |
| 127 | + patch](https://github.com/typestreamio/typestream/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+patch%22). |
23 | 128 |
|
24 |
| -If you're not sure where to start, please open a [new |
25 |
| -issue](https://github.com/typestreamio/typestream/issues/new) and we'll gladly help |
26 |
| -you get started. |
| 129 | +If you're not sure where to start, open a [new |
| 130 | +issue](https://github.com/typestreamio/typestream/issues/new) or hop on to our |
| 131 | +[discord](https://discord.gg/Ha9sJWXb) server and we'll gladly help you get |
| 132 | +started. |
27 | 133 |
|
28 | 134 | ## Code of Conduct
|
29 | 135 |
|
|
0 commit comments