Sunday, March 19, 2017

Monitoring & Alerting for Micro Services


I got opportunity to design and develop Monitoring and Alerting framework for all the micro services deployed in the organisations. Monitoring majorly classified into 3
  1.   System Monitoring
  2.   Application Monitoring
  3.   Server Monitoring 
Any abnormolity on any of the above 3 will raise an alert. Alert can be   "Slack Notification",  "Email",  "Pager" and "Call".

NOTE: This is not for micro services tracing. For micro services tracing sophisticated open source tools available like Jaeger and  zipkin

 Monitoring & Alerting Tools used:
   Sensu    
  Uchiwa  
  Pagerduty 

Technologies:
 Fluentd           -  Used for data/log forwarding
OpenTSDB      - Used for Time Series Data. Replaces old RRD tools
                          ( competitors would be InfluxDB, Druid, Cassandra)
ElasticSearch   -  Used for log search (Ex:  "ERROR"  count > 1  on app1 raise an alert)


Monitoring Types:

System Monitoring:  
        includes CPU, Disk, I/O, Processes,Virtual Memory, DHCP, Network etc.
Application Monitoring : 
        includes Failed Services, Batch/Cron jobs, Cache monitoring,
        DB monitoring, transaction, 3rd party interactions etc.
Server Monitoring:  
       Apache Tomcat, Ngnix, HAProxy , Request/Response latency, Server health etc


Scripts has to write for all of the above monitoring modules. Scripts can be written in Ruby where Sensu has many sensu plugins which will help to have less number of lines in scripts.

Deployment Topology:


All scripts has to upload to chef server with version. Project configuration and other artefacts will be uploaded to chef-server.

Chef-client can be run from development machine/laptop.

Micro service will be up and running with all monitoring scripts, configuration files, application jar,fluentd, opentsdb agents.
Below shows final Java micro services which will be up and running.






Detail explanation:

Flow - (a)
Sensu agent runs on Micro service. Agent periodically executes scripts(& server monitoring) and sends output to sensu server.
Sensu Server  aggregates data from the micro services.  Sensu forwards alerts to PagerDuty if any threshold breach by a sensu metric.
Uchiwa is the dashboard for Sensu. It gives nice alerts view in order Data centre, VMs, Metrics.

Use Cases:  CPU, Disk, File I/O, Server health etc.

Flow - (b)
Fluentd agent runs on micro service is a data forwarder. Fluentd listens on a application log file path and forwards data to Elastic Search.
ElasticSearch does indexing for the log data. Error count cron job runs on elastic search which does search on "error" count on logs group by application. If there is any error on the log script forwards to sensu server which in turn converts to Pager Duty alert.

Use Cases:  Server access logs( tells how many 401 Rest codes group by Region and application,   Application logs error count group by Region and application)

Flow - (c)
This will be very interesting use case. I have used lot of time series metrics forwarded to OpenTSDB. But I would like to mention metric which helped a lot. REST call requests are recorded as time series metrics.  Example:   (Rest EndPoint, timestamp,  hitCount) .

Use Cases:
For every rest call OpenTSDB client on micro-service sends data to OpenTSDB server.   OpenTSDB graph shows traffic group by Region and Date. Which helps to understand how HTTP traffic on each data centre.


Example:
 How to use sensu checks.

Below few checks on RAM & Disk

sensu_check 'ram' do
  command 'check-ram.rb -w 20 -c 10'
  interval node['monitor']['check_interval']
  subscribers %w[all]
end

sensu_check 'disk' do
  command 'check-disk.rb'
  interval node['monitor']['check_interval']
  subscribers %w[all]
end

Above ruby script raises alert if Ram breaches threshold.  File  "check-ram.rb" will be available at Checf cookbooks as default file
https://github.com/sensu-plugins/sensu-plugins-memory-checks/blob/master/bin/check-ram.rb

Subscribe: is for notification.





Sunday, October 23, 2016

Data pipeline design for Mobile Data Traffic using AWS


I worked for a Mobile Operating System Company which has 50 Million + user base across the globe. All these mobile generates a billion data per day.

What kind of Mobile data ?
Every user activity on the mobile is treated as a data.  Below are few examples
a) Install/Uninstall app
b) Open an app
c) Closing an app
d) Total time spend on an app
e) Network connectivity details
f) Heart beat  (Contains  OS build no, single sim/dual sim, network operator names)


Problem:
Organisation needs data collection, data pipeline and analytics for all the mobile data traffic.


Solution:
I have leveraged AWS services(EC2, Route 53, ELB, EBS, S3, Lambda, Redshift) for implementation. Not just pipe line design and analytics also implemented robust monitoring and alerting system for the entire pipeline. Also took approaches which will minimise operational cost of AWS. Lot of factors tested(Apache Benchmark testing) and optimised while implementation.

Overall Architecture

STAGE - 1   (DATA Collection & Data Enriching)

Data Collection (Shopvac):  Code name is Shopvac
  Shopvac service should be front facing, low latency and high throughput.  Shopvac Service is hosted on a EC2. Below is the network topology diagram before i go deep about service.





Mobiles:
    All mobiles post data using  HTTP POST on a host where DNS resolves host to a AWS Route 53.

AWS Route 53:
   Route 53 does simple redirection to AWS ELB.

AWS ELB:
     ELB has list of services where java process is running for data collection. In Non Amazon world the same has to be done using  Zookeeper/Etcd for Service discovery.

Shopvac Service: (Data Collection)
    Its a light weight java process running. It has a REST END Point which will be listening for mobile POST data.  End point stores data to local file system ( /var/app/shopvac/metric/<eventname.json>) .

This file system acts as a buffer. FluentD will listen on this path and forward data to Amazon S3.
FluentD forwards when ever file size reaches 100MB size or 5 secs.

Fluentd is an Open Source log forwarder like Logstash, SysD, CollectD, RSyslog etc.
Fluentd parses data for event name and creates a file with event name if not exist otherwise append data to the file.

Below Shopvac Service insight




Every service developed in organisation has to be bootstrapped with chef with above process running.

Java Process(Vertx) : Used Vertx Async programming. Vertex has Rest End point which will get invoked on mobile POST. Data will be enriched for example stores City, State and Country information(gets from Latitude and Longitude) to the existing metrics.

Java process stores data on local file system.

FluentD:  Fluentd listens on local files system where metrics are storedFluentd forwards mobile data to AWS S3.  Also forwards logs to ElasticSearch.

OpenTSDB Client:  All time series data are written to OpenTSDB. One most important data we store in OpenTSDB is REST End point call.  When ever REST point is invoked it is stored in time series data.  This will give insight how many times Rest end pint is invoked per day, per week, per hour this will give traffic insight. What duration has peak traffic on the server. 

Sensu Client :  Sensu scripts will be deployed along with chef. Basic scripts like Disk utilisation, RAM utilisation, Server health a lot other metrics sense will report to sense server. On Abnormality or threshold breach Sense  Server will alert through Pager Duty.


STAGE - 2   (Data Processing)

AWS-S3 will be source of truth. All types of metrics will be forwarded blindly to S3.

AWS Lambda (Serverless Architecture)
will listen on S3 bucket and filters for interested metrics. Forwards interested metrics to RedShift. Instead of directly forwarding to Redshift forwards to CMET service.(developed as a proxy service internally).

Note: Lambda will be charged based on cpu cycles it spent with the code. So code on lambda should be as less as possible and also should be error free. It is difficult to debug Lambda.





Note(Non-Amazon World):
S3 has to replace with Kafka
Lambda replace with Kafka Consumers/Storm

STAGE-3  (DATA Storing)

Selected Redshift as Storage because of its advantages.

Lambda can directly forward metrics to Redshift but this will not be a right approach. As Data Warehouse will be exposed to events which are abnormal in behaviour and also every DB comes with concurrent DB connections at a time. There is a need for intermittent service which acts as a proxy to Redhisft. So CMET is a service which acts as a proxy and do connection management and dropping long holding connections.


One good use case of CMET:

  1.  Long running queries will be stopped and will be marked as failure. So that lambda will retry. This helps when Redshift can't respond nor process at that point of time. Also helps reduce load on Redshift.
  2.  Exposing read connections(GUI Visualization) for set of users and write connections for users like AWS like Lambda and Admin.











 









Saturday, January 31, 2015

HTTPS

Below content contains
1) What is HTTPs
2) Server Authentication
3) Important check list to follow for having secure website with good performance.
(web site links to check your server security online. Moazilla standards for configuring TLS on server)
4) Reasons for insecure communications over https.


Even static data should be encrypted. That's the best way to keep website secure.

In reality all the below 3 give secure website.
1)Authentication
2)Data Integrity (Data doesn't change between client and server)
3) Encryption  (can any one see my conversation)


All the above 3 are taken care by Transport Layer Security(TLS)

HTTPS ==>    HTTP running on top of TLS

    HTTP   (http running on top of TLS)
    TLS  
    TCP
     IP

Do we need to encrypt of all of the web data ?
My answer would be yes.

why we need to ?
For example casual surfing  at restaurants with out https can give information to
hackers that what sites being visited if it is financ.yahoo.com. what shares
you are interested etc.

Hackers can change text, password etc if client doesn't connects to right Server. That's the reason we need Server Authentication.
1) If client wants to connect to the right server. Client has to connect over
https. Over https browser downloads server signed certificate(public key) this gives guarantee that client is connected
to right server.


Advantage of TLS
1) Passive and Active attackers cant listen in because we are encrypting the data.
2) Attacker cant tamper as data is check suming.
3) attackers cant impersonate.


Configuring TLS
1) Arent Certificate expensive
2) wont it make server and site slow ?
3) what are the configuration best practices

Important check list need to follow in the order
1) Get a 2048-bit TLS Certificate
2) Configure TLS on your servers.
3) Verify TLS server configuration
4) Monitor performance: resumption rate etc.
5) Tune Server configuration. Cache etc.
6) Investigate SPDY & HTTP2.0

1)Get a 2048-bit TLS Certificate
 If there is any 1024-bit certificate on server better to migrate to 2048-bit.
Certificates are below types.
a) Free certificates  ( which are for non commerfical use from StartSSL)
b) Single host     ( google.com)
c) Multi-domain   (google.co.in, google.co.us, google.co.uk)
d) Wildcard       (*.mysite.com)

2) Configure TLS on your servers
More about Server Side TLS configuration in the blow link
https://wiki.mozilla.org/Security/Server_Side_TLS


3) Verify TLS server configuration
 How to verify TLS Server configuration (Qualys provides online to test Server, browser etc)
https://www.ssllabs.com/ssltest/
It gives score and useful tips. Before you access any website you can check that site security aspects using this tool.

4)   Monitor performance: resumption rate etc
Usually cryptography stuff consumes more CPU. Modern CPUs are designed to handle huge data traffic over TLS
Assymetric cryptography - verify the public certificate and do public crypto  (This one is expensive)
Symetric Cryptography - how we encrypt the application data

5) Tune Server configuration
Using HTTP Keep alive and session resumption doesn't require full handshake. So handshake doesn't dominate CPU Usage.
.

6) Google developed a protocal SPDY which gives better page load performance over regular https connections.
SPDY1&2 not only improves client performance also does on Server. SPDY allows single connection to server instead of many
connections to server. Single connection means few handshakes, fewers sockets, few buffers to allocate. SPDY consumes less memory but
more CPU and also fewer worker threads.

Few more reasons for insecure communication.

Few reasons for broken cert between client and server. Developer  points
1) Incorrect host name return by server in the cert.
2) Incomplete Certificate Chain
3) Expired Certificates.

Insecure references 
Some secure websites having javascript/css code like below.
<script src="http://aaa.com/script.js"></script>
Some browsers wont allow(http:)  type of communication. This script is blocked will not
execute. If browser allows also it is secruity leak.

Use Protocol relative URI's. Protocol relative uri's will be
<script src="//aaa.com/script.js"></script>

Even secure website can have insecure hrefs
<a href="http://abc.com"/>
use Protocol relative urls
<a href="//abc.com"/>

Insecure re directions are expensive
1) https -->redirect to --> http --> again redirect to https


HSTS (HTTP strict transport security) eliminates  HTTP--> HTTPs redirects (costly operations)

Server can return with this header when returns a page.
Strict-Transport-Security: max-age=20491234; includeSubDomains

max-age in seconds. Remember this policy(HSTS) for this many seconds.
includeSubDomains is optional. says remember this policy for all the sub domains.











Wednesday, April 24, 2013

Java7 NIO WatchService

Java 7: NIO WatchService

In my previous post I have written many of the Java 7 features for developing Java Telnet Server.
Here I want to go deep into one such feature WatchService.

The WatchService is a very interesting feature of the new java.nio.file package in Java 7.
One of the more interesting is the WatchService, adding the capability to watch a directory for changes.
   
The WatchService maps directly to the native file event notification mechanism, if available. If a native event notification mechanism is not available, then the default implementation will use polling. As a result, the responsiveness, ordering of events and details available are implementation specific.
 
Source Code:

Watching Directory:
We have to create a File Path for the specific directory we want to watch.
Path:
    Path faxFolder = Paths.get("C:\\foo");

The Path interface implements the register method that takes a WatchService object and varargs of type WatchEvent.Kind as arguments. There are 4 events to watch for:
ENTRY_CREATE
ENTRY_DELETE
ENTRY_MODIFY
OVERFLOW
While the first 3 types are easy to understand, OVERFLOW indicates that events may been lost or discarded. A WatchService is created by calling FileSystem.newWatchService().
Watching a directory is accomplished by registering a Path object with the WatchService:

WatchService watchService = FileSystems.getDefault().newWatchService();
 
faxFolder.register(watchService,   StandardWatchEventKinds.ENTRY_CREATE,  StandardWatchEventKinds.ENTRY_DELETE, 
StandardWatchEventKinds.ENTRY_MODIFY);

WatchKey watchKey = watchService.take();

As you can see above code register method returns a watchKey.  The WatchKey is a token that represents the registration of the Path with the WatchService.

The WatchKey
As a result of the registration process, the WatchKey is in a ‘ready’ state and is considered valid. A WatchKey remains valid until one of the following occurs:
  1. WatchKey.cancel() is called.
  2. The directory being watched is no longer available.
  3. The WatchService object is closed.
Checking For Changes
When a change is detected, the WatchKey state is set to ‘signaled’ and it is placed in a queue for processing.  Getting WatchKeys off the queue involves calling WatchService.poll() or
WatchService.take().
Here is a basic example:
WatchKey watchKey = watchService.poll(60,TimeUnit.SECONDS);
 //this will retrieve all the events for this watch key
List<WatchEvent.Kind<?>> events = watchKey.pollEvents(); 


boolean value = watchKey.reset()

The "reset" method sets the WatchKey state back to 'ready'(meaning listen for events) and returns a boolean indicating if the WatchKey is still valid. If there are any pending events, then the WatchKey will be re-queued, otherwise it will remain in the ready state until new events are detected.

How to process events
Now that we have detected an event, how do we determine:
  1. On which directory did the event happen? (assuming more than one directory registered)
  2. What was the actual event? (assuming listening for more than one event)
  3. What was the target of the event, i.e what Path object was created,deleted or updated?
//WatchKey watchable returns the calling Path object of Path.register
 Path watchedPath = (Path) watchKey.watchable();

for (WatchEvent<?> event : watchKey.pollEvents()) {
   
   //returns the event type
     StandardWatchEventKinds eventKind = event.kind();
  
   //returns the context of the event
     Path target = (Path)event.context();
}


There are two things that about the WatchService.
The WatchService does not pick up events for sub-directories of a watched directory.
We still need to poll the WatchService for events, rather than receive asynchronous notification.


 Here is the sample output:




Friday, April 5, 2013

RabbitMQ using Java

RabbitMQ is an open source message broker which implements AMQP messaging protocol. It also has multiple client libraries (Java, .NET, Erlang) which can be used to send/recieve AMQP messages to/from an AMQP broker.

It's based on Erlang/OTP which gives very good scalability. Finally, you should also look at QPID, an implementation by the Apache Foundation which is supported by Red Hat and Microsoft, and OpenAMQ.

In this post I’m going to explain how to use the RabbitMQ Java Client Library to send and Receive messages. Since RabbitMQ also can act as an AMQP server, I’ll be using it in this post.

It doesnt require any server.

What is AMQP?AMQP (Advanced Message Queuing Protocol) is a networking protocol that enables conforming client applications to communicate with conforming messaging middleware brokers.
Brokers and Their RoleMessaging brokers receive messages from producers (applications that publish them) and route them to consumers (applications that process them).
Since AMQP is a network protocol, the producers, consumers and the broker can all reside on different machines.

It implements a broker architecture, meaning that messages are queued on a central node before being sent to clients. This approach makes RabbitMQ very easy to use and deploy, because advanced scenarios like routing, load balancing or persistent message queuing are supported in just a few lines of code. However, it also makes it less scalable and slower because the central node adds latency and message envelopes are quite big.

Message Queue Servers
Message queue servers are available in various languages, Erlang (RabbitMQ), C (beanstalkd), Ruby (Starling or Sparrow), Scala (Kestrel, Kafka) or Java (ActiveMQ).

Sparrow
  • Sparrow is a lightweight queue written in Ruby that “speaks memcache”
Starling
  • Starling is a Message Queue Server based on MemCached
  • written in Ruby
  • stores jobs in memory (message queue)
Kestrel
  • Starling clone written in Scala (a port of Starling from Ruby to Scala)
  • Queues are stored in memory, but logged on disk
RabbitMQ
  • RabbitMQ is a Message Queue Server in Erlang
  • stores jobs in memory (message queue)
Apache ActiveMQ
  • ActiveMQ is an open source message broker in Java
Beanstalkd
Kafka
  • Written at LinkedIn in Scala
  • Used by LinkedIn to offload processing of all page and other views
  • Defaults to using persistence, uses OS disk cache for hot data (has higher throughput then any of the above having persistence enabled)
  • Supports both on-line as off-line processing
 HornetQ is also an option you can look into, it is JMS Complaint, a better option than ActiveMQ.

Nice working Example is given in below link

Source Code Link


Core Java to create a RabbitMQ connection. It is documented very well in RabbitMQ site.

create a connection to the server:
       ConnectionFactory factory = new ConnectionFactory();
    factory.setHost("localhost");
    Connection connection = factory.newConnection();
    Channel channel = connection.createChannel();
The connection abstracts the socket connection, and takes care of protocol version negotiation and authentication and so on for us.

we must declare a queue for us to send to; then we can publish a message to the queue:
        private final static String QUEUE_NAME = "hello";
       channel.queueDeclare(QUEUE_NAME, false, false, false, null);
    String message = "Hello World!";
    channel.basicPublish("", QUEUE_NAME, null, message.getBytes());
    System.out.println(" [x] Sent '" + message + "'");
 it will only be created if it doesn't exist already.
close the channel and the connection;
        channel.close();
    connection.close();

 Reciever

        ConnectionFactory factory = new ConnectionFactory();
    factory.setHost("localhost");
    Connection connection = factory.newConnection();
    Channel channel = connection.createChannel();
    channel.queueDeclare(QUEUE_NAME, false, false, false, null);
    System.out.println(" [*] Waiting for messages.
   
    QueueingConsumer consumer = new QueueingConsumer(channel);
    channel.basicConsume(QUEUE_NAME, true, consumer);
    while (true) {
      QueueingConsumer.Delivery delivery = consumer.nextDelivery();
      String message = new String(delivery.getBody());
      System.out.println(" [x] Received '" + message + "'");
    }


Tuesday, January 15, 2013

List of Open Source Java Projects/Libraries

I added these from different blogs and journels.These are added for future references and with the intention to group them in one place. If you know any such projects please let me know.

1) Below are the Stress test tools Other than JMeter.
  •     a) Grinder can be other option. Read a brief comparison here -   http://www.vedantatree.com/2012/05/which- is-best-free-load-testing-tool.html 
  • b) BadBoy for this and was quite happy with the results. Check its licensing terms to see whether you qualify for free usage.           http://www.badboysoftware.biz/docs/loadtesting.htm          Selenium would work just like BadBoy. you can even export the recorded Selenium sessions as JUnit to be run headless in JMeter afterwards. How cool is that :) 
  • LoadUI to see what it can do you as well      http://www.loadui.org/  Go through some video tutorial to find out what is capable of  http://www.loadui.org/Getting-Started-with-loadUI/videos.html 
  •  TestMaker. From what I read, it looks worth a try... http://www.pushtotest.com/products.html             By the way: it extends Selenium.
  • Gatling  ( http://gatling-tool.org )
  • For web page performance you can use, PageSpeed, Speed Tracer (both by Google) and YSlow.
2)  http://flywaydb.org/
     The agile database migration framework for Java

3)  JFreeCharts for charting. http://www.jfree.org/jfreechart/

4)  Speaking about databases: SchemaSpy (with SchemaSpyGUI) - extracts DB dictionary,
      constraints,   whatever, in a nice graphical way. And free.
       http://www.joachim-uhl.de/projekte/schemaspygui/

5) Mockito (http://code.google.com/p/mockito/), it is not possible to develop without it:
   "Mockito is a mocking framework that tastes really good."

6) http://code.google.com/p/rest-assured/

7) http://sphinxsearch.com

8) To validate JSON: http://jsonlint.com/

9) I came across html5 http://www.websocket.org/ for client server communication.
    Javascript client   opens a websocket on the server and it works like a tcp socket.

10) Jodd --- Jodd is generic purpose open-source Java utility library. It enriches JDK with
       many  powerful   and feature rich utilities. Jodd helps with everyday task,  makes code
       more robust and reliable. Special attention is put into creating reusable and
      fastest possible code and still keeping it compact, under 570 KB.
       http://jodd.org/
      Current version 3.3.7
      License - BSD

11) iText, Apache POI, Apache FOP (libraries for manipulating documents)
      - Sitemesh, Apache Tiles (web pages layout)

12) Project Lombok - Simplifies few typical tasks that can be very annoying at times.
       Must have for those  not using Roo.
      Website - http://projectlombok.org
      Version - 0.11.4
      License - MIT

13) Joda Time has saved me once when I ran into the many issues of java.util.Date,
       so I decided to stick with it from that moment on. And since JSR 310 might as well never
        come to life   (here we go, standards), there's no better choice than Joda Time.
       http://joda-time.sourceforge.net/
      This application helps to do some precise date time calculation.

14) For report generation I used Jasper reports. It is a very good one.
       It has been integrated in one of our products.
       http://jasperforge.org/

15) Thymeleaf
       "Thymeleaf is a Java library. It is an XML / XHTML / HTML5 template engine
      (extensible to other  formats) that can work both in web and non-web environments.
      It is better suited for serving XHTML/HTML5 at the view layer of web applications, but
      it can  process any XML file even in offline environments. It provides an optional module
      for  integration with Spring MVC, so that you can use it as a complete substitute of JSP
      in your  applications made with this technology, even with HTML5.
            The main goal of  Thymeleaf is to provide an elegant and well-formed way of
     creating templates. Its Standard and  SpringStandard dialects allow you to
     create powerful natural templates, that can be correctly displayed by browsers and therefore
     work also  as static  prototypes. You can also extend Thymeleaf
     by developing your own  dialects.  http://www.thymeleaf.org     Apache 2.0

16) Jackcess, a pure Java library for reading from and writing to MS Access databases.
       http://sourceforge.net/projects/jackcess/

17) Generic class mapper to solve problem of parallel class hierarchy and object transformations
       Enti ty/DTO/VO/Etc http://sourceforge.net/projects/geda-genericdto/

18) Scheduler java task like in Cron.
       http://www.sauronsoftware.it/projects/cron4j/

19) I have got a lot of benefits from my Java preprocessor :) because I spent a lot of years
        for mobile development and it saved a lot of my time and a lot of lines of code
        (also I was told by  many other programmers that my tool was useful for them too)
         http://code.google.com/p/java-comment-preprocessor

20) Google Guava
      This is a library of things that most of us tend to write again and again. Only it is really
      well  thought  out. The string matcher and splitter are two of the best takes on string
       manipulation that I have ever used. The collections classes for filtering are the best thing
      this side of Clojure. http://code.google.com/p/guava-libraries/

21) Event Bus
      http://www.rribbit.org/

22) Gson library, if you are working with JSON.
      It helps you to convert Json to Object and Object to Json.
      http://code.google.com/p/google-gson/
      License : Apache License 2.0

23) Bouncy Castle Crypto APIs Java Release 1.47
      http://www.bouncycastle.org/

24) JSoup 1.7.1  (Java HTML Parser)
       http://jsoup.org/
      MIT License

25) http://flywaydb.org/
      The agile database migration framework for Java

26) Twitter Bootstrap which is becoming the de facto CSS framework. Many developers love
       it because it allows to make an acceptable design for a website with little effort.

27) "XWiki" very sexy WEB platform with LDAP/AD integration, works with most of database,
         multi-lingual able, Webdav and REST API, extendable .

28) Jasmine for testing javascript, http://pivotal.github.com/jasmine/. We can use FTL(Freemarker Template Language--http://freemarker.sourceforge.net/docs/index.html) with any javascript api, like jquery etc

29)What are the framework, toolkit, extentions, libraries available for plotting graphs in various forms in Java. JS tool http://www.highcharts.com/ 

30)
IDE which runs in your browser
GutHub for this:
http://stormcloud-ide.github.com/project/index.html
And put up a showcase to get an impression of where the thing is going:
http://stormcloud-ide.github.com/project/showcase/showcase.html
Group to discuss the possibilities
http://www.linkedin.com/groups/Stormcloud-IDE-4772256


31) Commerical Tool but worth to know. Very few such tools available for testing java concurrency code.

Contemplate, an Edinburgh University spin-out company, has developed an advanced static analysis tool, ThreadSafe, that may be of interest to readers of concurrency-interest.  ThreadSafe specifically targets Java concurrency defects and includes some dedicated treatment for java.util.concurrent.  It handles enterprise-scale Java codebases and includes tight integration with Eclipse.

ThreadSafe is in an early stage - currently we are on version 1.1 - but it is already in use finding serious concurrency defects in projects at a couple of large investment banks.  You can get an impression of what it does from the very simple example in
http://contemplateltd.com/maintaining-safe-concurrent-code-with-threadsafe

32)

OpenXava 4.7 released: Rapid Java Web Development

OpenXava is a Java Framework for Rapid Development of AJAX Web Applications, well-suited for business and database oriented applications. 
How does it work? Simple, write simple JPA entities with Java or Groovy, and get an AJAX application ready for production. 

OpenXava 4.7 has many interesting features such as storing generated reports, Liferay 6.1 support, WebSphere Portal 8 support and many more things.
Look at the original announcement:
http://openxava.org/blog/openxava-4.7-released

I invite you to visit OpenXava site to have a look at the demos:http://www.openxava.org/

33) convert JSON to Map and vice versa
code from http://jiangzhengjun.iteye.com/blog/467334 which will convert your json string into map, list... This uses json library from http://json-lib.sourceforge.net/ .


34) JSON  (These are good JSON tools)
 http://jackson.codehaus.org/
Jackson's streaming library is blazingly fast; consumes not much memory
Jackson: it has (had?) some bugs when using mixins and inheritation. I can't remember the details (it's been a few months since I struggled with the problem),
but if I recall correctly, the mixins could be extended, but if the class under serialization was part of inherited class structure,
Jackson left some properties out of serialization...
Jackson and its good.I am using Jackson 2.0 which now they call FasterXML. Also, pls do consider the transformation time from POJO to JSON.
In my case it was taking 15 ms but it depends on the amount of data that you are transforming.
Jackson's library was for me the best one, as usability and performances.
I really reccomend it. The wiki is very good. I leave here the project's link as help http://jackson.codehaus.org



Both these are very good .

35) Java Performance metric collection or monitoring
1) http://www.centreon.com/Content-Products-IT-network-monitoring/nagios
2) use nmon to capture server CPU, Memory, I/O stat etc.

    nmon analyzer to prepare various report as well 
3) Jconsole & JvisualVM 
4) Zabbix to monitor our server, workstation and network

36)

Leshy - Java Serialization/Deserialization Framework

Leshy: http://serkan-ozal.github.io/leshy/

Leshy is a framework for replacing default Java serialization with your custom implementation on the fly without any code change in your application by using Java Instrumentation API.
 
38)
Jillegal (https://github.com/serkan-ozal/jillegal) is a library including unknown tricks of Java. It abstracts developer from low-level details to implement those tricks. Its design and logic are based on Java 8 so it can be used at only Java 8 platform. Java 6 and Java 7 supports are in progress and as soon as possible they will be released. Demo application is avaiable at https://github.com/serkan-ozal/jillegal-demo.

Design and logic of Jillegal OffHeap module different from all of the other offheap frameworks. It doesn't serilalize/deserialize objects to/from allocated offheap memory region. Becuase objects already lives on offheap and GC doesn't track them :). With this feature, all objects in pool are exist as sequential at memory, so sequential accessing to them is faster. Because, they will be fetched to CPU cache together as limited size of CPU cache.