aboutsummaryrefslogtreecommitdiff
path: root/content/posts/2020-03-22-simple-sse-based-pubsub-server.md
diff options
context:
space:
mode:
authorMitja Felicijan <mitja.felicijan@gmail.com>2022-08-28 05:39:44 +0200
committerMitja Felicijan <mitja.felicijan@gmail.com>2022-08-28 05:39:44 +0200
commit70baaeb4e78d12c329a03e929fd30d41730ed2b1 (patch)
tree74e0b2998455894762b6910ef4008d43f5dc9366 /content/posts/2020-03-22-simple-sse-based-pubsub-server.md
parentb1d9aefd2a9fa0074f8d18fa2410cdd53d4c8de6 (diff)
downloadmitjafelicijan.com-70baaeb4e78d12c329a03e929fd30d41730ed2b1.tar.gz
Moved statis assets and converted all CSS to Tailwind
Diffstat (limited to 'content/posts/2020-03-22-simple-sse-based-pubsub-server.md')
-rw-r--r--content/posts/2020-03-22-simple-sse-based-pubsub-server.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/content/posts/2020-03-22-simple-sse-based-pubsub-server.md b/content/posts/2020-03-22-simple-sse-based-pubsub-server.md
index 0a039e6..939a62d 100644
--- a/content/posts/2020-03-22-simple-sse-based-pubsub-server.md
+++ b/content/posts/2020-03-22-simple-sse-based-pubsub-server.md
@@ -21,7 +21,7 @@ Publisher Subscriber model is nothing new and there are many amazing solutions o
21 21
22The easiest way to explain this is with diagram bellow. Basic function is simple. We have subscribers that receive messages, and we have publishers that create and post messages. Similar model is also well know pattern that works on a premise of consumers and producers, and they take similar roles. 22The easiest way to explain this is with diagram bellow. Basic function is simple. We have subscribers that receive messages, and we have publishers that create and post messages. Similar model is also well know pattern that works on a premise of consumers and producers, and they take similar roles.
23 23
24![How PubSub works](/simple-pubsub-server/pubsub-overview.png) 24![How PubSub works](/assets/simple-pubsub-server/pubsub-overview.png)
25 25
26**These are some naive characteristics we want to achieve:** 26**These are some naive characteristics we want to achieve:**
27 27
@@ -47,7 +47,7 @@ Read more about it on [official specification page](https://html.spec.whatwg.org
47 47
48### Current browser support 48### Current browser support
49 49
50![Browser support](../simple-pubsub-server/caniuse.png) 50![Browser support](/assets/simple-pubsub-server/caniuse.png)
51 51
52Check [https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource) for latest information about browser support. 52Check [https://caniuse.com/#feat=eventsource](https://caniuse.com/#feat=eventsource) for latest information about browser support.
53 53
@@ -105,7 +105,7 @@ Google Chrome provides build-in debugging and exploration tool for [Server-Sent
105 105
106> You can debug only client side events that get received and not the server ones. For debugging server events add `console.log` to `server.js` code and print out events. 106> You can debug only client side events that get received and not the server ones. For debugging server events add `console.log` to `server.js` code and print out events.
107 107
108![Google Chrome Developer Tools EventStream](../simple-pubsub-server/chrome-debugging.png) 108![Google Chrome Developer Tools EventStream](/assets/simple-pubsub-server/chrome-debugging.png)
109 109
110## Server implementation 110## Server implementation
111 111
@@ -234,7 +234,7 @@ One example would be, that we have index page and we want to receive messages ab
234 234
235### Publisher and subscriber in action 235### Publisher and subscriber in action
236 236
237<video src="/simple-pubsub-server/clients.m4v" controls></video> 237<video src="/assets/simple-pubsub-server/clients.m4v" controls></video>
238 238
239You can download [the code](../simple-pubsub-server/sse-pubsub-server.zip) and follow along. 239You can download [the code](../simple-pubsub-server/sse-pubsub-server.zip) and follow along.
240 240