Java Caching System

Caching web pages and other data in distributed environment makes your application faster and better. I was wondering if Java has something for caching web pages for fast response and better performance. Few days back I found Java Caching System (JCS) project on Apache Jakarta Projects website.

JCS is an open source library for creating distributed caching system to speed up your applications. JCS is a general purpose caching system that can be used in web applications, services, and stand alone Java applications. The JCS goes beyond simply caching objects in memory. It provides numerous additional features:

  • Memory management
  • Disk overflow (and defragmentation)
  • Thread pool controls
  • Element grouping
  • Minimal dependencies
  • Quick nested categorical removal
  • Data expiration (idle time and max life)
  • Extensible framework
  • Fully configurable runtime parameters
  • Region data separation and configuration
  • Fine grained element configuration options
  • Remote synchronization
  • Remote store recovery
  • Non-blocking “zombie” (balking facade) pattern
  • Lateral distribution of elements via HTTP, TCP, or UDP
  • UDP Discovery of other caches
  • Element event handling
  • Remote server chaining (or clustering) and failover

I will be exploring the API in coming weeks and publish a small tutorial about how to use them in web application.

Java Foreach Loop

Java 5 introduced foreach loop, a much needed feature since it was first relaeased. Java foreach loop provides code simplicity, readability and eliminates the repetition of code that we write for type casting and assignments, when we are iterating arrays and collection objects.

When used with generics nothing is more apealing loop than foreach. I was reading an article “What Java foreach loop can do?“, which describes every thing a developer needs to know about for eachloop.

Open Source Java

Today, the SUN Microsystems, Inc has released the first Java code under version 2 of the General Public License (GPLv2), which governs Linux and other open source products. According to Sun, this move will promote Java and make it easier to bundle with Linux.

Sun is now the biggest contributor to the open-source community. Already Sun has released open-source implementations of its Solaris Operating System, NetBeans, Project Looking Glass, Project JXTA, Jini, OpenOffice, OpenSPARC, and Java EE technologies and is continuing on its path to open all of its middleware.

Commenting on the development, Rich Green, Executive Vice President of Software, Sun, said, this is a milestone for the whole industry, and that not only are they making an influential and widely-used software platform for the Web available under open source, but that they are paving the way for a paradigm shift in how software is enhanced and developed.

By open sourcing its Java implementations, Sun will open new market opportunities, fuel innovation, and drive broader adoption of this Web 2.0 platform while minimizing fragmentation in the mobile community by delivering a consistent application platform across devices.

While additions to software available under GPL have to also use the license, Sun is making an exception in the case of Java Standard Edition (Java SE). Meaning, programmers creating applications using Java SE will not be required to use the GPL license, and can instead opt for any other license for their applications. Also, Sun will continue to offer commercial licenses that give other software vendors legal indemnification and official standards certification.

All in all, Sun’s move comes as a pleasant surprise, considering the company has continually resisted calls to open source Java, citing fears that such an action would cause incompatibilities among “forked” versions of the code.

Read full story: Open Source Java

Next Page »