Author Archives: cyberaka

About cyberaka

I am an experienced Senior Solution Architect with proven history of designing robust and highly available Java based solutions. I am skilled in architecting designing and developing scalable, highly available, fault tolerant and concurrent systems which can serve high volume traffic. I have hands on experience in designing RESTful MicroServices architecture using Spring Boot, Spring Cloud, MongoDB, Java 8, Redis and Kafka. I like TDD (JUnit), BDD (Cucumber) and DDD based development as required for my projects. I have used AWS primarily for cloud based deployment and I like developing cloud enabled POC as a hobby in my spare time. I have deigned and developed CI/CD pipeline using Jenkins and leveraged Docker, Kubernetes for containerizing and deploying some of my applications. I am highly experienced in creating high performing technical teams from scratch. As an ex-entrepreneur I am very much involved in the business side of the IT industry. I love interacting with clients to understand their requirements and get the job done.

How to find Linux distribution and kernel version

In order find out what version of Linux you are running you can execute either of the following commands:

  • cat /etc/*-release
  • lsb_release -a
  • cat /proc/version
  • dmesg | head -1

To find out the kernel version of Linux you can execute either of the following commands:

  • uname -a
  • uname -mrs

Disclaimer: These commands worked for me on Debian Linux.

Update for Oracle Linux

The following commands gave accurate information about OS and release numbers on Oracle Linux.

rpm -qf /etc/redhat-release

oraclelinux-release-6Server-8.0.3.x86_64
cat /etc/issue.net | head -1

Oracle Linux Server release 6.8

 

Multi tabbed windows explorer

In this world of multi-tabbed browsing I find it inconvenient that Windows Explorer has no multi tabbed support. I did some search and found out Clover. I downloaded and installed this tool and voila my Windows Explorer has got tabs. The tool itself is simple and integrates seamlessly with Windows Explorer in Windows 8. I have not had time to check it on my Windows 7 laptop, maybe sometime soon I will post an update.

Creating console based applications in Java

Writing a console based app might sound strange to some Java programmers but for some specific purposes writing a console based application is a necessity. For example let’s say I have write an application which needs to be monitored via SSH. In that either we have to come up with some elaborate command line arguments or special purpose log files. However another approach is write the application and give it a text based GUI which is accessible via textual console like putty, konsole, xterm, gnome-terminal etc. The closes thing that comes to mind is ncurses coming from the C world. We have something similar for Java also available and based on some reports I feel that they are stable enough to be used in any production environment which have need for a light weight, low bandwidth textual client.

  1. Lanterna – 100% Java solution. Very interesting.
  2. Blacken – Not a curses library an has it’s own renderer. The API is however curses-like.
  3. Java Curses Library – It’s built upon the Unix curses windowing system.
  4. Charva – A reliable tool that allows rapid building of UI using OOP approach. Existing UI programmers will definitely like it. It however uses JNI.

 

Production helper utility for Java team

I have been thinking about going through some of these tools to get more productive in deploying / delivering Java based web apps to the team:

Drop Jar is a helpful tool to share jar files.

Drop Wizard is a helpful tool for delivering production read jar files.

Spring Boot allows developers to create web apps easily using convention over configuration.

Shade Plugin allows a Maven based build to overcome duplicate / incompatible versions of libraries. If you have been bitten by incompatible log files you know what I mean.

Open IoT Stack (Internet of Things)

I came across this article on DZone which talks about Open IoT Stack for Java. This stack is envisioned to allow developers to make apps on light weight devices to build IoT solutions. This press release from Eclipse drives home the point as to why IoT is no longer a hype and much more of an imminent reality in the near future. Another report from Vision Mobile talks about how a network of app entrepreneurs might push IoT to unprecedented heights.

Akka for Reactive Programming

As I mentioned in my previous post reactive programming has a compelling reason for adoption as it allows developers to focus on their data flow and business logic. Akka has come across as a tool to enforce reactive programming. It allows you to create distributed and concurrent applications of high complexity in shorter and more manageable time frame.

Reactive programming

Reactive Programming seems to be the rage nowadays (as observed in blogs and newsletter). Out of curiosity I looked it up and was impressed with what it is capable of. Turns out that this is a declarative approach which allow code to react to changes in referenced values.

Let’s understand it from the perspective of a spread sheet. Lets say cell A1 has the formula “=B1+C1”. Now typically we expect that if we change the value in B1 or C1 then the value of cell A1 will be updated automatically.

Keeping this example in mind now lets see how  this can work in programming world. Lets say we have an expression that says A = B + C. When this expression is executed in our code then the value of A is updated whenever this expression is ‘executed’. Once this is done the value of B can be changed or the value of C can be changed without reflecting on the value of A. To enforce a ripple effect back to A like we observed for cell A1 in spreadsheet we have to devise elaborate observers / listeners on the values of B and C to update A whenever the value of B or C change. In a real life production environment this simple expression can be replaced with more complex algorithm or data flow and you have a situation which can quickly get out of hand and might be difficult if not impossible to debug.

In reactive programming we react to changes. So in the above situation the value of variable A will be updated as and when the value of B or C changes.

This concept has been well explained in a dzone article.

FireFox OS

I have heard some good things about FireFox OS and with recent launches for ultra cheap FireFox OS based handsets in India I think that HTML based development of apps for this OS will be a different experience. I have had some reserved feelings about HTML5 development on Android and iOS platform. Somehow I felt that HTML5 development was feature limited on the mobile platform. However with FireFox OS I think I would definitely give it a try and post my experience on this blog.

Eclipse Maven – Download Sources and JavaDoc

Eclipse Maven integration has improved quite a bit and I find it somewhat comparable to the excellent Maven integration provided by Netbeans. I recently required to debug third party jars and I needed their sources for this purpose and as a general practice I always download the javadoc for any third party library I use. This is easily done in Eclipse using the following approach.

Do it per project

Eclipse Maven Context Menu for Project

Eclipse Maven Context Menu for Project

Do it for all projects

Eclipse Maven Properties Dialog

Eclipse Maven Properties Dialog