Skip to content

Commit

Permalink
Deploy website - based on 61bcd68
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-emelin committed Aug 19, 2024
1 parent 14ce91c commit 215765d
Show file tree
Hide file tree
Showing 269 changed files with 267 additions and 264 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
1 change: 1 addition & 0 deletions assets/js/1b3188ba.0fead004.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/1b3188ba.2f82af3c.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/21fdfc04.37bb5498.js

This file was deleted.

1 change: 1 addition & 0 deletions assets/js/21fdfc04.ce317eb3.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions assets/js/25003e4f.2d76e816.js

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion assets/js/25003e4f.ab03ef1c.js

This file was deleted.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion blog.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2020/02/10/million-connections-with-centrifugo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2020/10/16/experimenting-with-quic-transport.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2020/11/12/scaling-websocket.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2021/01/15/centrifuge-intro.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2021/08/31/hello-centrifugo-v3.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2021/10/18/integrating-with-nodejs.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2021/12/14/laravel-multi-room-chat-tutorial.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2022/07/19/centrifugo-v4-released.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2022/07/29/101-way-to-subscribe.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2022/12/20/improving-redis-engine-performance.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2023/03/31/keycloak-sso-centrifugo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2023/06/29/centrifugo-v5-released.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2023/08/29/using-centrifugo-in-rabbitx.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
2 changes: 1 addition & 1 deletion blog/2024/06/03/real-time-document-state-sync.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
3 changes: 2 additions & 1 deletion blog/2024/08/19/optimizing-websocket-compression.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down Expand Up @@ -63,6 +63,7 @@ <h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="preparedmessage-type">P
<p>Then there is a method <a href="https://pkg.go.dev/github.com/gorilla/websocket#Conn.WritePreparedMessage" target="_blank" rel="noopener noreferrer">func (*Conn) WritePreparedMessage</a>, which should be used to write data to all connections interested in a message — the proper WebSocket frame will be created once and then automatically re-used. By the way, this is an example of the <a href="https://github.com/gorilla/websocket/blob/ce903f6d1d961af3a8602f2842c8b1c3fca58c4d/prepared.go#L72" target="_blank" rel="noopener noreferrer">elegant use</a> of <code>sync.Once</code>.</p>
<div class="language-go codeBlockContainer_Ckt0 theme-code-block" style="--prism-color:#bfc7d5;--prism-background-color:#292d3e"><div class="codeBlockTitle_Ktv7">Using PreparedMessage</div><div class="codeBlockContent_biex"><pre tabindex="0" class="prism-code language-go codeBlock_bY9V thin-scrollbar" style="color:#bfc7d5;background-color:#292d3e"><code class="codeBlockLines_e6Vv"><span class="token-line" style="color:#bfc7d5"><span class="token plain">preparedMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> </span><span class="token boolean" style="color:rgb(255, 88, 116)">_</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">=</span><span class="token plain"> websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token function" style="color:rgb(130, 170, 255)">NewPreparedMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">websocket</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token plain">TextMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">,</span><span class="token plain"> data</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><span class="token plain"></span><br></span><span class="token-line" style="color:#bfc7d5"><span class="token plain"></span><span class="token boolean" style="color:rgb(255, 88, 116)">_</span><span class="token plain"> </span><span class="token operator" style="color:rgb(137, 221, 255)">:=</span><span class="token plain"> conn</span><span class="token punctuation" style="color:rgb(199, 146, 234)">.</span><span class="token function" style="color:rgb(130, 170, 255)">WritePreparedMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">(</span><span class="token plain">preparedMessage</span><span class="token punctuation" style="color:rgb(199, 146, 234)">)</span><br></span></code></pre><div class="buttonGroup__atx"><button type="button" aria-label="Copy code to clipboard" title="Copy" class="clean-btn"><span class="copyButtonIcons_eSgA" aria-hidden="true"><svg viewBox="0 0 24 24" class="copyButtonIcon_y97N"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z"></path></svg><svg viewBox="0 0 24 24" class="copyButtonSuccessIcon_LjdS"><path fill="currentColor" d="M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"></path></svg></span></button></div></div></div>
<p>This means that if we broadcast the same prepared message to many connections, we remove the excessive load on <code>sync.Pool</code>, just taking a one <code>flate.Writer</code> from the pool instead of many. This way, we avoid large memory spikes due to big size of <code>flate.Writer</code> objects and <code>sync.Pool</code> growth.</p>
<p>For broadcasts, <code>PreparedMessage</code> approach significantly reduces CPU usage by minimizing the need to construct and compress WebSocket frames, especially as the number of concurrent subscribers increases. Additionally, it reduces the allocation of large <code>flate.Writer</code> objects, further optimizing CPU utilization.</p>
<h2 class="anchor anchorWithHideOnScrollNavbar_WYt5" id="preparedmessage-cache">PreparedMessage cache<a href="#preparedmessage-cache" class="hash-link" aria-label="Direct link to PreparedMessage cache" title="Direct link to PreparedMessage cache"></a></h2>
<p>For Centrifuge/Centrifugo though, we couldn&#x27;t directly use <code>PreparedMessage</code> in the part of the code responsible for preparing messages for channel broadcasts. This is because doing so would introduce a dependency on a WebSocket-specific type in a layer of code that should remain agnostic to the underlying real-time transport.</p>
<p>To avoid this, we chose not to rely on the <code>PreparedMessage</code> type in the broadcasting preparation layer. Instead, we implemented a cache of <code>PreparedMessage</code> types within the WebSocket transport implementation layer.</p>
Expand Down
2 changes: 1 addition & 1 deletion blog/archive.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<link rel="search" type="application/opensearchdescription+xml" title="Centrifugo" href="/opensearch.xml">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.css"><link rel="stylesheet" href="/assets/css/styles.446fbcdd.css">
<script src="/assets/js/runtime~main.40ea822a.js" defer="defer"></script>
<script src="/assets/js/runtime~main.4c947df4.js" defer="defer"></script>
<script src="/assets/js/main.dd41ea7a.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
Loading

0 comments on commit 215765d

Please sign in to comment.