-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocs.html
More file actions
636 lines (592 loc) · 22.4 KB
/
docs.html
File metadata and controls
636 lines (592 loc) · 22.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8" />
<title>Venice</title>
<link rel="stylesheet" href="stylesheets/reset.css" />
<link rel="stylesheet" href="stylesheets/main.css" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="images/icons/favicons/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="images/icons/favicons/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="images/icons/favicons/favicon-16x16.png"
/>
<link rel="manifest" href="images/icons/favicons/manifest.json" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600&family=Fira+Code&family=Open+Sans:ital,wght@0,400;0,600;1,400&display=swap"
rel="stylesheet"
/>
<meta property="og:title" content="Venice Documentation" />
<meta
property="og:description"
content="An open-source framework for deploying and managing stream processing pipelines"
/>
<meta property="og:image" content="/images/thumbnail.png" />
<meta name="theme-color" content="#0f4c75" />
<script src="javascripts/sidebar.js"></script>
</head>
<body>
<header class="header-short">
<nav>
<ul>
<li>
<a href="index.html">
<img src="images/logos/venice_logo.png" alt="Venice logo" />
</a>
</li>
<li><a href="case-study.html">Case Study</a></li>
<li><a href="docs.html">Docs</a></li>
<li><a href="team.html">Team</a></li>
<li class="flex-float-right">
<a href="https://github.com/venice-framework" target="_blank">
<img
src="images/logos/github-mark-light.png"
alt="Venice GitHub"
class="github"
/>
</a>
</li>
</ul>
</nav>
</header>
<div class="docs-wrapper">
<aside class="sidebar">
<ul>
<li>
<a href="#what-is-venice">What is Venice?</a>
<ul>
<li><a href="#features">Features</a></li>
<li><a href="#components">Components</a></li>
<li><a href="#architecture">Architecture</a></li>
<li><a href="#when-does-it-fit">When does it fit?</a></li>
<li><a href="#when-does-it-not-fit">When does it not fit?</a></li>
</ul>
</li>
<li>
<a href="#Quickstart"> Quickstart</a>
</li>
</ul>
</aside>
<main>
<section id="docs">
<h1>Documentation</h1>
<h2 id="what-is-venice" class="sec-header">What is Venice?</h2>
<p>
Venice is an open-source framework that enables users to deploy and
manage stream processing pipelines.
</p>
<p>
Venice is designed for users who want to set up a streaming pipeline
with minimal hassle, and may be most suitable for developers who
want to quickly deploy a streaming pipeline for a small application.
</p>
<figure class="img-wrapper">
<img
src="/images/diagrams/gifs/workflow.gif"
alt="gif of Venice pipeline in action"
/>
<figcaption>
A Venice pipeline in action.
</figcaption>
</figure>
<h3 id="features" class="sec-header">Features</h3>
<p>
Venice’s main features are:
</p>
<ul>
<li>
An easy to use command line interface for common development and
pipeline management tasks.
</li>
<li>
A default pipeline to quickly support stream processing
applications.
</li>
<li>Simple configuration of new connections and components.</li>
<li>A web-based UI for monitoring the message brokers.</li>
</ul>
<h3 id="components" class="sec-header">Components</h3>
<p>
The Venice default pipeline consists of multiple components:
</p>
<ul>
<li>Kafka brokers for logging events</li>
<li>Zookeeper for managing the Kafka brokers</li>
<li>Confluent Schema Registry for managing schemas</li>
<li>
ksqlDB and ksqlCLI for performing aggregations, filtration,
transformations, and joins over real-time data
</li>
<li>
Kafka Connect for pushing data into and pulling data out of Kafka
and for simplifying the process of adding new sources and sinks
</li>
<li>
PostgreSQL data sink for storing or presenting the data in
multiple formats
</li>
<li>
Kafdrop Kafka UI for visually inspecting messages, schemas, and
connectors
</li>
</ul>
<p>
The components used in the pipeline are packaged in Docker
containers, making them easy to build and deploy or swap for others
to better meet your needs.
</p>
<p>
To learn why we chose these components, read our
<a href="https://venice-framework.github.io/case-study.html"
>Case Study</a
>
</p>
<h3 id="architecture" class="sec-header">Architecture</h3>
<figure class="img-wrapper">
<img
src="images/diagrams/VeniceFull.png"
style="max-height: 400px;"
alt="The full Venice architecture - the Venice CLI manages the pipeline and can be used to attach additional components."
/>
<figcaption>
The Venice CLI manages the pipeline and can be used to attach
additional components.
</figcaption>
</figure>
<h3 id="when-does-it-fit">When does it fit?</h3>
<p>
Venice offers a middle ground between proprietary and DIY solutions
(more details
<a href="https://venice-framework.github.io/case-study.html#Venice"
>here</a
>). Venice is open-source, abstracts away some of the complexity,
comes with reasonable defaults, and is fully customizable and
extensible. It may be most suitable for a subset of users.
</p>
<p>
Venice may be a good fit if:
</p>
<ul>
<li>
You want to start with a basic stream processing pipeline for a
small application.
</li>
<li>Most of the default settings would work for your use case.</li>
</ul>
<h3 id="when-does-it-not-fit">When does it not fit?</h3>
<p>
Venice may NOT be a good fit if:
</p>
<ul>
<li>Your application has to handle a large volume of events.</li>
<li>
Your use case is complex and requires substantial customization.
</li>
</ul>
<h2 id="Quickstart">Quickstart</h2>
<h3 id="Installation Instructions">Installation Instructions</h3>
<h4 id="Install Dependencies">Dependencies</h4>
<p>
<a
href="https://docs.npmjs.com/downloading-and-installing-node-js-and-npm"
>Install Node and npm</a
>
</p>
<ul>
<li>
<a href="https://nodejs.org/">Node</a> (the CLI was created and
tested with version 13.8.0)
</li>
<li>
<a href="https://www.npmjs.com/get-npm">npm</a> (the CLI was
created and tested with version 6.13.6)
</li>
</ul>
<h4>Install Venice CLI</h4>
<p>
Use this command: <br />
<code
>git clone https://github.com/venice-framework/venice-cli.git &&
cd venice-cli && npm install && sudo npm link</code
><br /><br />
Or do it step-by-step:
</p>
<ol>
<li>
Clone the respository.<br />
<code
>git clone
https://github.com/venice-framework/venice-cli.git</code
>
</li>
<li>
Navigate into the newly installed
<code>venice-cli</code> directory.<br />
<code>cd venice-cli</code>
</li>
<li>
Install packages.<br />
<code>npm install</code> or <code>npm i</code>
</li>
<li>
Create a symbolic link.<br />
<code>sudo npm link</code>
</li>
</ol>
<h4>Choose a pipeline</h4>
<p>
Navigate to a repo containing a pipeline, or install a Venice
default pipeline.
</p>
<p>
You can use the Venice pipeline with a PostgreSQL sink if you do not
have a pipeline you want to test.
</p>
<p>
NOTE: The following command will clone a repo into the current
working directory. If you want the repo to be cloned into another
folder, navigate away from <code>venice-cli</code> now (e.g., `<code
>cd ..</code
>)
</p>
<p><code>venice install</code></p>
<p>Select "venice - Base pipeline with a Postgres sink".</p>
<p><code>cd venice-postgres-sink</code></p>
<h4>Add a producer</h4>
<p>You can use your own or a Venice producer example.</p>
<p>Open the <code>docker-compose.yml</code> file in a text editor.</p>
<p>
Uncomment the section for the producer so that
<code>producer</code> aligns vertically with the other services.
</p>
<figure class="img-wrapper">
<img
src="images/diagrams/Producer_DockerCompose.png"
style="max-height: 400px;"
alt="code snippet of the producer service in the default docker-compose.yml file"
/>
<figcaption>
code snippet of the producer service in the default
docker-compose.yml file
</figcaption>
</figure>
<p>
If you want to use your own producer, package it in a container and
have it use the environment variables
<code>BROKER</code>, <code>TOPIC_NAME</code>, and
<code>SCHEMA_REGISTRY_URL</code>. Then, swap out
<code>image: veniceframework/python-producer-test-key-string</code>
for the image you want to use.
</p>
<h4>Choose whether to insert or upsert the data into PostgreSQL</h4>
<p>
Open the <code>docker-compose.yml</code> file in a text editor if it
is not yet open.
</p>
<p>
<code>insert</code> inserts every row into the table.
<code>upsert</code> adds a new row if a row with the same key does
not exist yet. If a row with the same key exists, that row is
updated.
</p>
<p>
The PostgreSQL pipeline uses <code>upsert</code> by default. Within
the commands for the <code>connector-init</code> service, change
<code>upsert</code> to <code>insert</code> if you want to use
<code>insert</code> instead.
</p>
<figure class="img-wrapper">
<img
src="images/diagrams/insert-upsert.png"
style="max-height: 400px;"
alt="code snippet of the connector-init service in the default docker-compose.yml file, with the configuration line for insert or upsert highlighted"
/>
<figcaption>
code snippet of the connector-init service in the default
docker-compose.yml file, with the configuration line for insert or
upsert highlighted
</figcaption>
</figure>
<p>Save and close the file.</p>
<h4>Change the topic name and PostgreSQL environment variables.</h4>
<p>
Open the <code>.env</code> file in a text editor. If you are
following along with the Venice producer and PostgreSQL pipeline,
change the values for <code>TOPIC_NAME</code> to
<code>bus_locations</code> and <code>POSTGRES_DB</code> to
<code>buses</code>. Save and close the file.
</p>
<h4>Start the pipeline.</h4>
<p><code>venice up</code></p>
<h4>Show the status of all components of the pipeline.</h4>
<p><code>venice status</code> or <code>venice -st</code></p>
<h4>
To follow the logs of one or more components
</h4>
<p><code>venice logs</code></p>
<p>press space bar to select before pressing enter/return</p>
<figure class="img-wrapper">
<img
src="images/diagrams/gifs/venice_logs_broker.gif"
alt="venice logs demo"
/>
<figcaption><code>venice logs</code> demo</figcaption>
</figure>
<p>
The output is piped to <code>less</code>, so you can navigate up and
down through the logs using the arrow keys or <code>j</code> and
<code>k</code>. Use the spacebar to scroll down by “page”, and press
<code>q</code> to quit.
</p>
<h4>Show topics, schemas, and connectors</h4>
<p>
<code>venice topics</code> or <code>venice -t</code><br />
<code>venice schemas</code> or <code>venice -s</code><br />
<code>venice connectors</code> or <code>venice -c</code>
</p>
<figure class="img-wrapper">
<img
src="images/diagrams/gifs/venice_topics_schemas_connectors.gif"
alt="gif of venice commands to view topics, schemas, and connectors"
/>
<figcaption>
view topics, schemas, and connectors
</figcaption>
</figure>
<h4>Open the KSQL CLI to see the data being written to the topic.</h4>
<p>
This will download the KSQL CLI if you have not already used it.
There will be a notable delay as it loads for the first time.
</p>
<p><code>venice ksql</code></p>
<p>
<i>If you get an error message that</i>
<code
>Remote server at http://ksql-server:8088 does not appear to be a
valid KSQL server</code
><i>, exit the KSQL CLI and try again.</i>
</p>
<figure class="img-wrapper">
<img
src="images/diagrams/gifs/venice_ksql.gif"
alt="gif of venice KSQL commands"
/>
<figcaption>
<code>SHOW TOPICS</code> and <code>PRINT bus_locations</code> KSQL
commands.
</figcaption>
</figure>
<p>
Try these KSQL commands: Show all topics. You should see
<code>bus_locations</code> among the list of topics.
<code>SHOW TOPICS;</code>
</p>
<p>
Print all data from the beginning.
<code>PRINT bus_locations FROM BEGINNING;</code>
</p>
<p>
Follow any new input.
<code>PRINT bus_locations;</code>
CTRL+C to stop printing.
</p>
<p>
You can issue additional queries over the data such as aggregations
and other transformations. See more KSQL commands in the
<a
href="https://docs.confluent.io/current/ksql/docs/developer-guide/syntax-reference.html#ksql-statements"
>KSQL documentation</a
>
</p>
<p><code>CTRL+D</code> to exit the KSQL console.</p>
<h4
id="launch-the-postgresql-cli-to-see-the-data-populating-in-the-database-"
>
Launch the PostgreSQL CLI to see the data populating in the
database.
</h4>
<p><code>venice psql</code></p>
<p>
If you are following along with the bus example, enter “venice_user”
for the name of the PostgreSQL user, and “buses” for the name of the
PostgreSQL database.
</p>
<p>PostgreSQL commands:</p>
<ul>
<li>
Show all tables. You should see <code>bus_locations</code>.<br />
<code>\dt</code>
</li>
<li>
Show the first ten rows.<br />
<code>SELECT * FROM bus_locations LIMIT 10;</code>
</li>
<li>
Display a count of how many records there are in the table.<br />
<code>SELECT COUNT(*) FROM bus_locations;</code>
</li>
<li>
<code>CTRL+D</code> to exit the PSQL console.
<i
>You can also use <code>exit</code>, <code>quit</code>,
<code>\q</code>, or <code>CTRL+C</code>.</i
>
</li>
</ul>
<h4 id="gui">GUI</h4>
<p>
For a graphic interface for the Kafka cluster, navigate to
<code>localhost:9000</code> in your web browser. Here you can view
Kafka topics and consumer groups. You can examine individual
messages to ensure they are being serialized and deserialized
correctly. You can also verify message distribution among partitions
to ensure balance.
</p>
<figure class="img-wrapper">
<img
src="images/diagrams/gifs/kafdrop_view_messages.gif"
alt="gif of viewing messages through the Kafdrop graphical user interface"
/>
<figcaption>
View partition messages in Kafdrop.
</figcaption>
</figure>
<h4 id="shut-down-the-venice-pipeline">
Shut down the Venice pipeline
</h4>
<p><code>venice down</code></p>
</section>
</main>
</div>
<section class="lower-cta">
<h2>Want to learn more?</h2>
<div class="buttons">
<a
href="case-study.html"
class="button button-primary button-wide banner-cta"
>Case Study</a
>
<a
href="https://github.com/venice-framework"
target="_blank"
class="button button-link banner-cta"
>GitHub</a
>
</div>
</section>
<footer>
<div class="footer-backdrop">
<section id="our-team">
<h2>Our Team</h2>
<p>
We are looking for opportunities.<br />If you liked what you saw and
want to talk, please reach out!
</p>
<ul>
<li class="individual">
<img src="images/team/nancy.png" alt="Nancy Trinh" />
<h3>Nancy Trinh</h3>
<p>San Francisco, CA</p>
<ul class="social-icons">
<li>
<a
href="mailto:nancytrinh20@gmail.com?subject=Venice%20Project"
>
<img src="images/icons/email_icon.png" alt="email" />
</a>
</li>
<li>
<a href="http://github.com/nantrinh" target="_blank">
<img src="images/icons/website_icon.png" alt="website" />
</a>
</li>
<li>
<a
href="https://www.linkedin.com/in/nancytrinh/"
target="_blank"
>
<img src="images/icons/linked_in_icon.png" alt="linkedin" />
</a>
</li>
</ul>
</li>
<li class="individual">
<img src="images/team/David.jpg" alt="David Perich" />
<h3>David Perich</h3>
<p>Melbourne, AU</p>
<ul class="social-icons">
<li>
<a
href="mailto:davidnperich@gmail.com?subject=Venice%20Project"
>
<img src="images/icons/email_icon.png" alt="email" />
</a>
</li>
<li>
<a href="http://www.davidperich.com" target="_blank">
<img src="images/icons/website_icon.png" alt="website" />
</a>
</li>
<li>
<a
href="https://www.linkedin.com/in/davidperich/"
target="_blank"
>
<img src="images/icons/linked_in_icon.png" alt="linkedin" />
</a>
</li>
</ul>
</li>
<li class="individual">
<img src="images/team/Melissa.png" alt="Melissa Manousos" />
<h3>Melissa Manousos</h3>
<p>Los Angeles, CA</p>
<ul class="social-icons">
<li>
<a
href="mailto:me@melissamanousos.com?subject=Venice%20Project"
target="_blank"
>
<img src="images/icons/email_icon.png" alt="email" />
</a>
</li>
<li>
<a href="https://melissamanousos.com/" target="_blank">
<img src="images/icons/website_icon.png" alt="website" />
</a>
</li>
<li>
<a
href="https://www.linkedin.com/in/melissa-manousos"
target="_blank"
>
<img src="images/icons/linked_in_icon.png" alt="linkedin" />
</a>
</li>
</ul>
</li>
</ul>
</section>
</div>
<div class="design-credit">
Logo and color scheme:
<a href="http://linzimurray.creative" target="_blank"
>linzimurray.creative</a
>
• Layout: <a href="http://jkulton.com" target="_blank">Jon Kulton</a>
</div>
</footer>
</body>
</html>