Posts

PaaS : Cloud Application Platforms

Cloud is having a thunderstorm these days. All the buzzbowrds related to cloud are raining everywhere and Cloud in itself is sweeping IT in all facets. I have no intentions of creating further confusion by "Cloud Application Platform". The sole intension is to put my perspective ( with comments and deviations most welcomed ). Slight flashback When we start reading about cloud, everyone comes accross 3 "is-a-Service". Iaas (Infrasructure as a Service), PaaS (Platform as a Service) and SaaS (Software as a Service). IaaS  - Model in which hardware infrastucture is rented out by the Infrastructure provider and charged as per usage. In this case the user would not want to maintain the physical infrastructure itself. SaaS  - Model in which applications are hosted by a provider or a vendor and made available over a network. It can be considered as the next level of IaaS PaaS  - It can be considered as the middle path of IaaS and PaaS. It is not a finished produc ...

REST Design Pattern and Best Practices

Image
There is lot of material available on net about the REST design pattern and REST way of services but still to get started you need to read a few before you could make a call. I have tried to summarize my beginning to make it easier for others. REST: The Style of Architecture REST ( REpresentation State Transfer) is the way the whole web is organized. Web is a collection of resources which can be identified with a URI which are globally identifiable. People do struggle to define REST. One wrong statement is "REST is a communication Protocol". REST is not protocol; it is just a style of software architecture for distributed system. REST style of Architecture shows following characteristics: As opposed to the procedure based approach of SOAP, REST follows the action based approach to act on a resource. The actions can be described in the form of four verbs: (In HTTP world these are referred to as Methods. T...

Application logging through SLF4J : Quick Reference

The detailed information on SLF4J is available on http://www.slf4j.org . The primary reason of writing the blog is that there is lot of information but usually people do not have the time to do into the details, hense a quick reference is required to get it going. So I would be trying to put forward all the important aspects. The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time. Reason The obvious next question was that this is what JCL (Jakarta Commons Logging: http://commons.apache.org/ ) is all about. Why was the need for another facade? SLF4J does answer to few of drawbacks but there is no specific answer to why JCL was not modified. The drawbacks which are taken care as part of SLF4J are: Parameterized log messages solve an important problem associated with logging performance. Mark...

Cloud Elasticity or Scalability, Whats the Difference?

I have heard and read at lot of places about Elasticity and Scalability of the cloud. In a discussion the point came across that what actually is the difference between Elasticity and the Scalability, when it comes to cloud. I myself could not find the demarcation, so I searched around the web. But to my surprise lot of people on the articles conviniently use Elasticity and Scalability interchangeably in relation the cloud. After reading around I could not find the answer, so I though to put my own thoughts since I dont agrre that both is same and let people decide if my understanding is right or not. What means by Elasticity in relation to cloud is that it could scale up or down the infrastructure to meet the requirement. Elasticity is about instantly bringing you the necessary resource when you need it and instantly decommission them when you don't need it. Elasticity is an important feature of the cloud offering as you are charged only during the time when you are using it. Sc...

Unable to load default SVN client

While installing the subversion plugin Subclipse in the Eclipse IDE I came across a problem. Subclipse uses "JavaHL (JNI)" to interface with subversion by default. Initially I was getting the following error message when accessing Windows->Preferences->Team->SVN->SVN Interface dropdown: JavaHL (JNI) Not Available When attempting to view a repository via the "SVN Repository Exploring" perspective I got a different error message: Unable to load default SVN client So I installed the below package sudo apt-get install libsvn-java Still the problem continued and I realized that I need to provide the liberary to Eclipse (3.6 Helios) I choose to set the path to the JavaHL libraries via a command line argument. I accomplished this by setting my Launcher icon for Eclipse to use the command /path/to/eclipse -vmargs -Djava.library.path=/usr/lib/jni Another option is to set the LD_LIBRARY_PATH environment variable to point to the /usr/lib/jni in your .profile file. ...

What is Web 2.0?

I know the article is too late. We are done with all type of definitions and I am now talking about it. I planned to write a five second explanation is because I keep bumping into this question and believe me there are numerous definitions poured on the person asking this question and he is looked upon as if he does not know what internet is but finally in the end of the discussion the person asking the question still does not have the answer. Even I came to know the answer pretty late and after some drilling on internet for the definition. Here's my take on it: Although the term Web 2.0 suggests a new version of the World Wide Web, it does not refer to new technology but rather to cumulative changes in the ways software developers and end-users use the Web World Wide Web inventor Tim Berners-Lee clarifies, "I think Web 2.0 is, of course, a piece of jargon; nobody even knows what it means. If Web 2.0 for you is blogs and wikis, then that is 'people to people.' But that...

Hibernate + Spring + MySql: Cannot convert value '0000-00-00 00:00:00' from column X to TIMESTAMP

Image
When I was trying to load an Hibernate object, I received the following error: nested exception is java.sql.SQLException: Cannot convert value '0000-00-00' from column 4 to TIMESTAMP. at org.springframework.jdbc.support.SQLStateSQLExceptionTranslator.doTranslate(SQLStateSQL This exception means that the column "X" has an invalid date "0000-00-00 00:00:00" According to http://bugs.mysql.com/bug.php?id=13030 "Datetimes with all-zero components ('0000-00-00 ...') - These values can not represented reliably in Java. Connector/J 3.0.x always converted them to NULL when being read from a ResultSet. When working with MySQL over JDBC and the driver encounters a zero DATE, TIME, or DATETIME value (that is, e.g, ‚0000–00–00‘ for DATE), this exception is thrown. This can be handled by adding the JDBC Parameter: zeroDateTimeBehavior=convertToNull to your JDBC connection. url=jdbc:mysql://localhost/test?connectTimeout=60000&autoReconnect=true&ze...