Friday, 12 January 2018

Im authoring this book: Scala Reactive Programming

Dear Friends,

As you know, I have shared many tutorials to you on Java and Scala related technologies through the following websites/blogs:
I got fantastic response from you and thank you so much.

With this confidence, I have started authoring a Scala Book through Packt Publishing and would like to share those details with you now.

Book Title: Scala Reactive Programming
Technology Stack: 
Scala, Play Framework, Akka Toolkit, Akka Streams, Lagom Framework, ConductR

Brief Table of Content:
Part 1- Functional and Asynchronous
     Chapter 1: Getting started With Reactive and Functional Programming
     Chapter 2: Functional Scala
     Chapter 3: Asynchronous Programming with Scala
Part 2 - Develop FRP Applications
     Chapter 4: Building Reactive Applications With Akka
     Chapter 5: Adding Reactiveness with RxScala
     Chapter 6: Extending Application with Play
Part 3 - Reactive Applications with Akka Streams
     Chapter 7: Working with Reactive Streams
     Chapter 8: Integrating Akka Streams to Play Application
Part 4 - Extend, Test & Deploy Reactive Microservice Architecture
    Chapter 9: Reactive Microservices With Lagom
    Chapter 10: Testing Reactive Microservices
    Chapter 11: Managing Microservices in ConductR
    Chapter 12: Securing Scala Reactive Microservices
    Chapter 13: Reactive Design Patterns & Best Practices

We are going to release this book by the End of Feb 2018.

Thank you for supporting me.

Friday, 1 December 2017

Know version in Ubuntu Linux: Java, Scala,Docker, Python, Sbt

In this post, we will discuss about how to know the current version of your installed software in Ubuntu Linux.

Let us discuss about the following softwares now:

To know Java Version:

ram:~$ java -version
java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)

To know Scala Version:

ram:~$ scala -version
Scala code runner version 2.11.7 -- Copyright 2002-2013, LAMP/EPFL

To know Python Version:

ram:~$ python --version
Python 2.7.12

To know Docker Version:

ram:~$ docker -v
Docker version 1.12.6, build 78d1802

To know SBT Version:

ram:~$ sbt sbtVersion
[info] Loading global plugins from /home/rambabuposa/.sbt/0.13/plugins
[info] Loading project definition from /home/rambabuposa/project
[info] Set current project to rambabuposa (in build file:/home/rambabuposa/)
[info] 0.13.16

To know Lightbend ConductR Sandbox Version:

ram:~$ sandbox version

Supported API version(s): 1, 2

Thank you for reading my tutorials. Please support my blog by clicking some ads in my posts.

Please let me know if you need any more commands to publish here.

Happy Learning!

Thursday, 16 November 2017

Github: How to keep Your Forked Repo Up-to-Date?

Sometimes, when we don't have "write" access to your working repository, we cannot create a new branch to apply your changes or we cannot push our changes to master.

We cannot create PR (Pull Request) to review your changes by peers.

In this case, we cannot use "Cloning", should use "Forking" concept.

Github Forking:

Forking is different from Cloning. Login to your profile and click on "Forking" button or link available at top right corner.

It creates same repository into your github profile. Then fork it and work on changes.

Now we don't need to create a Branch as we are working on forked repository.

Just pull your changes to your forked master:   

$ git pull

Forking Problem:

Above procedure works as long as you don't see the following message:


Lets us ORIGINAL_REPO  is main repository and FORKED_REPO is our forked repo created from ORIGINAL_REPO.

1. Clone your fork:

git clone<user-name>/FORKED_REPO.git

2. Add remote from original repository in your forked repository:

git remote add upstream git://<user-name>/ORIGINAL_REPO.git
git fetch upstream

3. Updating your fork from original repository to keep up-to-date changes:

git pull upstream master

4. Push changes to your forked repository:
git push

Thank you 

Wednesday, 8 November 2017

Install Firefox old version in Ubuntu (Linux)

Sometimes, we need to use old version to test some kind of testing like Acceptance tests, Performance tests, Browser Stack Testing etc.

My Linux system has default latest version of Firefox 55 and my automation tests required Firefox version 45.

In this case, we can NOT use our default latest version of browser.

I faced same issue with my current project with Firfox browser in Ubuntu (Linux) and fixed it by doing the following steps:

ram:~$ apt-cache show firefox | grep Version
Version: 55.0.2+build1-0ubuntu0.16.04.1
Version: 45.0.2+build1-0ubuntu1

It list out all available Firefox browser versions in your system.

To deploy the required version, please use this command:

ram:~$ sudo apt-get install firefox=45.0.2+build1-0ubuntu1

Now, we can continue our testing using firefox version 45.

Thank you so much for reading my tutorials.

PS:- Please support my blog by clicking some ads.

Thursday, 2 November 2017

Play 2.6.x: Joda DateTime Format not working

In Play Framework 2.6.x, Joda DateTime Format (that is READs and WRITEs) is not working. When we use something like below:

(JsPath \ "joiningDate").read[LocalDate] 

We will see the following error message:

No Json deserializer found for type org.joda.time.LocalDate. Try to implement an implicit Reads or Format for this type.

To fix that issue, we need to do the following two setps:

1. Add the following entry into your build.sbt file

libraryDependencies += "" % "play-json-joda_2.12" % "2.6.6"


scalaVersion := "2.12.2"
libraryDependencies += "" %% "play-json-joda" % "2.6.6"

2. Add the following imports to your Model file
import play.api.libs.json.JodaWrites._
import play.api.libs.json.JodaReads._

They have separated the Joda Date and Time library into a separate module:

That's it.

Thank you for reading my tutorials.

Thursday, 20 July 2017

Linux: Know PID running at a specific port number

To know the process id which is running on a specific port number

$ sudo netstat -nlp | grep :1212
   tcp6       0      0 :::1212        :::*   LISTEN      21341/java 

$ lsof -i 

It displays the information of all currently running process like PID, port number, user etc.


$ lsof -i
java       60729   ram  7188u  IPv6  121212      0t0  TCP *:1291 (LISTEN)
java       60850   ram  7181u  IPv6  1212        0t0  TCP *:1195 (LISTEN)
java       60949   ram  8173u  IPv6  1212        0t0  TCP *:2272 (LISTEN)
java       70040   ram  1971u  IPv6  1213        0t0  TCP *:2230 (LISTEN)
java       70142   ram  9072u  IPv6  11111       0t0  TCP *:4449 (LISTEN)
java       70232   ram  1365u  IPv6  111         0t0  TCP *:5585 (LISTEN)
java       70318   ram  1476u  IPv6  111         0t0  TCP *:6514 (LISTEN)
python     70400   ram    43u  IPv4  2222        0t0  TCP *:1232 (LISTEN)
java      180595   ram  3402u  IPv6  22222       0t0  TCP *:3232 (LISTEN)

Then run kill command to kill it.

$kill -9 <PID>

Thanks you.

Wednesday, 17 May 2017

Activator will be EOL-ed on May 24, 2017.

Activator will be EOL-ed on May 24, 2017.

We’re making it easier and simpler for developers to get started with Lightbend technologies.

This unfortunately means that future releases of Play, Akka and Scala will no longer include Activator support, and Lightbend’s Activator server will be decommissioned by the end of 2017. Instead of supporting Activator to create and set up development projects, we'll be supporting standard Giter8 templates for sbt users and Maven archetypes for Maven users.

So going forward,
To create new Lightbend projects
Instead of using the Activator command, make sure you have sbt 0.13.13 (or higher), and use the “sbt new” command, providing the name of the template.

For example, “$ sbt new akka/hello-akka.g8”. You can find a list of templates here.

Also, as a convenience, the Lightbend Project Starter allows you to quickly create a variety of example projects that you just unzip and run.

To create new templates

If you want to create new templates, you can now do that in Giter8.

To migrate templates from Activator to Giter8
If you created Activator templates in the past, please consider migrating them to Giter8 with this simple process.

Thank you!