Skip to content

Commit

Permalink
Update documentation and diagrams to show new pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
devkelley committed Sep 14, 2023
1 parent b444789 commit ffe2bd1
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
13 changes: 7 additions & 6 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ through this interface, they provide a management endpoint (defined in
[publisher.proto](../proto/publisher/v1/publisher.proto)) so that the Pub Sub Service can provide
relevant information about a topic. In addition, the Pub Sub Service returns the dynamically
generated topic and necessary broker information for a publisher to use to serve their data. A
subscriber will interact with the publisher interface to get the necessary subscription information
(topic name, broker information, etc.) for that data.
subscriber can interact with the publisher to get the necessary subscription information
(topic name, broker information, etc.) as seen in the diagrams below, or get the information in a
different manner. This is not prescribed in the proto definitions but an example can be found in
the samples under [sample_publisher.proto](../samples/proto/sample_grpc/v1/sample_publisher.proto).
One reason you may want to follow this pattern is that it allows for the publisher to create topics
on demand, rather than creating all the topics on start up.

Below is a simple component diagram outlining how services interact with the Pub Sub Service.

Expand Down Expand Up @@ -219,7 +223,4 @@ Below is a diagram showing what interfaces are used to enable Chariott connectio

![pubsub chariott component](../docs/diagrams/pubsub_chariott_component.svg)
> **NOTE**: It is expected that publishers register with Chariott and utilize Chariott to find the
Pub Sub Service via service discovery. This currently requires a publisher to
implement the provider.proto gRPC interface found in the Chariott repo. This may change
in the future. Subscribers are expected to get a publisher's endpoint from the
Chariott discovery service as well.
Pub Sub Service via service discovery. Subscribers are expected to get a publisher's endpoint from the Chariott discovery service.
12 changes: 5 additions & 7 deletions docs/diagrams/pubsub_chariott_component.puml
Original file line number Diff line number Diff line change
@@ -1,26 +1,24 @@
@startuml pubsub chariott component diagram
component "Chariott" as chariott

chariott -left-> chariott.provider.proto
chariott -right- chariott.runtime.proto
chariott -right- service_discovery.proto

component "Pub Sub Service" as ps_service

ps_service -up- chariott.provider.proto
ps_service -right- pubsub.proto
ps_service -down-> publisher.proto

component "Publisher" as pub

pub -up- chariott.provider.proto
pub -up-> chariott.runtime.proto
pub -up-> service_discovery.proto
pub -left-> pubsub.proto
pub -down- publisher.proto
pub -down- sample_publisher.proto

component "Subscriber" as sub

sub -up-> chariott.runtime.proto
sub -down- publisher.proto
sub -up-> service_discovery.proto
sub -down-> sample_publisher.proto

[ps_service] <--down--> [Broker]
[pub] -down-> [Broker]
Expand Down
3 changes: 2 additions & 1 deletion docs/diagrams/pubsub_component.puml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
component "Publisher" as pub

pub -up- publisher.proto
pub -up- sample_publisher.proto
pub -> pubsub.proto

component "Pub Sub Service" as ps_service
Expand All @@ -11,7 +12,7 @@ ps_service -up-> publisher.proto

component "Subscriber" as sub

sub -up-> publisher.proto
sub -up-> sample_publisher.proto

[pub] -down-> [Broker]
[ps_service] <-down-> [Broker]
Expand Down
3 changes: 2 additions & 1 deletion docs/diagrams/pubsub_component_broker_interface.puml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ component "Publisher gRPC" as pub {
}

pub -up- publisher.proto
pub -up- sample_publisher.proto
pub --> pubsub.proto

component "PubSub Service gRPC" as ps_service {
Expand All @@ -20,7 +21,7 @@ component "Subscriber gRPC" as sub {
sub.broker - [SubConnector]
}

sub --> publisher.proto
sub --> sample_publisher.proto

[PubConnector] -down-> [Broker]
[BrokerMonitor] <-down-> [Broker]
Expand Down

0 comments on commit ffe2bd1

Please sign in to comment.