diff --git a/pubsub/cli.go b/pubsub/cli.go
index cb1e11df..d8196365 100644
--- a/pubsub/cli.go
+++ b/pubsub/cli.go
@@ -356,7 +356,7 @@ func WishMiddleware(handler *CliHandler) wish.Middleware {
} else if cmd == "sub" {
subCmd := flagSet("sub", sesh)
public := subCmd.Bool("p", false, "Subscribe to a public topic")
- keepAlive := subCmd.Bool("k", false, "Keep the subscription alive even after the publisher as died")
+ keepAlive := subCmd.Bool("k", false, "Keep the subscription alive even after the publisher has died")
if !flagCheck(subCmd, topic, cmdArgs) {
return
}
diff --git a/pubsub/html/marketing.page.tmpl b/pubsub/html/marketing.page.tmpl
index 2a59c3c6..a9101926 100644
--- a/pubsub/html/marketing.page.tmpl
+++ b/pubsub/html/marketing.page.tmpl
@@ -29,7 +29,8 @@
user-defined topics. By default, topics are private to the authenticated
ssh user. The default pubsub model is multicast with bidirectional
blocking, meaning a publisher (pub
) will send its message to all
- subscribers (sub
) on a topic. Further, both pub
and
+ subscribers (sub
) for a topic (channels). There can be many publishers
+ and many subscribers on a topic. Further, both pub
and
sub
will wait for at least one event to be sent or received on the topic.
sub
)pub
)pipe
)Send command output through our pipe
command.
+ Send command output through our pipe
command. The
+ pipe
command is just like pub
except it
+ is non-blocking and also acts like a sub
. So a client
+ that can read and write to the topic.
+
ssh {{.Site.Domain}} sub htop+
htop | ssh {{.Site.Domain}} pipe htop
Use our pipe
command to have a chat with someone.
ssh {{.Site.Domain}} pipe mychan -p-
Now anyone with a pico
account can subscribe to this channel using the same command.
+ Now anyone with a pico
account can subscribe to this
+ topic using the same command and start typing!
+
If you squint hard enough you can give users interactive access to your shell.
+mkfifo /tmp/f; cat /tmp/f | /bin/sh -i 2>&1 | ssh {{.Site.Domain}} pipe myshell > /tmp/f+
ssh {{.Site.Domain}} pipe myshell
+ I'm always looking for easy ways to simplify deploying apps + automatically. Having an authenticated, zero-install event system + seems handy for this purpose. +
ssh {{.Site.Domain}} sub myimg; docker pull myimg && docker up -d dev
docker buildx build --push -t myimg .; ssh {{.Site.Domain}} pub myimg -e
+ Have many subscribers, they will all receive the message. +
+ssh {{.Site.Domain}} sub foobar+
ssh {{.Site.Domain}} sub foobar+
while true; do echo "foobar1"; sleep 1; done | ssh {{.Site.Domain}} pub foobar+