Programming

Git Branching Insights

Sriram S

Git is the most popular version control system and in this blog, I will be sharing some insights of using Git in a professional environment. I will review two branching strategies and share additional insights in connection with Continuous Integration and Continuous Delivery/Deployment.

Using Docker with nginx and NodeJS

Sriram S

The best way to learn a new technology is by doing some hands-on practice or exercise. In order to learn the basics of Docker, I was scouting for a problem and the one that captured my imagination was how to use Docker for handling static web pages and dynamic REST APIs. In this 2-part blog, I will describe the problem and the solution first and then show how I implemented the solution using Docker.

Newton release install scripts for OpenStack

Sriram S
Newton is one the recent releases of OpenStack. I would like to share scripts that can be used to install the Newton release of OpenStack on Ubuntu 16.04 as per the installation guide. As part of my blogging, book writing projects, I have the need to install OpenStack many times. And I have been automating the installation by writing simple shell scripts. The result is a collection of scripts that should help you get going with OpenStack’s latest release.

PyCharm and OpenStack programming

Sriram S

OpenStack is based on the Python programming language and DevStack is the most common development and test environment for OpenStack. If you are doing serious, professional programming around OpenStack, it is very useful to have a proper development environment. In this blog, I will show you how to use the PyCharm IDE from Jetbrains for your OpenStack programming. I will use the Neutron ML2 driver code from my book OpenStack Networking Cookbook to guide you in setting up the PyCharm IDE.

Using SL4J and SimpleLogger with Servlets

Sriram S
We saw in my previous blog that SLF4J and SimpleLogger support the most critical logging requirements with ease. In this blog, we will see how to use SLF4J in a Servlets based application. The general practice is to initialize logging related objects and parameters at the startup of an application. In case of Servlets, any of the servlet in the Web Application can be invoked due to user action. So we need to use a different technique for initializing logging related objects.

Log API Comparison – Java Logger vs SLF4J

Sriram S

Log statements help record the flow of an application’s execution. Hence they are an important part of software coding process. For the Java language the common Log API libraries are Java Util Logger (commonly known as JUL), Apache Log4J, SLF4J etc. While these libraries support many advanced capabilities, most developers only use a handful of features. For example, ability to send log messages to files and the ability change log levels dynamically etc.

In this blog I will compare JUL against SLF4J and focus on these above mentioned features. Many will argue that this is not a fair comparison since SFL4J is really a facade and supports JUL as well. To clarify, I will compare the SimpleLogger that is bundled with SLF4J against direct JUL usage.

Logger statements – the performance impact

Sriram S
Logger statements are among the most heavily used statements in most Java applications. While the code contains Logger statement at different levels, the common practice is to set a default log level for the entire application. This will ensure that only important statements are logged by default. The general understanding is that the statements below the default log level will not be executed and hence there is no impact to performance.

HTML5 Local Storage – 5 Useful Tips

Sriram S

HTML5 Local Storage is a browser based key-value database that is available for client side applications. Java programmers (like me) will find that  HTML5 Local Storage is very similar to HashMap (or Hashtable). It is important to remember that Local Storage is available to client side applications even across browser restarts. In that context, Local Storage is similar to cookies. **But unlike cookies, Local Storage is not accessible to the server side applications. **Also cookies provide very limited storage (4 KB).