<?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: Zohaib Sibte Hassan</title>
    <description>The latest articles on DEV Community by Zohaib Sibte Hassan (@zohaibility).</description>
    <link>https://dev.to/zohaibility</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%2F90348%2F9e6c2383-ae75-41fb-a140-436403ba8d13.jpg</url>
      <title>DEV Community: Zohaib Sibte Hassan</title>
      <link>https://dev.to/zohaibility</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zohaibility"/>
    <language>en</language>
    <item>
      <title>Optimizing cache with predictive expire and compression</title>
      <dc:creator>Zohaib Sibte Hassan</dc:creator>
      <pubDate>Wed, 15 May 2019 12:31:45 +0000</pubDate>
      <link>https://dev.to/zohaibility/optimizing-cache-with-predictive-expire-and-compression-38kj</link>
      <guid>https://dev.to/zohaibility/optimizing-cache-with-predictive-expire-and-compression-38kj</guid>
      <description>&lt;p&gt;One of the obsecure problems in very high traffic scenarios is &lt;strong&gt;cache stampede&lt;/strong&gt; or the &lt;strong&gt;cache miss-storm&lt;/strong&gt;. Turns out it's not that hard to solve if you know what you are doing. Also with Redis streams picking up and people storing larger pay loads in Redis, reading or writing large payloads can be now be slower. In following talk I talk about details of not only what these problems are, but also how can we fix them. So without further ado:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/QkUz2_kRV9g"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Slides
&lt;/h3&gt;

&lt;p&gt;&lt;iframe src="//www.slideshare.net/slideshow/embed_code/key/r4750Et9lRXplt" alt="r4750Et9lRXplt on slideshare.net" width="100%" height="450"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h3&gt;
  
  
  Simulation demo
&lt;/h3&gt;


&lt;div class="ltag__replit"&gt;
  &lt;iframe height="550px" src="https://repl.it/@maxpert/DebounceSimulator?lite=true"&gt;&lt;/iframe&gt;
&lt;/div&gt;


&lt;h3&gt;
  
  
  Resources/References
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://www.vldb.org/pvldb/vol8/p886-vattani.pdf"&gt;Optimal Probabilistic Cache Stampede Prevention&lt;/a&gt; Paper&lt;/li&gt;
&lt;li&gt;Original article &lt;a href="https://doordash.engineering/2019/01/02/speeding-up-redis-with-compression/"&gt;Speeding up Redis with compression&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>redis</category>
      <category>cache</category>
      <category>stampede</category>
      <category>compression</category>
    </item>
    <item>
      <title>A blockchain for dummies</title>
      <dc:creator>Zohaib Sibte Hassan</dc:creator>
      <pubDate>Mon, 03 Sep 2018 15:13:47 +0000</pubDate>
      <link>https://dev.to/zohaibility/a-blockchain-for-dummies-393m</link>
      <guid>https://dev.to/zohaibility/a-blockchain-for-dummies-393m</guid>
      <description>

&lt;p&gt;While crypto-currencies are having bad time financially these days, it obviously has inspired and spun up a lot of &lt;a href="https://medium.com/@matteozago/50-examples-of-how-blockchains-are-taking-over-the-world-4276bf488a4b"&gt;applications&lt;/a&gt;. &lt;em&gt;Blockchain&lt;/em&gt; and &lt;em&gt;proof-of-work&lt;/em&gt; are fundamental concepts for the buzz that surrounds crypto-currency. While I see many people discussing the applications and possibilities, the serious lack of understanding among common developers prompted me to do a "&lt;strong&gt;Blockchain for dummies&lt;/strong&gt;" implementation. So &lt;a href="https://repl.it/@maxpert/51b7eBlockchain"&gt;here it is&lt;/a&gt;:&lt;/p&gt;


&lt;div class="ltag__replit"&gt;
      &lt;iframe height="550px" src="https://repl.it/@maxpert/51b7eBlockchain?lite=true"&gt;&lt;/iframe&gt;
    &lt;/div&gt;

&lt;p&gt;Here are the goals I've tried to achieve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I wanted to implement it in most popular language, so I selected Javascript.&lt;/li&gt;
&lt;li&gt;Wanted to show clear separation between proof-of-work and actual chain itself.&lt;/li&gt;
&lt;li&gt;For proof-of-work I selected floating numbers and hex string matching. Rather than having random string generation or something complicated it  allows a simpler implementation that won't irritate your eyes but still shows the difficulty you can achieve.&lt;/li&gt;
&lt;li&gt;For blockchain I stored everything in memory again for simplicity.&lt;/li&gt;
&lt;li&gt;No comments! If code can't explain itself I would call it useless.&lt;/li&gt;
&lt;li&gt;Use everything builtin (no external packages), because you don't need anything else!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I would be more than happy to improve it based upon feedback. Let me know what you think!&lt;/p&gt;


</description>
      <category>blockchain</category>
      <category>proofofwork</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>It's time for Typescript Native</title>
      <dc:creator>Zohaib Sibte Hassan</dc:creator>
      <pubDate>Tue, 28 Aug 2018 05:26:03 +0000</pubDate>
      <link>https://dev.to/zohaibility/its-time-for-typescript-native-2dg7</link>
      <guid>https://dev.to/zohaibility/its-time-for-typescript-native-2dg7</guid>
      <description>&lt;p&gt;Unless you have been living under a rock; you must be aware of the project &lt;a href="https://github.com/denoland/deno"&gt;Deno&lt;/a&gt;. Yes it's the project by the same guy who wrote Node.js and according to him it's his redemption from mistakes he did in Node.js: &lt;/p&gt;
&lt;div class="ltag__link"&gt;
  &lt;a href="/nickytonline" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BmhzwLSV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://res.cloudinary.com/practicaldev/image/fetch/s--zhsA-ZEm--/c_fill%2Cf_auto%2Cfl_progressive%2Ch_150%2Cq_auto%2Cw_150/https://dev-to-uploads.s3.amazonaws.com/uploads/user/profile_image/9597/68d6245f-3152-4ed2-a245-d015fca4160b.jpeg" alt="nickytonline"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="/nickytonline/10-things-i-regret-about-nodejs-14m3" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;10 Things I Regret About Node.js&lt;/h2&gt;
      &lt;h3&gt;Nick Taylor (he/him) ・ Jun 7 '18 ・ 1 min read&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#discuss&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#typescript&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#go&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#node&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


&lt;p&gt;While project is written in Rust and it uses the same v8 engine under the hood. He made one interesting choice this time around. He selected Typescript as a primary language instead of JS. &lt;/p&gt;

&lt;p&gt;Now is it a good or bad choice is a separate debate and only time will tell. I personally believe typed languages have more milage than dynamic languages both in terms of perf tuning and developer scalability. One might disagree; but after the Node.js hype is dead we can clearly see players like Golang and mid-evil dinosaurs like Java/C++/C/C# &lt;a href="https://www.techempower.com/benchmarks/"&gt;still holding top spots&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;While browsing through Deno's source code I had a thought about how about if Deno can pre-compile TS projects into single binary like Go does? How about not having to rely on JIT and complex pipeline of V8 at all? If somebody writes strictly typed  code we can benefit a lot from type hinting that Typescript has and still keep the nice features. &lt;/p&gt;

&lt;p&gt;While somebody in Microsoft is struggling to find a feature that can get him his next promotion, I am wishing for something else. With &lt;a href="https://github.com/dotnet/coreclr"&gt;CLR now cross-platform&lt;/a&gt; drop the C# ball and write us a &lt;strong&gt;Typescript Native&lt;/strong&gt; compiler. In my opinion Microsoft has better odds of success with a huge community that already understands and writes Typescript! Microsoft can go head on with Golang and increase chances of .Net core being more well adopted than where it is right now. I will drop Golang if somebody can give me a nice syntax like Typescript with all the performance goodness that I can get from Golang. &lt;/p&gt;

</description>
      <category>typescript</category>
      <category>deno</category>
      <category>node</category>
      <category>javascript</category>
    </item>
  </channel>
</rss>
