Wednesday 24 December 2014

Tuesday 1 July 2014

Spring MVC filter-ShallowEtagHeaderFilter

If you want to use optimization with communication between server and browser if your web application use Spring then you can use filter ShallowEtagHeaderFilter.

Filter that generates an ETag value based on the content on the response. This ETag is compared to the If-None-Match header of the request. If these headers are equal, the response content is not sent, but rather a 304 "Not Modified" status instead.

Since the ETag is based on the response content, the response (or View) is still rendered. As such, this filter only saves bandwidth, not server performance.

Source: http://docs.spring.io/spring/docs/3.0.x/api/org/springframework/web/filter/ShallowEtagHeaderFilter.html

Monday 30 June 2014

Good manager

Jonathan Mills teaches the top attributes of a good manager, showing 10 techniques on how to improve the productivity and satisfaction of a team’s members.
http://www.infoq.com/presentations/managing-developers-10-techniques

Mongo sparse index

An index that is both sparse and unique prevents collection from having documents with duplicate values for a field but allows multiple documents that omit the key.
Read more here: http://docs.mongodb.org/manual/core/index-sparse/

Thursday 5 June 2014

Secure Random Generation in Java 8

Java has been under fire for several years for having security holes. Justified or not, a lot of work has been done to fortify the JVM and frameworks from possible attacks. Random numbers with a low-level of entropy make systems that use random number generators to create encryption keys or hash sensitive information more susceptible to hacking.

So far selection of the Random Number Generation algorithms has been left to the developer. The problem is that where implementations depend on specific hardware / OS / JVM, the desired algorithm may not be available. In such cases applications have a tendency to default to weaker generators, which can put them at greater risk of attack.

Java 8 has added a new method called SecureRandom.getInstanceStrong() whose aim is to have the JVM choose a secure provider for you. If you’re writing code without complete control of the OS / hardware / JVM on which it would run (which is very common when deploying to the cloud or PaaS), my suggestion is to give this approach some serious consideration.
See more here: http://www.infoq.com/articles/Java-8-Quiet-Features

Google published Java code style

Google published Java code style: http://google-styleguide.googlecode.com/svn/trunk/javaguide.html

Wednesday 4 June 2014

Efficient Indexing in MongoDB 2.6

Important change in indexing in Mongo 2.6:
  • Using many indexes on one query from now. You do not need to create compound indexes for every query. MongoDB limits you to 64 indexes per collection!
Read more here: http://blog.mongodb.org/post/87790974798/efficient-indexing-in-mongodb-2-6

Saturday 25 January 2014

Web resources in webapp from jar module

The servlet 3.0 spec defines a way to share webapp resources via a dependent jar
Read more here: http://norrisshelton.wordpress.com/2014/01/24/include-jsp-resources-from-another-webapp/