tisonkun commented on code in PR #614:
URL: https://github.com/apache/pulsar-site/pull/614#discussion_r1241316129
##########
src/components/pages/HomePage/HowPulsarWorks/HowPulsarWorks.tsx:
##########
@@ -0,0 +1,114 @@
+import React from 'react';
+import s from './HowPulsarWorks.module.css'
+import ScreenTitle from '../ui/ScreenTitle/ScreenTitle';
+
+// SVGO breaks the illustration. To fix it, we import it as is.
+import illustrationDesktop from '!!raw-loader!./img/illustration-desktop.svg';
+import illustrationMobile from '!!raw-loader!./img/illustration-mobile.svg';
+
+import BookkeeperIcon from './img/bookkeeper.svg';
+import BrokersIcon from './img/brokers.svg';
+import ZookeeperIcon from './img/zookeeper.svg';
+import ProducerAndConsumerIcon from './img/producer-and-consumer.svg';
+import Slider from '@site/src/components/ui/Slider/Slider';
+
+const cards: CardProps[] = [
+ {
+ title: 'Producer & Consumer',
+ image: <ProducerAndConsumerIcon />,
+ children: (
+ <p>
+ A Pulsar client contains a consumer and a producer.
+ A producer writes messages on a topic.
+ A consumer reads messages from a topic and acknowledges specific
messages or all up to a specific message.
+ </p>
+ )
+ },
+ {
+ title: 'Apache Zookeeper',
+ image: <ZookeeperIcon />,
+ children: (
+ <p>
+ Pulsar and BookKeeper use Apache ZooKeeper to save metadata
coordinated between nodes,
+ such as a list of ledgers per topic, segments per ledger, and mapping
of topic bundles to a broker.
+ It’s a cluster of highly available and replicated servers (usually 3).
+ </p>
+ )
+ },
+ {
+ title: 'Pulsar Brokers',
+ image: <BrokersIcon />,
+ children: (
+ <p>
+ Topics (i.e., partitions) are divided among Pulsar brokers.
Review Comment:
I remember @joohyukkim sent a
[mail](https://lists.apache.org/thread/36mmvbjbm4g0b8khwmom7pjv5hr6ytxg) about
distinguishing topics and partitions.
Perhaps it's not quite accurate here and we just use `Topics`?
cc @asafm
##########
src/components/pages/HomePage/HowPulsarWorks/HowPulsarWorks.tsx:
##########
@@ -0,0 +1,114 @@
+import React from 'react';
+import s from './HowPulsarWorks.module.css'
+import ScreenTitle from '../ui/ScreenTitle/ScreenTitle';
+
+// SVGO breaks the illustration. To fix it, we import it as is.
+import illustrationDesktop from '!!raw-loader!./img/illustration-desktop.svg';
+import illustrationMobile from '!!raw-loader!./img/illustration-mobile.svg';
+
+import BookkeeperIcon from './img/bookkeeper.svg';
+import BrokersIcon from './img/brokers.svg';
+import ZookeeperIcon from './img/zookeeper.svg';
+import ProducerAndConsumerIcon from './img/producer-and-consumer.svg';
+import Slider from '@site/src/components/ui/Slider/Slider';
+
+const cards: CardProps[] = [
+ {
+ title: 'Producer & Consumer',
+ image: <ProducerAndConsumerIcon />,
+ children: (
+ <p>
+ A Pulsar client contains a consumer and a producer.
+ A producer writes messages on a topic.
+ A consumer reads messages from a topic and acknowledges specific
messages or all up to a specific message.
+ </p>
+ )
+ },
+ {
+ title: 'Apache Zookeeper',
+ image: <ZookeeperIcon />,
+ children: (
+ <p>
+ Pulsar and BookKeeper use Apache ZooKeeper to save metadata
coordinated between nodes,
+ such as a list of ledgers per topic, segments per ledger, and mapping
of topic bundles to a broker.
+ It’s a cluster of highly available and replicated servers (usually 3).
Review Comment:
```suggestion
It's a cluster of highly available and replicated servers (usually
3).
```
I remember we keep using `'` consistently but it can be a tribal knowledge
without publicly acknowledge. cc @Anonymitaet what do you think?
Anyway, it won't block this PR from merging.
##########
src/components/pages/HomePage/HowPulsarWorks/HowPulsarWorks.tsx:
##########
@@ -0,0 +1,114 @@
+import React from 'react';
+import s from './HowPulsarWorks.module.css'
+import ScreenTitle from '../ui/ScreenTitle/ScreenTitle';
+
+// SVGO breaks the illustration. To fix it, we import it as is.
+import illustrationDesktop from '!!raw-loader!./img/illustration-desktop.svg';
+import illustrationMobile from '!!raw-loader!./img/illustration-mobile.svg';
+
+import BookkeeperIcon from './img/bookkeeper.svg';
+import BrokersIcon from './img/brokers.svg';
+import ZookeeperIcon from './img/zookeeper.svg';
+import ProducerAndConsumerIcon from './img/producer-and-consumer.svg';
+import Slider from '@site/src/components/ui/Slider/Slider';
+
+const cards: CardProps[] = [
+ {
+ title: 'Producer & Consumer',
+ image: <ProducerAndConsumerIcon />,
+ children: (
+ <p>
+ A Pulsar client contains a consumer and a producer.
+ A producer writes messages on a topic.
+ A consumer reads messages from a topic and acknowledges specific
messages or all up to a specific message.
+ </p>
+ )
+ },
+ {
+ title: 'Apache Zookeeper',
+ image: <ZookeeperIcon />,
+ children: (
+ <p>
+ Pulsar and BookKeeper use Apache ZooKeeper to save metadata
coordinated between nodes,
+ such as a list of ledgers per topic, segments per ledger, and mapping
of topic bundles to a broker.
+ It’s a cluster of highly available and replicated servers (usually 3).
+ </p>
+ )
+ },
+ {
+ title: 'Pulsar Brokers',
+ image: <BrokersIcon />,
+ children: (
+ <p>
+ Topics (i.e., partitions) are divided among Pulsar brokers.
+ A broker receives messages for a topic and appends them to the topic’s
active virtual file (a.k.a ledger),
+ hosted on the Bookkeeper cluster. Brokers read messages from the cache
(mostly) or BookKeeper and dispatch them to the consumers.
+ Brokers also receive message acknowledgments and persist them to the
BookKeeper as well.
+ They are stateless (don’t use/need a disk).
+ </p>
+ )
+ },
+ {
+ title: 'Apache Bookkeeper',
+ image: <BookkeeperIcon />,
+ children: (
+ <p>
+ Apache BookKeeper is a cluster of nodes called bookies.
+ Each virtual file (a.k.a ledger) is divided into consecutive segments,
and each segment is kept on 3 bookies by default
+ (replicated by the client - i.e., the broker).
Review Comment:
```suggestion
```
This line seems a bit vague. It won't carry too much information and lay
between details to abstractions. I suggest we omit it.
##########
src/components/pages/HomePage/HowPulsarWorks/HowPulsarWorks.tsx:
##########
@@ -0,0 +1,114 @@
+import React from 'react';
+import s from './HowPulsarWorks.module.css'
+import ScreenTitle from '../ui/ScreenTitle/ScreenTitle';
+
+// SVGO breaks the illustration. To fix it, we import it as is.
+import illustrationDesktop from '!!raw-loader!./img/illustration-desktop.svg';
+import illustrationMobile from '!!raw-loader!./img/illustration-mobile.svg';
+
+import BookkeeperIcon from './img/bookkeeper.svg';
+import BrokersIcon from './img/brokers.svg';
+import ZookeeperIcon from './img/zookeeper.svg';
+import ProducerAndConsumerIcon from './img/producer-and-consumer.svg';
+import Slider from '@site/src/components/ui/Slider/Slider';
+
+const cards: CardProps[] = [
+ {
+ title: 'Producer & Consumer',
+ image: <ProducerAndConsumerIcon />,
+ children: (
+ <p>
+ A Pulsar client contains a consumer and a producer.
+ A producer writes messages on a topic.
+ A consumer reads messages from a topic and acknowledges specific
messages or all up to a specific message.
+ </p>
+ )
+ },
+ {
+ title: 'Apache Zookeeper',
+ image: <ZookeeperIcon />,
+ children: (
+ <p>
+ Pulsar and BookKeeper use Apache ZooKeeper to save metadata
coordinated between nodes,
+ such as a list of ledgers per topic, segments per ledger, and mapping
of topic bundles to a broker.
+ It’s a cluster of highly available and replicated servers (usually 3).
+ </p>
+ )
+ },
+ {
+ title: 'Pulsar Brokers',
+ image: <BrokersIcon />,
+ children: (
+ <p>
+ Topics (i.e., partitions) are divided among Pulsar brokers.
+ A broker receives messages for a topic and appends them to the topic’s
active virtual file (a.k.a ledger),
+ hosted on the Bookkeeper cluster. Brokers read messages from the cache
(mostly) or BookKeeper and dispatch them to the consumers.
+ Brokers also receive message acknowledgments and persist them to the
BookKeeper as well.
Review Comment:
```suggestion
Brokers also receive message acknowledgments and persist them to the
BookKeeper cluster as well.
```
##########
src/components/pages/HomePage/HowPulsarWorks/HowPulsarWorks.tsx:
##########
@@ -0,0 +1,114 @@
+import React from 'react';
+import s from './HowPulsarWorks.module.css'
+import ScreenTitle from '../ui/ScreenTitle/ScreenTitle';
+
+// SVGO breaks the illustration. To fix it, we import it as is.
+import illustrationDesktop from '!!raw-loader!./img/illustration-desktop.svg';
+import illustrationMobile from '!!raw-loader!./img/illustration-mobile.svg';
+
+import BookkeeperIcon from './img/bookkeeper.svg';
+import BrokersIcon from './img/brokers.svg';
+import ZookeeperIcon from './img/zookeeper.svg';
+import ProducerAndConsumerIcon from './img/producer-and-consumer.svg';
+import Slider from '@site/src/components/ui/Slider/Slider';
+
+const cards: CardProps[] = [
+ {
+ title: 'Producer & Consumer',
+ image: <ProducerAndConsumerIcon />,
+ children: (
+ <p>
+ A Pulsar client contains a consumer and a producer.
+ A producer writes messages on a topic.
+ A consumer reads messages from a topic and acknowledges specific
messages or all up to a specific message.
+ </p>
+ )
+ },
+ {
+ title: 'Apache Zookeeper',
+ image: <ZookeeperIcon />,
+ children: (
+ <p>
+ Pulsar and BookKeeper use Apache ZooKeeper to save metadata
coordinated between nodes,
+ such as a list of ledgers per topic, segments per ledger, and mapping
of topic bundles to a broker.
+ It’s a cluster of highly available and replicated servers (usually 3).
+ </p>
+ )
+ },
+ {
+ title: 'Pulsar Brokers',
+ image: <BrokersIcon />,
+ children: (
+ <p>
+ Topics (i.e., partitions) are divided among Pulsar brokers.
+ A broker receives messages for a topic and appends them to the topic’s
active virtual file (a.k.a ledger),
+ hosted on the Bookkeeper cluster. Brokers read messages from the cache
(mostly) or BookKeeper and dispatch them to the consumers.
+ Brokers also receive message acknowledgments and persist them to the
BookKeeper as well.
+ They are stateless (don’t use/need a disk).
Review Comment:
```suggestion
Brokers are stateless (don't use/need a disk).
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]