Future

MachineX: The alphabets of Artificial Neural Network – (Part 2)

Reading Time: 3 minutes If you are reading this blog, it is supposed that you have already done with Part 1 No???? Then visit to the previous blog The alphabets of Artificial Neural Network first and comeback here for an awesome knowledge about Neural network working. We got the basic understanding of neural network so let’s get into deep. Let’s understand how neural networks work. Once you got the Continue Reading

Akka Stream: Map And MapAsync

Reading Time: 2 minutes In this blog, we will discuss what are “map” and “mapAsync” when used in the Akka stream and how to use them. The difference is highlighted in their signatures:- Flow.map takes in a function that returns a type T, while Flow.mapAsync takes in a function that returns a type Future[T]. Let’s take one practical example to understand both:- Problem – Suppose we have a user with a userId and Continue Reading

Scala Extractors

Futures with Timeout in Scala

Reading Time: 2 minutes You all must be wondering timeouts in Futures, how is that possible? Don’t worry this is the right place to explore what do we mean by Futures with a timeout. I had encountered an issue of finding out if we can provide timeouts to futures in Scala without actually blocking them and guess what, this is possible. In this blog, we will be talking about Continue Reading

MachineX: A tour to KSAI – Neural Networks

Reading Time: 4 minutes In this blog we would look into how we can use KSAI; A machine learning library purely written in Scala using most of its feature and functional aspects of programming, you can read more about the library at KSAI Wiki, alternatively you can even fork the project from here, KSAI has a rich set of algorithms that address some of the vital problems in classification, Continue Reading

monads

Back2Basics: Futures in Scala

Reading Time: 3 minutes Hey folks, in this blog we will be discussing and try to gather some knowledge on how multithreading, concurrency can be achieved and asynchronous computations can be done on immutable values by the use of Futures. Why do we need Futures? The concept of Futures was introduced to allow concurrent programming and avoid wastage of resources which will be blocked in case of sequential code. Continue Reading

map(), flatMap() on Futures & Options in scala

Reading Time: 5 minutes In this blog, we would be looking at how map() and flatMap() operations work with Option and Future of scala, literally speaking both Futures and Options are very effective features of scala, A Future lets us have a value from some task on a differnt thread and Option provides us a hand from null of java as using null in scala is seen a very bad approach in Continue Reading

Future vs CompletableFuture in Java- #2

Reading Time: 3 minutes In our previous blog – Future vs CompletableFuture – #1, we compared Java 5’s Future with Java 8’s CompletableFuture on the basis of two categories i.e. manual completion and attaching a callable method. Now, we will be comparing them on the basis of next 3 categories i.e. Combining 2 CompletableFutures together Combining multiple CompletableFutures together Exception Handling Let’s have a look at each one of Continue Reading

Future vs CompletableFuture in Java – #1

Reading Time: 4 minutes This is Part 1 of Future vs CompletableFuture. In this blog we will be comparing Java 5’s Future with Java 8’s CompletableFuture on the basis of two categories i.e. manual completion and attaching a callable method. What is CompletableFuture? CompletableFuture is used for asynchronous programming in Java. Asynchronous programming is a means of writing non-blocking code by running a task on a separate thread than Continue Reading

Scala, Couchbase, Spark and Akka-http: A combinatory tutorial for starters

Reading Time: 5 minutes Couchbase and Apache Spark are best so far , for the in-memory computation. I am using akka-http because its new in the business. If you are not a big fan of akka-http and don’t think it is yet ready for production then you can take a look on this blog, which displays how to do the same task using Spray. If you are new to all Continue Reading

Scala Future Under The Hood

Reading Time: 3 minutes In the previous post, i was discussing about Scala ExecutionContext. As we know, for multithreading we need to maintain thread pools using ExecutionContext and by default ForkJoinPool is used because for accessing “multi core” processor. There are multiple thread pools are available in our java.util.concurrent.Executors utility class and as per our requirement we can create new one also. After all, Scala have concept of Future. Continue Reading

File upload using akka-http in Scala

Reading Time: 2 minutes Lets begin with some introduction of Akka-http first. Akka HTTP is a layer to expose Actors to the web via HTTP and to enable them to consume HTTP services as a client. It is not an HTTP framework, it is an Actor-based toolkit for interacting with web services and clients. This toolkit is structured into several layers: akka-http-core: A complete implementation of the HTTP standard, both Continue Reading

Knoldus Pune Careers - Hiring Freshers

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