concurrency

Understanding Java enums

QuickStart with OpenJDK Project Loom

Reading Time: 3 minutes In this blog post, we will talk about Java’s ambitious project Loom which solves the problem of high throughput concurrency model using Java threads abstraction. We will go through how we can set up the minimal environment to experiment with the features of the Project Loom. What is Project Loom Project Loom is speculated to be the programming model which can disrupt the architecture of Continue Reading

java concurrency

Project Loom: Threads Vs Virtual Threads

Reading Time: 2 minutes If you’d like to create a large number of processes in a cheap way, these processes must run in a concurrent way so that a scale is achieved for a large number of requests processing. To understand in which scenario the Thread needs to scale, let us look at an example below. Concurrency Example HTTP requests processing messages from the queue integrating external services orchestrating Continue Reading

golang

Concurrency in Go with Goroutines and Channel

Reading Time: 5 minutes Why Concurrency? Concurrency is an ability of a program to do multiple things at the same time. Concurrency is very important in modern software, due to the need to execute independent pieces of code as fast as possible without disturbing the overall flow of the program. Concurrency in Golang is the ability for functions to run independently of each other. Parallelism is a run-time property Continue Reading

Concurrency and Parallelism In Akka

Reading Time: 3 minutes After going through the previous blogs, we are now familiar with the basics of Akka. Moving forward let us have a look at concurrency and parallelism in Akka actors. Concurrency and parallelism are related concepts, but there are small differences. Message Processing in Akka Actors First, let us have a look at message processing in Akka actors. Akka follows single-threaded illusion. That means each actor Continue Reading

Stream Optimization in Java-8

Reading Time: 4 minutes In java-8 streams are introduced to handle huge data so we can process the data efficiently. Streams are lazy and its do not process elements until a terminal condition is reached. After a terminal condition is met then each element is processed individually. If there is a short-circuiting operation at the end, the stream processing will terminate whenever all the conditions are satisfied. The new Continue Reading

Concurrency in Rust is indeed fearless

Reading Time: 3 minutes In modern operating systems, the executed program’s code is run in a process, and the operating system manages multiple processes at once. Within your program, you can also have independent parts that run simultaneously. The features that run these independent parts are called threads. A thread is a part of the process that runs along with the main process using a technique called context-switching. So, we can Continue Reading

Host a Wasm module easily on Raspberry Pi Part 2

Reading Time: 6 minutes This blog is a continuation of one of my previous blogs, if you have not checked that out, then here is the link. You can read that and then continue on this blog. This blog is a part of a series on WebAssembly. I have written several other blogs on wasm, wabt , wasm-bindgen and wasmi, etc. Feel free to check them out also. WebAssembly Continue Reading

Multi threading in JAVA

Reading Time: 3 minutes In this blog we will understand how Multi threading works in JAVA and why is it so Important to understand? What is Multithreading? Multithreading in Java is a process of executing two or more threads simultaneously to maximum utilisation of CPU. Multi-threaded applications execute two or more threads run concurrently. Hence, it is also known as Concurrency in Java. Advantages of multithread: The users are not Continue Reading

Concurrency using Scala: Problems vs Tools

Reading Time: 5 minutes When we think about modelling a certain concurrent problem in Scala, There are a lot of tools in terms of libraries and frameworks to choose over vs the type of concurrency Problem. As part of this blog, we will be talking about where these tools can be utilised at their best. On a broad level, we can classify the tools into categories. There are concurrency Continue Reading

Achieving Concurrency with Akka Actors

Reading Time: 3 minutes Java comes with a built-in multi-threading model based on shared data and locks. To use this model, you decide what data will be shared by multiple threads and mark as “synchronized” sections of the code that access the shared data. It also provides a locking mechanism to ensure that only one thread can access the shared data at a time. Lock operations remove possibilities for Continue Reading

Java concurrency: Reentrant Locks

Reading Time: 3 minutes Hello readers! Welcome to another blog in the Java concurrency series. Today, we are going to look at the Reentrant Locks in Java. What it is, how to use it, and mainly, what is the difference between using Reentrant Locks and synchronization. So, let’s dive straight into it. Reentrant Locks Reentrant locks work just like the synchronized locks in java, but have much more facilities Continue Reading

Java Concurrency: Count Down Latches

Reading Time: 2 minutes Hello readers, and welcome to yet another blog in the Java Concurrency series. Today, we are going to look at the CountDownLatch class in Java, what it is and how to use it. So, let’s dive straight into it.