Non-Blocking

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

Introduction to callbacks in Node.js

Reading Time: 2 minutes If you are familiar with JavaScript, you may have got acquainted with the concept of callbacks. If not, no worries, as here we will be discussing some basics of callbacks and how they actually work with respect to node.js. You may already know that the type of JavaScript functions is Object. So, just like any other object such as Array or String, we can pass Continue Reading

A Non-blocking “Email sending” functionality in Scala

Reading Time: < 1 minute In our last blog “Adding an Email Sending Functionality in Play using Scala” we explained how to include an Email sending functionality in a Play Scala Application. But the way in which we implemented it, made it a Blocking one i.e., application will wait until email has been sent. In this blog we will explain, how to make the Email Sending functionality a Non-blocking one. By making Continue Reading

Employee-Self-Service: Reactive and Non-Blocking Database Access using Play Framework and Anorm – (Part-3)

Reading Time: 1 minute Last week, We have added Reactive and Non-Blocking behaviour in Employee-Self-Service  application. Now we have implemented Database Access as Reactive and Non-Blocking: Before def list() = Action.async { implicit request => Employee.list match { case Right(data) => Promise.timeout(Ok(html.list(data)), 1 seconds) case Left(error) => Promise.timeout(Ok(html.list(Nil)), 1 seconds) } } After def list() = Action.async { implicit request => val futureEmpList = scala.concurrent.Future { Employee.list } val timeoutFuture = Promise.timeout(“Oops”, 10.second) Continue Reading