Future

MachineX: A tour to KSAI – Neural Networks

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

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

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

Akka http with json4s

Akka Http uses the spray-json library for JSON support. But a few days back while working on a project which was using the json4s library for marshalling/unmarshalling, I got stuck during parsing of JSON request and extracting that parsed values into my target Scala data model.

Future vs CompletableFuture in Java- #2

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

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

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

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

Knolx: Effective way to code in Scala

In this presentation, we are going to discuss about how to write  effective code in  Scala and also talk about Scala ExecutionContext and how create own  ExecutionContext.     Below is the Youtube video of the this session.  

File upload using akka-http in Scala

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

Getting started with ReactJS, Play 2.4.x, Scala, Anorm and WebJars

playing-reactjs This blog describes a basic example to render UI using React(A JavaScript library for building user interfaces) with Play 2.4.x, Scala, Anorm and WebJars. It also demonstrates the use of evolution in Play 2.4.x This is a classic CRUD application, backed by a JDBC database. It demonstrates: Handling asynchronous results, Handling time-outs Achieving, Futures to use more idiomatic error handling. Accessing a JDBC database, Continue Reading

Tutorial #3: Getting started with HTTP Programming in Play Framework

We have already discussed about the Play development environment in Tutorial #1 and use of WebJars, jQuery, Bootstrap & Bootswatch with Play in Tutorial #2 So, In this blog we would discuss about HTTP programming in Play Framework which would drive us through rest of the tutorial series.  We would be running this blog as a series and we would be looking at various aspects Continue Reading

AWS Services: AWS SDK on the Scala with Play Framework

playing-aws-scala The following blog and attached code represent a simple example of Amazon Web Services in the Scala way with Play Framework using AWScala but in this blog I have implemented only Amazon Simple Storage Service (Amazon S3) functionalities. AWScala: AWS SDK on the Scala REPL AWScala enables Scala developers to easily work with Amazon Web Services in the Scala way. Though AWScala objects basically Continue Reading

%d bloggers like this: