<?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>DEV Community: Karthic Rao</title>
    <description>The latest articles on DEV Community by Karthic Rao (@hackintoshrao).</description>
    <link>https://dev.to/hackintoshrao</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%2F321289%2Fb1884f57-a660-442a-a183-d089c61c333f.jpeg</url>
      <title>DEV Community: Karthic Rao</title>
      <link>https://dev.to/hackintoshrao</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hackintoshrao"/>
    <language>en</language>
    <item>
      <title>Shadowing in Rust</title>
      <dc:creator>Karthic Rao</dc:creator>
      <pubDate>Wed, 18 Jan 2023 07:47:46 +0000</pubDate>
      <link>https://dev.to/hackintoshrao/shadowing-in-rust-31c2</link>
      <guid>https://dev.to/hackintoshrao/shadowing-in-rust-31c2</guid>
      <description>&lt;p&gt;While Rust comes with strict static typing, surprisingly it supports the concept of Shadowing for types. Shadowing allows  variable that was once declared as one type to be redeclared as a new type. In effect, shadowing or overwriting the previous declaration.&lt;/p&gt;

&lt;p&gt;Let's take a quick look at Shadowing in Rust. Here's an example of the beginner's favorite guessing game example.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;
&lt;br&gt;
Take a look at line number 10 and 15, and observe that the variable &lt;code&gt;guess&lt;/code&gt; is declared. First time as a mutable string, and then as an immutable unsigned 32-bit integer.

&lt;p&gt;Shadowing lets us re-use the guess name, rather than forcing us to come up with two unique names like &lt;code&gt;guess_str&lt;/code&gt; and &lt;code&gt;guess&lt;/code&gt;, or something else.&lt;/p&gt;

</description>
      <category>rust</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Getting started with Dyte - 1: Setting up Dyte</title>
      <dc:creator>Karthic Rao</dc:creator>
      <pubDate>Mon, 13 Dec 2021 04:13:11 +0000</pubDate>
      <link>https://dev.to/hackintoshrao/getting-started-with-dyte-1-getting-started-3nn3</link>
      <guid>https://dev.to/hackintoshrao/getting-started-with-dyte-1-getting-started-3nn3</guid>
      <description>&lt;p&gt;Building audio, video apps with ease&lt;/p&gt;

&lt;p&gt;View the video version of this blog at &lt;a href="https://incredible.dev/watch/qpw-mkg-cut"&gt;Incredible.dev&lt;/a&gt;.&lt;/p&gt;




&lt;h3&gt;
  
  
  What is Dyte?
&lt;/h3&gt;

&lt;p&gt;Dyte is a SDK which provides the easiest way to add real-time communications using audio and video to your apps and platforms.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Real-time, fast communications
&lt;/h3&gt;

&lt;p&gt;Dyte is blazingly fast.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZkTitC6o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/G-GDXcQI01lRZ-GtREZLp.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZkTitC6o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/G-GDXcQI01lRZ-GtREZLp.gif" alt="Real-time, fast communications" width="640" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Video capabilities to your mobile apps
&lt;/h3&gt;

&lt;p&gt;Dyte enables you to build Video calling capabilities for mobile&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1gm482l3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/E0I3RSp6E8-EZ1xShdxyH.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1gm482l3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/E0I3RSp6E8-EZ1xShdxyH.gif" alt="Video apps" width="640" height="640"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Video capabilities to your web apps
&lt;/h3&gt;

&lt;p&gt;Dyte Enables you to build Video calling capabilities for Web&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VzfYu-Y9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/kMHOiwv3HQj2SlME8wSVn.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VzfYu-Y9--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/kMHOiwv3HQj2SlME8wSVn.gif" alt="Video apps" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Audio apps
&lt;/h3&gt;

&lt;p&gt;Dyte offers audio capabilities too.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TF_JnvHy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/vqvpbNjQc7GMWHaRStblg.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TF_JnvHy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/vqvpbNjQc7GMWHaRStblg.gif" alt="Audio apps" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Web and mobile applications
&lt;/h3&gt;

&lt;p&gt;Dyte can power both mobile and web applications&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--l_5o1rux--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/zCmUIYkWZ1kNAkE0Wxcko.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--l_5o1rux--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/zCmUIYkWZ1kNAkE0Wxcko.gif" alt="Web and mobile applications" width="880" height="880"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h2&gt;
  
  
  How dyte works?
&lt;/h2&gt;

&lt;p&gt;Dyte is based largely on the WebRTC protocol, and the features and optimisations we build on top of it. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cag10KBe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/0C8bdBLVs0SiYi15pioaw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cag10KBe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/0C8bdBLVs0SiYi15pioaw.gif" alt="WebRTC protocol" width="880" height="660"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Although the protocol is supposed to be peer-to-peer, it is not easy to build it reliably.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--udm6wJ1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/CFMnqzAoDKvfBkPezmn14.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--udm6wJ1H--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/CFMnqzAoDKvfBkPezmn14.gif" alt=" Peer-to-Peer Protocol" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Anyone who has tried implementing it by themselves would know that the implementions get real messy, real fast. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M7R6yNMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/piwRa2Po1JLXjjZEwfqnw.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M7R6yNMq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/piwRa2Po1JLXjjZEwfqnw.gif" alt="Implementation can get messy" width="880" height="495"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To have a real working solution, servers with SFU, STUN, TURN, etc capabilities.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--nhb6wWiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/q3h0_2lksF1pD1JfJXnKm.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--nhb6wWiF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/q3h0_2lksF1pD1JfJXnKm.gif" alt="Servers with SFU, STUN, TURN" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is required to optimize for user bandwidth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fifvEFuq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/lS-6tQky2ZAXtS_8VMVEs.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fifvEFuq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/lS-6tQky2ZAXtS_8VMVEs.gif" alt="Optimize user bandwidth" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Also to optimize for performance.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--qdOEmgFW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/ZHlaJ2OPXufSrgk1HBsgr.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qdOEmgFW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://cdn.incredible.dev/ZHlaJ2OPXufSrgk1HBsgr.gif" alt="Optimize performance" width="880" height="880"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h2&gt;
  
  
  Architecture
&lt;/h2&gt;

&lt;p&gt;Here is the architecture of Dyte, and all the step that goes behind the scenes in setting up a meeting.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Jw1K2NSq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.incredible.dev/yG_dDhnJYefnw7swEq4a2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Jw1K2NSq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.incredible.dev/yG_dDhnJYefnw7swEq4a2.png" alt="Architecture" width="880" height="522"&gt;&lt;/a&gt; &lt;/p&gt;




&lt;h2&gt;
  
  
  Using JS SDK
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Initialising
&lt;/h3&gt;

&lt;p&gt;Here are the steps to initialise the Dyte JS SDK&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Get meeting room name from the backend API&lt;/li&gt;
&lt;li&gt;Get participant token form the backend API&lt;/li&gt;
&lt;li&gt;Pass them as props to Dyte's React Component to initialize&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Using JS React SDK
&lt;/h3&gt;

&lt;p&gt;You can initialize a meeting in your React app, using this component, like below.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;DyteMeeting&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dyte-client&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;div&lt;/span&gt; &lt;span class="nx"&gt;className&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;App&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;
      &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nx"&gt;DyteMeeting&lt;/span&gt;
        &lt;span class="nx"&gt;onInit&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{(&lt;/span&gt;&lt;span class="nx"&gt;meeting&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="nx"&gt;clientId&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;`orgId || clientId`&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
        &lt;span class="nx"&gt;meetingConfig&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;{{&lt;/span&gt;
          &lt;span class="na"&gt;roomName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`roomName`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
          &lt;span class="na"&gt;authToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`authToken`&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
        &lt;span class="p"&gt;}}&lt;/span&gt;
      &lt;span class="sr"&gt;/&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;    &lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="sr"&gt;/div&lt;/span&gt;&lt;span class="err"&gt;&amp;gt;
&lt;/span&gt;  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Hope this Incredible post conveys what is Dyte, its features and how to integrate it into your applications.&lt;br&gt;
To learn more about Dyte join their community &lt;a href="https://community.dyte.io/"&gt;using this link&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>react</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
