Skip to content

Bilal Fazlani's Blog#

Composable concurrency scope of ZIO Semaphore

hero

I was recently working on a "Durable Key-Value Store" implementation in ZIO. The implementation was pretty straightforward, but I had to make sure that the log file is not accessed concurrently by multiple fibers. I could have used a Ref to keep track of the state, but I came across Semaphore in ZIO and decided to give it a try. I was pleasantly surprised by how easy it was to use. In this post, we will take a look at how to use Semaphore to implement concurrency control in ZIO.

ZIO-Streams 101

hero

ZIO-Streams is a library for purely functional, asynchronous, concurrent stream processing in Scala. It is built on top of ZIO. Additionally, it implements the Reactive Streams specification. This means that ZIO-Streams can be used with other libraries that implement the same specification.

This is an introductory post to ZIO-Streams. I will cover the basics of ZIO-Streams.

Actors using Scala & Akka — Part 1 : Introduction

hero

Since I am stuck at home due to Covid-19 pandemic. With nothing else to do, I thought the best use of time would be to continue my blog series about actors. In the last article, we saw what are actors, their properties and how these properties can be useful for writing concurrent and stateful applications. It was all theory. In this article, I will demonstrate how to write your first akka actor in scala using IntelliJ IDE. Hop on even if you don’t know scala.

Protect yourself from Git identity theft

hero

Git supports signing commits with a private key and GitHub (& many other git servers) supports verifying those commits with a public key.

Signed and verified commits are marked as “Verified” by GitHub. This provides a level of verification for the commit.

Concurrency with Actors

hero

The actor model of computing was introduced by Carl Hewitt in 1973. This model makes it easy to tackle the problem of concurrency and state management. The model treats an “actor” as a primitive unit of computing.

.NET core local tools are here!

hero

One of the features of .NET core 3 is “local tools”. While global tools have been a part for .net core since version 2.1, .net core 3 brings local tools. Local tools are exactly like global tools except they are tied to a specific directory unlike global tools which are associated with the whole machine.