Tuesday, August 4, 2015

ThreadLocal and Inheritable ThreadLocal

I am not going to share any new concept or library of java. My topic of this post related to ThreadLocal that is with us since JDK version 1.2 but after discussion with many developers with in my circle I came to know that many developer doesn't know it feature and functionality.

Thread Local storage is just like class that can store/return object with in thread scope. Just like application context, session or request scope with in servlet.

Thread-local storage (TLS) is a computer programming method that uses static or global memory local to a thread [wikipedia].

ThreadLocal instances are typically private static fields in classes that usually maintain thread state 

This class is very useful if you want to share common objects into different applications layers like users credentials, connection objects etc. I usually use this class after wrapping it in my ThreadContext class. Following are the code of my ThreadContext class. 

To save my common object with in thread I usually call it's static put method and when I need to use that saved object I call it's static object.  

Tuesday, August 26, 2014

D3Js Base Charting libraries

I found very good link in which some one listed all available d3js base charting libraries. Below are details
Reference : https://gist.github.com/eabait/9916975

D3JS Drawing library & Gauge Chart

Today I was exploring different kind charting libraries to develop gauge chart in JavaScript. I explored the following charting libraries and finally developed gauge chart using d3js. we can develop extremely complicated graphs and charts using  d3js because it is drawing library and the good thing is that it will renders it's results in Scalable Vector Graphics (SVG).
The Javascript  libraries I explored for gauge charts are :
  • Jqplot Provide simple meter in non attractive manner
  • Flot  Better the Jqplot but but still less professional 
  • Google Chart Professional output and it is also generating cross browser compatible HTML/SVG chart like d3js
  • Fusion Chart(Commercial) professional output but not free

You can find below chart example from my github account. I took and extend example from following example https://gist.github.com/tomerd/1499279

Friday, May 23, 2014

Verified Certificate after Completed Full Course

Below in my verified certificate, I got this after completed full course including exercises , final project and  exit interview in which Udacity asked question about Hadoop & MapReduce and my final project.