Non-Blocking

Introduction to callbacks in Node.js

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

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)

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

Knoldus Pune Careers - Hiring Freshers

Get a head start on your career at Knoldus. Join us!