<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Rose Media House</title>
    <description>The latest articles on Forem by Rose Media House (@rosemediahouse).</description>
    <link>https://forem.com/rosemediahouse</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F809819%2F7eaa3fdc-07fb-4e80-96f2-9adefdbb0928.jpg</url>
      <title>Forem: Rose Media House</title>
      <link>https://forem.com/rosemediahouse</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/rosemediahouse"/>
    <language>en</language>
    <item>
      <title>Writing C++ VLC alternative on Windows, Rose Player</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Wed, 04 Jun 2025 18:50:07 +0000</pubDate>
      <link>https://forem.com/rosemediahouse/the-long-journey-of-writing-a-c-vlc-alternative-rose-player-50ie</link>
      <guid>https://forem.com/rosemediahouse/the-long-journey-of-writing-a-c-vlc-alternative-rose-player-50ie</guid>
      <description>&lt;p&gt;I had good days with Celluloid back in 2019, on Linux Mint. I'd argue, it's still the king of video players available today. I will not forget the fluid frame updates when I held down arrow keys. Those who consume lots of movies on Linux, might resonate with me.&lt;/p&gt;

&lt;p&gt;Fast forward a year, I had to switch away from Linux, and move back to Windows on my laptop, and I had only one. But the memory of Celluloid struck with me, and I was no longer satisfied with VLC. I needed a better one, and I found one very close. It was called KM Player.&lt;/p&gt;

&lt;p&gt;Time passed. Life was happy with KM Player. Then I got a job. And I forgot about leisure time, so I had not touched it for straight six  months. One day, as our team just delivered the project we were working on, we were granted 2 weeks of paid leave. That night, I torrented a bunch to binge watch a TV series. And I opened KM Player after good six months.&lt;/p&gt;

&lt;p&gt;Oh no. KM Player is infested with ads and it feels nothing like it's older self. performance sucked, UX sucked. I un-installed it.&lt;br&gt;
I literally felt betrayed, and I also find out, no one cares about making a Windows app with great UX like mac or even linux, because the love is not there. Microsoft itself does ridiculuous things with their documentations that make you ultimately confused and run back to shitty world of Electron apps.&lt;/p&gt;

&lt;p&gt;Back in 2022, I could make a React website, but certainly not a C++/C# desktop app. So I just let the good dreams and expectations go away, and be content with subpar experience with VLC.&lt;/p&gt;

&lt;p&gt;But there is a saying, you do not forget your first love, and in my case, it was Celluloid. I dreamt of it, I was totally lost in it.&lt;/p&gt;

&lt;p&gt;I was a pretty mediocre developer. And I think the best outcome of AI was for me, is that it bridged the gap between mediocre and rare breed of 10x devs. Everybody with a taste and burning passion can be a developer. I just needed enough heart to take on fulfilling my dream: port Celluloid experience to Windows.&lt;/p&gt;

&lt;p&gt;I had a few many options at hand.&lt;/p&gt;

&lt;p&gt;-&amp;gt; Go with familiar web technologies. Tauri and project mpv command line output in Webview (works on all platforms, theoritically)&lt;br&gt;
 Tried, but I was not successful at this.&lt;/p&gt;

&lt;p&gt;-&amp;gt; React Native (The thing Windows 11 start menu is built with): A solid candidate, but few days ago I just completed a React Native mobile app, the experience was hellsih and performance was so so. So I passed on it. I didn't bother with flutter because dart is one of my least favorite lang to work with.&lt;/p&gt;

&lt;p&gt;-&amp;gt; GTK/QT route: I hated QT interfaces. One of the reasons I never touched KDE linux. I love GTK, but after trying it out, the interface on Windows felt out of place. And in my mind, I was not going to settle for anything less than a great UX, even at the cost of non-existing DX.&lt;/p&gt;

&lt;p&gt;-&amp;gt; The Windows native route: (WinUI/XML/C++): This should have been developers preferred way of building native apps for windows. Unfortunately for us, Microsoft always seems confused. In 2025, I needed to write the UI in XML(!), hook event listeners to UI and in a separate C++ file, manipulate the UI. No state management at all. This seemed hectic for me, and I knew it would become extremely hard to track variables later on when code gets bigger. But I chose the pain, to build something great.&lt;/p&gt;

&lt;p&gt;I won't go into details how the development journey was, it was a wild ride. I got full control over my dream of making the perfect video player, and I gave Rose Player everything VLC and now KM Player does not have.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Timeline hover previews: for a 2 hours FHD movie, generates all the previews in ~35 seconds (roughly 1500 preview images), so when movie opens, within half a minute you are able to browse the whole timeline. This is such a basic feature that is not available on both VLC and KMP, which feels insane.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Smooth Frame Updates with rapid seek: This was my biggest gripe with VLC, it always felt choppy. KM Player was better at this, and Celluloid was the best of all, like ultra fluid. My goal was to reach Celluloid level, and I think I am close to achieving it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Smooth dragging by slider: An issue I see with all video players, some of them (like Celluloid) freezes the screen until drag ends. It's bad UX. People want to know what they are skipping. VLC shows you what parts you are skipping but shows only a few frames. I tried my best so Rose Player actually tries to show most frames that you skipped with minimal dropped frames. &lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Rose Player is now mostly stable, its hosted on Microsoft Store Now. I do periodical updates, and research on how to make it a better experience for myself and others.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Download Rose Player:&lt;/em&gt;&lt;br&gt;
&lt;a class="ltag_cta ltag_cta--branded"&gt;Download from Microsoft Store&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;Want Promo Code? &lt;a href="https://x.com/RoseVideoPlayer" rel="noopener noreferrer"&gt;Follow and DM me on X&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let me know your thoughts on comments below :)&lt;/p&gt;

</description>
      <category>desktop</category>
      <category>cpp</category>
      <category>microsoft</category>
      <category>winui</category>
    </item>
    <item>
      <title>Find best bus seat to avoid the sun while traveling</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Sun, 22 Oct 2023 15:28:57 +0000</pubDate>
      <link>https://forem.com/rosemediahouse/find-best-bus-seat-to-avoid-the-sun-while-traveling-5cg5</link>
      <guid>https://forem.com/rosemediahouse/find-best-bus-seat-to-avoid-the-sun-while-traveling-5cg5</guid>
      <description>&lt;h2&gt;
  
  
  &lt;a href="http://www.SitInShade.com" rel="noopener noreferrer"&gt;www.SitInShade.com&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;This is so specific this is hilarious. Some clever guy made this and shared in a &lt;a href="https://www.reddit.com/r/webdev/comments/17drp7o/i_made_a_website_to_find_best_bus_seat_to_avoid/" rel="noopener noreferrer"&gt;reddit post&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;a href="https://sitinshade.com" rel="noopener noreferrer"&gt;
      sitinshade.com
    &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>map</category>
      <category>bus</category>
      <category>sun</category>
    </item>
    <item>
      <title>Meet Fred: The most awesome Redis client for Rust.</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Wed, 18 Oct 2023 16:00:30 +0000</pubDate>
      <link>https://forem.com/rosemediahouse/meet-fred-the-most-awesome-redis-client-for-rust-bl8</link>
      <guid>https://forem.com/rosemediahouse/meet-fred-the-most-awesome-redis-client-for-rust-bl8</guid>
      <description>&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/aembke" rel="noopener noreferrer"&gt;
        aembke
      &lt;/a&gt; / &lt;a href="https://github.com/aembke/fred.rs" rel="noopener noreferrer"&gt;
        fred.rs
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      An async client for Valkey and Redis
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Fred&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://opensource.org/licenses/MIT" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/6581c31c16c1b13ddc2efb92e2ad69a93ddc4a92fd871ff15d401c4c6c9155a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://opensource.org/licenses/Apache-2.0" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/859a1a0bc85ce8bbd7a730a274fec5c9e77c4726ffdf6aa762a78685e26033a4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d417061636865253230322e302d626c75652e737667" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://circleci.com/gh/aembke/fred.rs/tree/main" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/cdd04cee71f2863f023967c6d235de0df1831534f10bbf50aa6df155c04a88cf/68747470733a2f2f636972636c6563692e636f6d2f67682f61656d626b652f667265642e72732f747265652f6d61696e2e7376673f7374796c653d737667" alt="CircleCI"&gt;&lt;/a&gt;
&lt;a href="https://crates.io/crates/fred" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/7826bb1c4afb9b2d84a63c97958b67fb9898d87003112e43b8e5788e2707e311/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f667265642e737667" alt="Crates.io"&gt;&lt;/a&gt;
&lt;a href="https://docs.rs/fred" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f50115f16b6f863ed22a37126158885291b4cbfbe19eecbdfa55a8a105af39d4/68747470733a2f2f646f63732e72732f667265642f62616467652e737667" alt="API docs"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An async client for Valkey and Redis&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Example&lt;/h2&gt;
&lt;/div&gt;
&lt;div class="highlight highlight-source-rust notranslate position-relative overflow-auto js-code-highlight"&gt;
&lt;pre&gt;&lt;span class="pl-k"&gt;use&lt;/span&gt; fred&lt;span class="pl-kos"&gt;::&lt;/span&gt;prelude&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-c1"&gt;*&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
&lt;span class="pl-c1"&gt;#&lt;span class="pl-kos"&gt;[&lt;/span&gt;tokio&lt;span class="pl-kos"&gt;::&lt;/span&gt;main&lt;span class="pl-kos"&gt;]&lt;/span&gt;&lt;/span&gt;
&lt;span class="pl-k"&gt;async&lt;/span&gt; &lt;span class="pl-k"&gt;fn&lt;/span&gt; &lt;span class="pl-en"&gt;main&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt; -&amp;gt; &lt;span class="pl-smi"&gt;Result&lt;/span&gt;&lt;span class="pl-kos"&gt;&amp;lt;&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; &lt;span class="pl-smi"&gt;Error&lt;/span&gt;&lt;span class="pl-kos"&gt;&amp;gt;&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
  &lt;span class="pl-k"&gt;let&lt;/span&gt; config = &lt;span class="pl-smi"&gt;Config&lt;/span&gt;&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-en"&gt;from_url&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;"redis://localhost:6379/1"&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;?&lt;span class="pl-kos"&gt;;&lt;/span&gt;
  &lt;span class="pl-k"&gt;let&lt;/span&gt; client = &lt;span class="pl-smi"&gt;Builder&lt;/span&gt;&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-en"&gt;from_config&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;config&lt;span class="pl-kos"&gt;)&lt;/span&gt;
    &lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;with_connection_config&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;|config| &lt;span class="pl-kos"&gt;{&lt;/span&gt;
      config&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;connection_timeout&lt;/span&gt; = &lt;span class="pl-smi"&gt;Duration&lt;/span&gt;&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-en"&gt;from_secs&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;5&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
      config&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-c1"&gt;tcp&lt;/span&gt; = &lt;span class="pl-smi"&gt;TcpConfig&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
        &lt;span class="pl-c1"&gt;nodelay&lt;/span&gt;&lt;span class="pl-kos"&gt;:&lt;/span&gt; &lt;span class="pl-en"&gt;Some&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-c1"&gt;true&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt;
        ..&lt;span class="pl-smi"&gt;Default&lt;/span&gt;&lt;span class="pl-kos"&gt;::&lt;/span&gt;&lt;span class="pl-en"&gt;default&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
      &lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
    &lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
    &lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;build&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;?&lt;span class="pl-kos"&gt;;&lt;/span&gt;
  client&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;init&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-k"&gt;await&lt;/span&gt;?&lt;span class="pl-kos"&gt;;&lt;/span&gt;

  client&lt;span class="pl-kos"&gt;.&lt;/span&gt;&lt;span class="pl-en"&gt;on_error&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;|&lt;span class="pl-kos"&gt;(&lt;/span&gt;error&lt;span class="pl-kos"&gt;,&lt;/span&gt; server&lt;span class="pl-kos"&gt;)&lt;/span&gt;| &lt;span class="pl-k"&gt;async&lt;/span&gt; &lt;span class="pl-k"&gt;move&lt;/span&gt; &lt;span class="pl-kos"&gt;{&lt;/span&gt;
    &lt;span class="pl-en"&gt;println&lt;/span&gt;&lt;span class="pl-en"&gt;!&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-s"&gt;"{:?}: Connection error: {:?}"&lt;/span&gt;&lt;span class="pl-kos"&gt;,&lt;/span&gt; server&lt;span class="pl-kos"&gt;,&lt;/span&gt; error&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;
    &lt;span class="pl-en"&gt;Ok&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;(&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;
  &lt;span class="pl-kos"&gt;}&lt;/span&gt;&lt;span class="pl-kos"&gt;)&lt;/span&gt;&lt;span class="pl-kos"&gt;;&lt;/span&gt;

  &lt;span class="pl-c"&gt;// convert responses to many&lt;/span&gt;&lt;/pre&gt;…
&lt;/div&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/aembke/fred.rs" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  Back Story
&lt;/h2&gt;

&lt;p&gt;The goto Redis client for Rust is called &lt;a href="https://github.com/redis-rs/redis-rs" rel="noopener noreferrer"&gt;redis-rs&lt;/a&gt;. It has over 3k stars on Github. but I found it very annoying to use because I quickly found out that if you want to set any value you had to get a mutable reference to the underlying client. Which meant great pain to store Redis client in the global scope. People who do not know what a mutable reference is consider the &lt;code&gt;let&lt;/code&gt; keyword in JavaScript. you can mutate or change a variable that is initiated with &lt;code&gt;let&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The other annoyance I had that it didn't support RedisJson which was a bummer because it is very helpful if you store anything other than &lt;code&gt;String&lt;/code&gt; key value pair.&lt;/p&gt;

&lt;p&gt;Fortunately then I found Fred. Fred is a beautiful piece of engineering. It solved all of the problems I had with the redis-rs package. It is async friendly, it supports RedisJson and most importantly it doesn't require a mutable reference to set value.&lt;/p&gt;

&lt;p&gt;It also has a lot of other great features. Consider &lt;strong&gt;starring&lt;/strong&gt; the project and spreading the words!&lt;/p&gt;

</description>
      <category>redis</category>
      <category>rust</category>
      <category>opensource</category>
      <category>github</category>
    </item>
    <item>
      <title>Neo4j, A Database on Crack 🚬</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Sun, 15 Oct 2023 17:08:37 +0000</pubDate>
      <link>https://forem.com/tausifcreates/neo4j-database-on-crack-4728</link>
      <guid>https://forem.com/tausifcreates/neo4j-database-on-crack-4728</guid>
      <description>&lt;h2&gt;
  
  
  Lol What?
&lt;/h2&gt;

&lt;p&gt;It's good. I mean it. You do not have SQL like rigid tables holding your data, foreign keys to map relation. It's not plain key-value pairs like Mongodb, either. Instead, you have this:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--kUyXMVhD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aofsdiqpb1a491x56wwc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--kUyXMVhD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/aofsdiqpb1a491x56wwc.png" alt="Neo4j Overview" width="800" height="265"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The connecting line is the "Relation" between two objects (or Node), which is a &lt;em&gt;foreign-key&lt;/em&gt; in sql, or &lt;em&gt;reference&lt;/em&gt; in Mongodb. But the difference is, you define the relation just as is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;you&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Person&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;relation&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="n"&gt;LEARNING&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;js&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="k"&gt;Language&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Any Superpowers?
&lt;/h2&gt;

&lt;p&gt;Yes. It's relational, but at the same time free of the rigidity that comes with SQL tables. It's nosql (cypher), but free from the lacking of proper relationship in Mongodb. it's the best of the both worlds.&lt;/p&gt;
&lt;h2&gt;
  
  
  Tell me more
&lt;/h2&gt;

&lt;p&gt;Everything is a &lt;em&gt;Node&lt;/em&gt;. You draw lines to connect them. And that's relationship. This is how a Node looks like:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sFox1lx6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1w9mvkbwtl9c1tvh3ci.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sFox1lx6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t1w9mvkbwtl9c1tvh3ci.png" alt="Neo4j Node" width="740" height="502"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is how you connect these Nodes:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HYDt6LH6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/286yg186z6wgum4n3zp3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HYDt6LH6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/286yg186z6wgum4n3zp3.png" alt="Neo4j Relation" width="800" height="364"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Why isn't it everywhere?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Performance sucks compared to Postgres and Mysql.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Important features like Sharding and Live Backup - are behind a &lt;em&gt;very&lt;/em&gt; expensive corporate license.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Their cloud service (Aura) starts at 65$/month. The service was announced in 2021. It's fully managed, and getting good traction.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No support for querying nested properties/fields like MongoDB. Manually parsing JSON string is the way to go.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Give it a go
&lt;/h2&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
      &lt;div class="c-embed__cover"&gt;
        &lt;a href="https://neo4j.com/docs/getting-started/cypher-intro/" class="c-link s:max-w-50 align-middle" rel="noopener noreferrer"&gt;
          &lt;img alt="" src="https://res.cloudinary.com/practicaldev/image/fetch/s--O5ZLiDKV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dist.neo4j.com/wp-content/uploads/20210423062553/neo4j-social-share-21.png" height="419" class="m-0" width="800"&gt;
        &lt;/a&gt;
      &lt;/div&gt;
    &lt;div class="c-embed__body"&gt;
      &lt;h2 class="fs-xl lh-tight"&gt;
        &lt;a href="https://neo4j.com/docs/getting-started/cypher-intro/" rel="noopener noreferrer" class="c-link"&gt;
          Query a Neo4j database using Cypher - Getting Started
        &lt;/a&gt;
      &lt;/h2&gt;
        &lt;p class="truncate-at-3"&gt;
          A high-level overview of the graph query language Cypher.
        &lt;/p&gt;
      &lt;div class="color-secondary fs-s flex items-center"&gt;
          &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://res.cloudinary.com/practicaldev/image/fetch/s--ttXz3b-Y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://neo4j.com/wp-content/themes/neo4jweb/favicon.ico" width="48" height="48"&gt;
        neo4j.com
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>database</category>
      <category>backend</category>
      <category>sql</category>
      <category>nosql</category>
    </item>
    <item>
      <title>WTransport - WebTransport library in Rust 🦀</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Fri, 13 Oct 2023 15:12:47 +0000</pubDate>
      <link>https://forem.com/rosemediahouse/wtransport-webtransport-in-rust-1n2g</link>
      <guid>https://forem.com/rosemediahouse/wtransport-webtransport-in-rust-1n2g</guid>
      <description>&lt;p&gt;WebTransport is a modern update to Websockets, transmitting data between client and server using http3.&lt;/p&gt;

&lt;p&gt;WTransport is an implementation http3 WebTransport written in Rust.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/BiagioFesta" rel="noopener noreferrer"&gt;
        BiagioFesta
      &lt;/a&gt; / &lt;a href="https://github.com/BiagioFesta/wtransport" rel="noopener noreferrer"&gt;
        wtransport
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Async-friendly WebTransport implementation in Rust
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;p&gt;
  &lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/BiagioFesta/wtransport/master/imgs/logo.svg"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FBiagioFesta%2Fwtransport%2Fmaster%2Fimgs%2Flogo.svg" alt="WTransport Logo"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;&lt;a href="https://docs.rs/wtransport/" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f7f6e3fefed0d012ca32a853c56e2b182865951732f538e09498636561ed95aa/68747470733a2f2f646f63732e72732f777472616e73706f72742f62616467652e737667" alt="Documentation"&gt;&lt;/a&gt;
&lt;a href="https://crates.io/crates/wtransport" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/756ca7865d4ded41594c1f818b5fa05081323563cc37cf5ed76bb709742932e5/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f777472616e73706f72742e737667" alt="Crates.io"&gt;&lt;/a&gt;
&lt;a href="https://github.com/BiagioFesta/wtransport/actions/workflows/ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/BiagioFesta/wtransport/actions/workflows/ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;
&lt;a href="https://discord.gg/KPrrbWe5zg" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/dbffcfaa6be6bccc6753bf7240a3d4cff776451d84b9bdf5ecc33d31c57d00fc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636861742d6a6f696e2d626c75653f6c6f676f3d646973636f7264" alt="Chat"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;WTransport&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;&lt;a href="https://datatracker.ietf.org/doc/html/draft-ietf-webtrans-http3/" rel="nofollow noopener noreferrer"&gt;WebTransport&lt;/a&gt; protocol, pure-&lt;em&gt;rust&lt;/em&gt;, &lt;em&gt;async&lt;/em&gt;-friendly.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Introduction&lt;/h2&gt;
&lt;/div&gt;
&lt;p&gt;WebTransport is a new protocol being developed to enable &lt;em&gt;low-latency&lt;/em&gt;, &lt;em&gt;bidirectional&lt;/em&gt; communication between clients and servers over the web
It aims to address the limitations of existing protocols like &lt;em&gt;HTTP&lt;/em&gt; and &lt;em&gt;WebSocket&lt;/em&gt; by offering a more &lt;em&gt;efficient&lt;/em&gt; and &lt;em&gt;flexible&lt;/em&gt; transport layer.&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h3 class="heading-element"&gt;Benefits of WebTransport&lt;/h3&gt;

&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;🚀 &lt;strong&gt;Low latency&lt;/strong&gt;: WebTransport is designed to minimize latency, making it suitable for real-time applications such as gaming, video streaming, and collaborative editing.&lt;/li&gt;
&lt;li&gt;🔄 &lt;strong&gt;Bidirectional communication&lt;/strong&gt;: WebTransport allows simultaneous data exchange between the client and server, enabling efficient back-and-forth communication without the need for multiple requests.&lt;/li&gt;
&lt;li&gt;🔀 &lt;strong&gt;Multiplexing&lt;/strong&gt;: With WebTransport, multiple streams can be multiplexed over a single connection, reducing overhead and improving performance.&lt;/li&gt;
&lt;li&gt;🔒 &lt;strong&gt;Security&lt;/strong&gt;: WebTransport benefits from the security features provided by the web platform, including transport encryption and same-origin policy.&lt;/li&gt;
&lt;li&gt;🌐 &lt;strong&gt;Native Browser Support&lt;/strong&gt;: WebTransport is natively supported…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/BiagioFesta/wtransport" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;Benefits of WebTransport:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;🚀 Low latency:&lt;/strong&gt; WebTransport is designed to minimize latency, making it suitable for real-time applications such as gaming, video streaming, and collaborative editing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔄 Bidirectional communication:&lt;/strong&gt; WebTransport allows simultaneous data exchange between the client and server, enabling efficient back-and-forth communication without the need for multiple requests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔀 Multiplexing:&lt;/strong&gt; With WebTransport, multiple streams can be multiplexed over a single connection, reducing overhead and improving performance.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;🔒 Security:&lt;/strong&gt; WebTransport benefits from the security features provided by the web platform, including transport encryption and same-origin policy.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  WTransport's simple API
&lt;/h2&gt;

&lt;p&gt;WTransport comes with both &lt;em&gt;server&lt;/em&gt; and &lt;em&gt;client&lt;/em&gt; implementaton. Here is how it looks:&lt;/p&gt;

&lt;h3&gt;
  
  
  Server
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[tokio::main]&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;ServerConfig&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;builder&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.with_bind_default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;4433&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.with_certificate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;certificate&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="nf"&gt;.build&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Endpoint&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;server&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
        &lt;span class="nf"&gt;.accept&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="k"&gt;.await&lt;/span&gt;     &lt;span class="c1"&gt;// Awaits connection&lt;/span&gt;
        &lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;    &lt;span class="c1"&gt;// Awaits session request&lt;/span&gt;
        &lt;span class="nf"&gt;.accept&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;// Accepts request&lt;/span&gt;
        &lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;   &lt;span class="c1"&gt;// Awaits ready session&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;connection&lt;/span&gt;&lt;span class="nf"&gt;.accept_bi&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Client
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="nd"&gt;#[tokio::main]&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;config&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;ClientConfig&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;Endpoint&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;client&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;config&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;
        &lt;span class="nf"&gt;.connect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"https://[::1]:4433"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;stream&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;connection&lt;/span&gt;&lt;span class="nf"&gt;.open_bi&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Get Started
&lt;/h2&gt;

&lt;p&gt;The repo has a full example, where you launch a server and a chrome instance to communicate with each other over h3 WebTransport protocol. Here you can find it:&lt;br&gt;
&lt;a href="https://github.com/BiagioFesta/wtransport/blob/master/wtransport/examples/full.rs" rel="noopener noreferrer"&gt;https://github.com/BiagioFesta/wtransport/blob/master/wtransport/examples/full.rs&lt;/a&gt;&lt;/p&gt;

</description>
      <category>rust</category>
      <category>webdev</category>
      <category>opensource</category>
      <category>github</category>
    </item>
    <item>
      <title>⚡Socketioxide - SocketIO server powered by Rust! 🦀</title>
      <dc:creator>Rose Media House</dc:creator>
      <pubDate>Tue, 10 Oct 2023 18:37:34 +0000</pubDate>
      <link>https://forem.com/rosemediahouse/socketio-in-rust-360a</link>
      <guid>https://forem.com/rosemediahouse/socketio-in-rust-360a</guid>
      <description>&lt;blockquote&gt;
&lt;h3&gt;
  
  
  &lt;em&gt;Rust is hard, so is writing networking code in it. But who doesn’t want its blazing fast speed? Socketioxide fills the gap. It’s socket.io, but with speed and safety, that helps you achieve unimaginable while keeping it dead simple.&lt;/em&gt;
&lt;/h3&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://socket.io" rel="noopener noreferrer"&gt;Socket.io&lt;/a&gt; is a massively popular websocket/polling framework with about 60k stars on github. Socket.io server is officially written in Node.js, which was ported to Python, Go (upto v1.4), Java and Swift by the community. Now, there is a Rust port as well, &lt;strong&gt;Socketioxide&lt;/strong&gt;:&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fassets.dev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Totodore" rel="noopener noreferrer"&gt;
        Totodore
      &lt;/a&gt; / &lt;a href="https://github.com/Totodore/socketioxide" rel="noopener noreferrer"&gt;
        socketioxide
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      A socket.io server implementation in Rust that integrates with the Tower ecosystem and the Tokio stack.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;
&lt;a href="https://github.com/totodore/socketioxide" rel="noopener noreferrer"&gt;&lt;code&gt;Socketioxide&lt;/code&gt;&lt;/a&gt; 🚀🦀&lt;/h1&gt;
&lt;/div&gt;

  
  &lt;img width="150" height="150" alt="Shows Anuraghazra's GitHub Stats." src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FTotodore%2Fsocketioxide%2Frefs%2Fheads%2Fmain%2F.github%2Flogo_light.svg"&gt;

&lt;p&gt;A &lt;a href="https://socket.io" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;socket.io&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; server implementation in Rust that integrates with the &lt;a href="https://tokio.rs/#tk-lib-tower" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Tower&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; ecosystem and the &lt;a href="https://tokio.rs" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Tokio stack&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;. It integrates with any server framework based on tower like &lt;a href="https://docs.rs/axum/latest/axum/" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Axum&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://docs.rs/warp/latest/warp/" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Warp&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://salvo.rs" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Salvo&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;, &lt;a href="https://viz.rs" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Viz&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt; or &lt;a href="https://docs.rs/hyper/latest/hyper/" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;Hyper&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;. Add any other tower based middleware on top of socketioxide such as CORS, authorization, compression, etc with &lt;a href="https://docs.rs/tower-http/latest/tower_http/" rel="nofollow noopener noreferrer"&gt;&lt;em&gt;&lt;strong&gt;&lt;code&gt;tower-http&lt;/code&gt;&lt;/strong&gt;&lt;/em&gt;&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://crates.io/crates/socketioxide" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/ebe6dd20996c8f2cec4d121520d0644d3d195387c20cf7610c4b128379e5fb6c/68747470733a2f2f696d672e736869656c64732e696f2f6372617465732f762f736f636b6574696f786964652e737667" alt="Crates.io"&gt;&lt;/a&gt;
&lt;a href="https://docs.rs/socketioxide" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/deefd499b3382ffe57e5dab47d441eb701661c7f6e0216e1f40997201b06c277/68747470733a2f2f646f63732e72732f736f636b6574696f786964652f62616467652e737667" alt="Documentation"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Totodore/socketioxide/actions/workflows/github-ci.yml" rel="noopener noreferrer"&gt;&lt;img src="https://github.com/Totodore/socketioxide/actions/workflows/github-ci.yml/badge.svg" alt="CI"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a rel="noopener noreferrer nofollow" href="https://raw.githubusercontent.com/andreasbm/readme/master/assets/lines/solar.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fandreasbm%2Freadme%2Fmaster%2Fassets%2Flines%2Fsolar.png"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Features&lt;/h2&gt;
&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Integrates with
&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://docs.rs/axum/latest/axum/" rel="nofollow noopener noreferrer"&gt;Axum&lt;/a&gt;: &lt;a href="https://github.com/Totodore/socketioxide./examples/axum-echo/axum_echo.rs" rel="noopener noreferrer"&gt;🏓echo example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.rs/warp/latest/warp/" rel="nofollow noopener noreferrer"&gt;Warp&lt;/a&gt;: &lt;a href="https://github.com/Totodore/socketioxide/blob/v0.8.0/examples/warp-echo/warp_echo.rs" rel="noopener noreferrer"&gt;🏓echo example&lt;/a&gt; (Not supported with &lt;code&gt;socketioxide &amp;gt;= 0.9.0&lt;/code&gt; as long as warp doesn't migrate to hyper v1)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://docs.rs/hyper/latest/hyper/" rel="nofollow noopener noreferrer"&gt;Hyper&lt;/a&gt;: &lt;a href="https://github.com/Totodore/socketioxide./examples/hyper-echo/hyper_echo.rs" rel="noopener noreferrer"&gt;🏓echo example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://salvo.rs" rel="nofollow noopener noreferrer"&gt;Salvo&lt;/a&gt;: &lt;a href="https://github.com/Totodore/socketioxide./examples/salvo-echo/salvo_echo.rs" rel="noopener noreferrer"&gt;🏓echo example&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://viz.rs" rel="nofollow noopener noreferrer"&gt;Viz&lt;/a&gt;: &lt;a href="https://github.com/Totodore/socketioxide./examples/viz-echo/viz_echo.rs" rel="noopener noreferrer"&gt;🏓echo example&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Out of the box support for any other middleware based on tower
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/cors" rel="nofollow noopener noreferrer"&gt;🔓CORS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/compression" rel="nofollow noopener noreferrer"&gt;📁Compression&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/auth" rel="nofollow noopener noreferrer"&gt;🔐Authorization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Effortless horizontal scaling with plugable adapters:
&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.rs/socketioxide-redis/latest/socketioxide-redis" rel="nofollow noopener noreferrer"&gt;Redis / Valkey&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/socketioxide-mongodb/latest/socketioxide-mongodb" rel="nofollow noopener noreferrer"&gt;MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;More to come...&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Remote cluster communication with &lt;a href="https://github.com/Totodore/socketioxide-emitter" rel="noopener noreferrer"&gt;Socketioxide-emitter&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Namespaces and Dynamic Namespaces&lt;/li&gt;
&lt;li&gt;Rooms&lt;/li&gt;
&lt;li&gt;Ack and emit with ack&lt;/li&gt;
&lt;li&gt;Binary packets&lt;/li&gt;
&lt;li&gt;Polling &amp;amp; Websocket transports&lt;/li&gt;
&lt;li&gt;Common (default) &amp;amp; Msgpack parsers&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Totodore/socketioxide" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  🎉 Latest Release (&lt;code&gt;v0.8.0&lt;/code&gt;)
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;v0.8.0&lt;/code&gt; was released on Dec 12. See the full release note here: &lt;a href="https://github.com/Totodore/socketioxide/releases/tag/v0.8.0" rel="noopener noreferrer"&gt;https://github.com/Totodore/socketioxide/releases/tag/v0.8.0&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  💎 Socketioxide Features
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Integrates with:

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.rs/axum/latest/axum/" rel="noopener noreferrer"&gt;Axum&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/warp/latest/warp/" rel="noopener noreferrer"&gt;Warp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/hyper/latest/hyper/" rel="noopener noreferrer"&gt;Hyper&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/salvo/latest/salvo/" rel="noopener noreferrer"&gt;Salvo&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Out of the box support for any other middleware based on tower :

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/cors" rel="noopener noreferrer"&gt;CORS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/compression" rel="noopener noreferrer"&gt;Compression&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://docs.rs/tower-http/latest/tower_http/auth" rel="noopener noreferrer"&gt;Authorization&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Namespaces&lt;/li&gt;
&lt;li&gt;Rooms&lt;/li&gt;
&lt;li&gt;Ack and emit with ack&lt;/li&gt;
&lt;li&gt;Binary packets&lt;/li&gt;
&lt;li&gt;Polling &amp;amp; Websocket transports&lt;/li&gt;
&lt;li&gt;Extensions to add custom data to sockets&lt;/li&gt;
&lt;li&gt;Memory efficient http payload parsing with streams&lt;/li&gt;
&lt;li&gt;Api that mimics the &lt;a href="https://socket.io/docs/v4/server-api/" rel="noopener noreferrer"&gt;socket.io&lt;/a&gt; JavaScript api as much as possible&lt;/li&gt;
&lt;li&gt;Well tested with the official &lt;a href="https://github.com/totodore/socketioxide/actions" rel="noopener noreferrer"&gt;end to end test-suite&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Socket.io versions supported :

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://socket.io/docs/v4/" rel="noopener noreferrer"&gt;&lt;em&gt;protocol v5&lt;/em&gt;&lt;/a&gt; : based on engine.io v4 under the feature flag v5 (default), (socket.io js from v3.0.0..latest)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/socketio/socket.io-protocol/tree/v4" rel="noopener noreferrer"&gt;&lt;em&gt;protocol v4&lt;/em&gt;&lt;/a&gt; : based on engine.io v3, feature flag v4, (socket.io js from v1.0.3..latest)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  🪄 Power of Rust + Simplicity of Socket IO
&lt;/h2&gt;

&lt;p&gt;The thing about socket.io is that it’s so simple, that someone who just learned JavaScript can get started with it. Write an html page, bring the client and hook some event listeners.&lt;/p&gt;

&lt;p&gt;On the other hand, Rust is a language with powerful type system and runtime speed. Programs written in Rust are more memory safe than C, C++ etc. That makes Rust a great choice for both mission critical and general purpose software development.&lt;/p&gt;

&lt;p&gt;Now that you can combine the simplicity and power together, Socketioxide emerges as a great choice for realtime apps.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧑‍💻 How to get started with it?
&lt;/h2&gt;

&lt;p&gt;This is an example of socket.io echo server with &lt;a href="https://github.com/Totodore/socketioxide" rel="noopener noreferrer"&gt;Socketioxide&lt;/a&gt; and &lt;a href="https://github.com/tokio-rs/axum" rel="noopener noreferrer"&gt;Axum&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight rust"&gt;&lt;code&gt;&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;axum&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;routing&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;get&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;axum&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;serde_json&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;socketioxide&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;SocketIo&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;tracing&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;info&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;use&lt;/span&gt; &lt;span class="nn"&gt;tracing_subscriber&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;FmtSubscriber&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nd"&gt;#[tokio::main]&lt;/span&gt;
&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;fn&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;-&amp;gt;&lt;/span&gt; &lt;span class="nb"&gt;Result&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nb"&gt;Box&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="k"&gt;dyn&lt;/span&gt; &lt;span class="nn"&gt;std&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;error&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="n"&gt;Error&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nn"&gt;tracing&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;subscriber&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;set_global_default&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nn"&gt;FmtSubscriber&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;default&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;SocketIo&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new_layer&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="nf"&gt;.ns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Socket.IO connected: {:?} {:?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.ns&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="py"&gt;.sid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"auth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

        &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"message"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Received event: {:?} {:?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.bin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"message-back"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.on&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"message-with-ack"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;ack&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Received event: {:?} {:?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="n"&gt;ack&lt;/span&gt;&lt;span class="nf"&gt;.bin&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;bin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.send&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;

        &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.on_disconnect&lt;/span&gt;&lt;span class="p"&gt;(|&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Socket.IO disconnected: {} {}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="py"&gt;.sid&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;reason&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="p"&gt;});&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="n"&gt;io&lt;/span&gt;&lt;span class="nf"&gt;.ns&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/custom"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;|&lt;/span&gt;&lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;Value&lt;/span&gt;&lt;span class="p"&gt;|&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="k"&gt;move&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Socket.IO connected on: {:?} {:?}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.ns&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="py"&gt;.sid&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
        &lt;span class="n"&gt;socket&lt;/span&gt;&lt;span class="nf"&gt;.emit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"auth"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;auth&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="nf"&gt;.ok&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;

    &lt;span class="k"&gt;let&lt;/span&gt; &lt;span class="n"&gt;app&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nn"&gt;axum&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nn"&gt;Router&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;new&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
        &lt;span class="nf"&gt;.route&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(||&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="s"&gt;"Hello, World!"&lt;/span&gt; &lt;span class="p"&gt;}))&lt;/span&gt;
        &lt;span class="nf"&gt;.layer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;layer&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nd"&gt;info!&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Starting server"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

    &lt;span class="nn"&gt;Server&lt;/span&gt;&lt;span class="p"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;bind&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="s"&gt;"127.0.0.1:3000"&lt;/span&gt;&lt;span class="nf"&gt;.parse&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="nf"&gt;.unwrap&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="nf"&gt;.serve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;app&lt;/span&gt;&lt;span class="nf"&gt;.into_make_service&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
        &lt;span class="k"&gt;.await&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nf"&gt;Ok&lt;/span&gt;&lt;span class="p"&gt;(())&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you want to build a chat app, here is an example to get you started: &lt;a href="https://github.com/Totodore/socketioxide/tree/main/examples/src/chat" rel="noopener noreferrer"&gt;https://github.com/Totodore/socketioxide/tree/main/examples/src/chat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are planning to use a frontend framework like React, Angular or Svelte, consult the official docs: &lt;a href="https://socket.io/docs/v3/client-initialization/" rel="noopener noreferrer"&gt;https://socket.io/docs/v3/client-initialization/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try it out and star⭐ on Github!&lt;/p&gt;

</description>
      <category>rust</category>
      <category>socketio</category>
      <category>opensource</category>
      <category>github</category>
    </item>
  </channel>
</rss>
