Using MongoDB, Redis, Node.js, and Spring MVC in a single Cloud Foundry Application

Engineering | Jon Brisbin | May 03, 2011 | ...

Traditionally, applications have been defined by the principle technology they use. If you're building a Spring MVC application, we call it a "Java app". Since our application is primarily composed of Java components, we tend to stay in our own yards and not be terribly friendly with our neighbors until we're forced to interact with them. We set up Java-based application servers and tend to think first of going to the Java language to solve a problem in our application whether that language is the best choice or not. It has usually just been too difficult to maintain multiple sets of runtime…

Spring Social 1.0.0.M3 Released

Releases | Craig Walls | April 27, 2011 | ...

Dear Spring Community,

We are pleased to announce that the third milestone release of the Spring Social project is now available!

The Spring Social project allows you to integrate APIs exposed by Software-as-a-Service (SaaS) providers such as Facebook and Twitter into your applications.

This is a big release for us. Some of the most exciting highlights of the 1.0.0.M3 release include:

  • One of the most complete Java bindings to Facebook's Graph API available, including operations for working with users, friends, feeds, user interests and likes, events, invitations, albums, photos, videos, groups, and checkins with Facebook Places.
  • A greatly expanded Java binding to Twitter's REST API, including operations for working with timelines, users, saved searches, trends, lists, favorites, direct messages, friends, and followers.
  • A new provider signin controller enabling a user to sign into an application using his or her SaaS provider account such as a Facebook or Twitter account.
  • Enhanced extensibility, which includes a walkthrough of how to extend Spring Social to add support for new service providers.

Of particular note, many of the enhancements in this release were driven by community feedback. It's great to see folks already extending Spring Social to work with new SaaS providers. For instance, Matt Wright has been working on a Java binding to the Instagram API.

We're committed to working with the community to create an ecosystem of quality API bindings. If you're integrating a SaaS API into your application, consider contributing your API binding to the Spring Social project. Have a look at our guide to extending Spring Social and discuss with the development team at our forum.

See the changelog and reference guide for more information on this release.

To get the software, download the release distribution, or simply add the maven artifacts to your project. To see the features live, check out the showcase app (updated for 1.0.0.M3):
git clone git://

Getting Started with Redis, Spring Data & Cloud Foundry

Engineering | Costin Leau | April 27, 2011 | ...

One of the drivers behind the popularity of NoSQL solutions is performance (especially) under heavy loads. Due to their data model, key value stores lead the pack, providing lightweight yet flexible means of working with data. In this entry, I am going to quickly showcase what it takes to work with a key value store (Redis) using Spring (Spring Redis) through one of Spring Data samples (RetwisJ) and deploy the app into the cloud (through Cloud Foundry) to share it with the world. I am going even further by using Windows, as a deployment platform for a change.


A popular choice among key-value stores is Redis, an open source, crazy fast database written in ANSI C weighting around 200 KB (yes, kilo-bytes) for the server or 400 KB for the entire package (includes a command-line client and some administration utilities) and available virtually on all major platforms which also makes it the choice for the sample. Note that a Redis instance is not needed unless one wants to run the sample locally. If so, for Windows users (such as the author) yours truly uses (and recommends) this pre-packed version available in both 32-bit and 64-bit flavours.

Spring and NoSQL

If you are using NoSQL from a Java environment, take a look at Spring Data: it's not a project by itself but rather an umbrella of projects embracing the various new data access technologies such as non-relational databases (like Redis or MongoDB), map-reduce frameworks (think Hadoop) and cloud-base data services for Java apps. Spring Data promotes the classic Spring values, enhancing developer productivity by removing the API noise, boiler-plate code and resource management and offering a consistent programming model. It builds on top of existing Spring features and projects (such as inversion of control, life-cycle management, type conversion, portable data access exceptions, caching and so on) so one can add it right away, with minimal effort in her application. And of course, just like the rest of the Spring projects, it is open source and available under Apache license.

Spring Data Redis

In the case of Redis, Spring Data offers dedicated support through the Spring Data Redis or simply Spring Redis project. It offers both low-level and high-level features ranging from portable Redis client abstractions (allowing different Redis clients such as Jedis, JRedis or RJC to be changed with literally one configuration line) to Redis-backed atomic collections or counters or pub-sub support. The project reference documentation covers these topics in great detail.

RetwisJ, YATC - Yet Another Twitter Clone

RetwisJ source code, including the code in this blog, can be downloaded at Spring Data Key Value sample project. Further more, documentation is available at here

RetwisJ can be seen as the Java port of Redis' Retwis sample: a simple Twitter-clone that demonstrates how one can replace expensive joins in a traditional, relational database with Redis flexible data model (such as set intersections

This week in Spring: April 26th, 2011

Engineering | Josh Long | April 26, 2011 | ...

Another week, another great allotment of new content that - as usual - draws from the community and from SpringSource. The enthusiasm for CloudFoundry continues unabated this week, with some interesting content in this week's roundup. For more content on CloudFoundry, you might consult the and sites. In particular, the slides from the Cloud user group held the day after the announcement are available here.

  1. Oliver Gierke has posted a blog on Advanced Spring Data JPA which explains how to use the features in the Spring Data JPA project that elevate the art of JPA programming, like the integration of the QueryDSL library. This post - and the library - speak to the ongoing, first-class support in the Spring frameworks for all data access technologies, be they RDBMS, NoSQL, or anything else.
  2. Peter Ledbrook, Grails Developer Advocate, has recently expanded on his original blog on using Grails and CloudFoundry.

    This blog provides a detailed look at using Grails' GORM support with the various data stores available on CloudFoundry. Check it out!

  3. Alex Popescu's MyNoSQL portal, MyNoSQL, has some interesting comments about the NoSQL options supported in CloudFoundry. He comments that "From a storage perspective, Cloud Foundry is encouraging polyglot persistence right from the start offering access to a relational database (MySQL), a super-fast smart key-value store (Redis), and a popular document database (MongoDB)."
    This post - and indeed the entire site - is a very valuable resource for CloudFoundry users that want to exploit the NoSQL options, but don't understand the use cases yet. There's a lot of good content on both MongoDB and Redis, for example.
  4. Mark Thomas, Apache Tomcat 7 release manager and engineer, has written up a post on Apache Tomcat 7's session fixation protection security feature on the website. Keeping on top of the latest Tomcat security features is important if you are, like the majority of developers, using Tomcat (or hardened, ops-friendly derivatives like SpringSource's tcServer) as a production server for your Java (and often Spring) applications. Additionally, Tomcat's bundled with several application servers. Either way, knowing about Tomcat's industry-leading features can only help.
  5. Costin Leau has announced the Spring GemFire 1.0.1 release, which incorporates bug fixes and promotes stability.
  6. <li>Just a reminder to our European community members, the S2G Forum Series will be held in <a href="">Amsterdam (May 26th)</a> and <a href="">London (May 31st)</a>. There will be tons of great sessions about Spring, Groovy and Grails as well as talks focused specifically on CloudFoundry, Tomcat and Gemfire so be sure to <a href…

Advanced Spring Data JPA - Specifications and Querydsl

Engineering | Oliver Drotbohm | April 26, 2011 | ...

In my last blog post I introduced the basic feature set of Spring Data JPA. In this post I'd like to dive into some more features and how they can help you simplify data access layer implementation even further. The Spring Data repository abstraction consists of an interface based programming model, some factory classes and a Spring namespace to easily configure the infrastructure. A typical repository interface looks something like this:

public interface CustomerRepository extends JpaRepository<Customer, Long> {

  Customer findByEmailAddress(String emailAddress);


Spring GemFire 1.0.1 Released for Java and .NET

Releases | Costin Leau | April 26, 2011 | ...

Dear Spring Community,

I am pleased to announce that 1.0.1 GA release of the Spring GemFire project is now available for both Java and .NET! The Spring GemFire project aims to make it easier to build Spring-powered highly scalable applications using GemFire as distributed data management platform.

Download it now: Spring GemFire for Java | Spring GemFire for .NET

Java: JavaDocs | Reference Documentation | Changelog .NET :  ApiDocs  | Reference Documentation | Changelog

The Spring GemFire project aims to make it easier to build Spring-powered highly scalable applications using GemFire as…

Eventing Data with RabbitMQ and Riak

Engineering | Jon Brisbin | April 21, 2011 | ...

As new applications take advantage of the scalability benefits of message brokers like RabbitMQ and cloud-scale datastores like Riak, it's inevitable that the two should become fast friends (the kind who actually talk to each other in person rather than the kind whose only contact is through Facebook).

So many of the applications we find ourselves writing these days have these two functions in the same application. Very often we want to update data as the result of a message or send a message as the result of updated data. Two new utilities facilitating RabbitMQ and Riak integration allow you…

Deeper into Grails & Cloud Foundry

Engineering | Peter Ledbrook | April 21, 2011 | ...

In my previous post, I showed you how easy it is to deploy a Grails application to Cloud Foundry using the corresponding plugin. Hopefully that whetted your appetite and you are ready to look at a more complex Grails application that demonstrates the power of the GORM plugins and stretches the Cloud Foundry services. If you don't have a Cloud Foundry account yet, please be patient. The response to the announcement has been phenomenal so it is going to take some time to work through the backlog of requests.


Simple Twitter clones have become almost the standard for sample Grails applications, so it's no surprise that another version has been developed for Cloud Foundry. You can find the code on GitHub along with the other Cloud Foundry samples and you can also test out an instance of the application

This week in Spring: April 19th, 2011

Engineering | Josh Long | April 19, 2011 | ...

Welcome back to This Week in Spring. The enthusiasm for last week's Cloud Foundry announcement was outstanding and appears to be getting stronger! People all over the world have flooded the SpringSource and CloudFoundry forums, downloads pages and source repositories. What unprecedented activity!

Many of the different, powerful technologies coming out of SpringSource recently have been leading up to the Cloud Foundry release so I invite you to review some of the exciting stuff that's come out in the last few months that have become even more interesting in terms of the cloud and Cloud Foundry: Spring Gemfire, Spring AMQP, Spring 3.1 profiles, Spring 3.1 caching abstraction, Spring Data, Spring Integration support for NoSQL, and Spring Hadoop, vFabric Hyperic, vFabric RabbitMQ, and vFabric GemFire. Of course, for all of these technologies - the first, and best, tooling and development experience continues to be SpringSource Tool Suite and Spring Roo.

Ok, onward to this week's review. So much exciting stuff, so little time!

  1. Christian Dupuis has just written up a detailed blog on using STS to deploy to Cloud Foundry.
  2.  <li><A href="">Spring Roo 1.1.3</a>, featuring 
     Cloud Foundry support, shell enhancements, and improved support for composite primary keys - among other things - has been released. 
    	 <li> DZone has published a <a href="">Spring Roo RefCard</a> by the Spring Roo team's <a href="">Stefan Schmidt.</a> This RefCard's a fantastic way to get going quickly with Spring Roo. Spring Roo, it could be argued, is ideally suited to the RefCard…

Get the Spring newsletter

Thank you!

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Spring Runtime offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all