Tuesday, February 28, 2012

Protocol Buffers - The data interchange format

Protocol Buffers are a way of encoding structured data in an efficient yet extensible format. Latest release notes available here.


Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats.Third-Party Add-ons for Protocol Buffers available here

Job Queue - Beanstalk

Beanstalk is a simple and fast Queueing Backend.

It was designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously.

Download and More information available here

Monday, February 27, 2012

Install & Setup Scala 2.9.1 on Ubuntu 11.10

To install Scala 2.9.1, we need Scala distribution, so you can get you're operating system release from here.

Follow these steps to install Scala 2.9.1

1. Download 2.9.1 release from this link
$ wget http://www.scala-lang.org/downloads/distrib/files/scala-2.9.1.final.tgz
$ chmod +x scala-2.9.1.final.tgz

2. Extract downloaded file into /user/local
$ sudo tar -zxvf scala-2.9.1.final.tgz -C /usr/local/

3. Add Scala installed folder path on .bashrc(/home/username/.bashrc) file

$ sudo vim /home/username/.bashrc
Add below line at the end of the file

export SCALA_HOME='/usr/local/scala-2.9.1.final';

4 . Run Scala console

$ Scala


Now Scala 2.9.1 ready to use on you're machine. Hope it may helpful to install and setup Scala 2.9.2.

Install & setup MongoDB 2.0.2 on Ubuntu 11.10

Steps to install latest MongoDB(2.0.2) on ubuntu 11.10.

1. Download latest MongoDB(MongoDB 2.0.2) from here
$ cd tmp $ wget http://fastdl.mongodb.org/linux/mongodb-linux-i686-2.0.2.tgz

2. Extract downloaded file into /user/local
$ chmod +x mongodb-linux-i686-2.0.2.tgz $ sudo tar -zxvf mongodb-linux-i686-2.0.2.tgz -C /usr/local/ $ sudo mv mongodb-linux-i686-2.0.2 /usr/local/mongodb

3. Create a mongoDB data folder and log file for MongoDB service
mkdir -p /opt/data/mongodb mkdir -p /var/log/mongodb touch /var/log/mongodb/mongodb.log

4. Setup start and stop mongoDB service scripts
cd /usr/local/bin/ wget -O mongodb-start https://github.com/veera/MongoDB-scripts/blob/master/mongodb-start.sh wget -O mongodb-stop https://github.com/veera/MongoDB-scripts/blob/master/mongodb-stop.sh chmod +x *

5. MongoDB configuration
mkdir /usr/local/config touch /usr/local/config/mongodb Add these configuration on /usr/local/config/mongodb for mongoDB service # START bind_ip = 127.0.0.1 port = 27017 fork = true auth = true dbpath = /opt/data/mongodb logpath = /var/log/mongodb/mongodb.log logappend = true # END

6. Setup init script, basically needed for start and stop MongoDB server easily
$ cd tmp $ wget -O mongodb-service.sh https://github.com/veera/MongoDB-scripts/blob/master/mongodb-service.sh $ sudo mv mongodb-service.sh /etc/init.d/mongodb $ sudo chmod +x /etc/init.d/mongodb $ sudo /usr/sbin/update-rc.d -f mongodb defaults

6. Add mongodb user
$ adduser --system --disabled-login --disabled-password --group mongodb

7. Give permission to MongoDB data folder
$ sudo chown mongodb:mongodb -R /opt/data/mongodb

Start/Stop MongoDB service
$ sudo /etc/init.d/mongodb start $ sudo /etc/init.d/mongodb stop

I hope you've installed MongoDB without any issues.

Sunday, February 26, 2012

Thrift

Thrift is a software framework for scalable cross-language services development. Thrift allows you to define data types and service interfaces in a simple definition file.

Taking that file as input, the compiler generates code to be used to easily build RPC clients and servers that communicate seamlessly across programming languages.

Tutorial, download and more information available here.

Scala/Hadoop - Scoobi


Scoobi is a Scala productivity framework for Hadoop. Its a Scala library that focuses on making you more productive at building Hadoop applications. It stands on the functional programming shoulders of Scala and allows you to just write what you want rather than how to do it.

Scoobi is a library that leverages the Scala programming language to provide a programmer friendly abstraction around Hadoop's MapReduce to facilitate rapid development of analytics and machine-learning algorithms.

Quick start,download and more information available here.

Hadoop - Crunch

It's a Java library for writing, testing, and running MapReduce pipelines, based on Google's FlumeJava. Its goal is to make pipelines that are composed of many user-defined functions simple to write, easy to test, and efficient to run.


For more information and download here.

Saturday, February 25, 2012

Java Design Pattern - Singleton

Usage:

This pattern apply where application need only one instance for a particular class.

Purpose of this pattern make sure that only one object of the class is created for entire application and that object is shared across multiple modules/clients of single application.

It allow global point of access to that single instance

Example scenarios:

1.Database connection for a particular session
2.Single object for referencing Global properties

JAVA Example:

package com.pattern.singleton;

public class DBConnection {

private static DBConnection connection;

private DBConnection() {}

public static DBConnection getConnection() {

    if(connection == null) {
        synchronized (DBConnection.class) {
            if (connection == null) {
                connection = new DBConnection();
            }
       }
    }
    return connection;
}

}

We should careful while creating singleton on multiple threads application.

If we don't synchronize the method which is going to return the instance then, there is a possibility of creating multiple instances in a multi-threaded scenario. This example is threadsafe singleton pattern.

Tuesday, February 21, 2012

Quartz 2.1.3 Released!

Quartz is a open source job scheduling service that can be integrated with any Java EE or Java SE application.
It can be used smallest stand-alone application to the largest enterprise system.


It's available under the Apache 2.0 license.

It has been released version 2.1.3, For download/release notes check it here.

SPRING FRAMEWORK 3.1.1 RELEASED!

Spring Framework has been released 3.1.1, so now it's available via Maven Central, the SpringSource repository or for direct download from spring community download page

For more information have a look release notes.

Play 2.0 RC1 - Scala Web application framework


Play 2.0 RC1 is a high productivity Java and Scala Web application framework, integrating all components and API needed for modern Web application development.
It is based on a lightweight stateless Web friendly architecture and features predictable and minimal resources consumption (CPU, Memory, Threads) for highly scalable applications thanks to its reactive model based on Iteratee IO.

Try first release candidate.

Monday, February 20, 2012

JBoss 7.1.0 - Java Enterprise Edition 6 Full Profile specification!

JBoss 7.1.0 has been released last week, As per it's release notes,  It develops lightweight AS 7 architecture, and is a certified implementation of the Java Enterprise Edition 6 Full Profile specification.

It has some nice features which includes improved security, enhanced management features, and advanced clustering capabilities,etc.

Release notes available here.



YSlow - Open Sourced

Yahoo open sourced YSlow. It analyzes web pages and suggests ways to improve their performance based on a set of rules for high performance web pages.

Source code is available here. Now it's available under a BSD license.

Sunday, February 19, 2012

Varnish Cache 3.0.2


Release details of 3.0.2

* A crasher bug when requests were queued and the backend sent a response with Vary has been fixed

* A crash when a too large synthetic response was produced has been fixed.

* The ban lurker now properly sleeps the 1 second it is supposed to

* Varnish now releases disk space properly if no -s argument is provided, and the default cache size is now 100MB instead of 50% of the available disk space


Find out more details here.

HAProxy - Stable 1.4.19 Released!

HAProxy has been released Stable 1.4.19.  For more information check it here.

HBase 0.92.0 Released!

HBase 0.92.0 has been released. Download it from here.

Friday, February 17, 2012

Release - Ruby 1.9.3-p125

Ruby 1.9.3-p125 has been released, it includes security fixes(OpenSSLextension) and bug fixes.

See tickets and ChangeLog for details.

Download:

http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.bz2

Wednesday, February 15, 2012

Project Kotlin


"Project Kotlin" is a codename for a statically typed programming language compiled to JVM byte code and JavaScript. it's distributed under Apache 2 Open Source License.
Have a look Kotlin Web Demo and  Docs for more information 

Sunday, February 12, 2012

Rails 3.2.1 has been released


Rails 3.2.1 has been released, with some fixes and doc improvements. 


If you would like to know more information and changes, have a look CHANGELOGs gist.

Wednesday, February 8, 2012

PHP 5.3.10 Released

It was released with critical Security Fixes

* Fixed arbitrary remote code execution vulnerability reported by Stefan Esser, CVE-2012-0830.

Source avilable here