Prologue

For all the Java developers out there Spring (or Spring framework to be more precise) does not need any further introduction, as it is among the most popular frameworks within the Java space. What started out as a simpler, more lightweight and more intuitive alternative to the official EJB standard back in the times quickly became the de-facto standard for developing modern Java-based enterprise applications. A big part of this success can safely be attributed to the smooth interplay between Spring and numerous other open-source frameworks for every aspect of a typical applications. From the underlying ORM (Object-relational mapping) framework to be used for persistence up to the frontend layer Spring allows developers to choose their framework or implementation of choice and develop using the well-designed abstraction layers provided by Spring. This flexibility plus the outstanding (!!!) documentation are the cornerstones of Spring success.

Spring Cloud Connectors

One of the more recent additions to the Spring lineup are the Spring Cloud projects, which aim to simplify the development of cloud applications by providing “tools for developers to quickly build some of the common patterns in distributed systems.” Within this umbrella there’s a particularly interesting project called Spring Cloud Connectors:

“Spring Cloud Connectors simplifies connecting to services and gaining operating environment awareness in cloud platforms like Cloud Foundry and Heroku. Special support for Spring application through Java and XML config makes it trivial for apps to connect to cloud services. Designed for extensibility, you can use one of the existing cloud connectors (Cloud Foundry and Heroku) or write one for your cloud platform. While supporting commonly used services (relational databases, MongoDB, Redis, Rabbit) out of the box, it allows extending it to your own services. Neither of these require modifying Spring Cloud itself; all you need to do is add jars for your extensions to your classpath.”

[Note: Emphasis added by me.]

To summarize the project’s mission statement it’s all about providing sort of an abstraction layer to consume cloud services in a standardized manner, hence making it easier to write applications that can run on multiple cloud platforms (PaaS) without having to worry about specifics of a particular runtime. This approach results in several advantages including a lower entry barrier during onboarding for newbies and a dramatically reduced risk of vendor lock-in.

So far, so good… now the good news is that SAP just released Spring Cloud Connectors for SAP HANA Cloud Platform!

This implies that you can now develop applications that run on both the traditional Java stack of HCP (aka NEO) and a Cloud Foundry runtime using the same codeline! To demonstrate this I’ve provided a simple sample application on github: SAP/cloud-hello-spring-cloud

The screenshots below shows the application running on Cloud Foundry (CF) and the HCP Java runtime (NEO) respectively:

spring_cloud_connectors_CF (1) spring_cloud_connectors_NEO (1)

 

Please check out this sample and familiarize yourself with Spring Cloud Connectors and how-to use them! We are really interested in getting your feedback!

For further information regarding Spring Cloud Connectors and the original sample application please refer to the following blog posts:

PS: Expect a new blog post in the Enterprise Granny series in that context coming soon as well :)

Leave a Reply

04Oct 2007

This is the first post of my blog about custom & composite development topics. Based on the experiences gained in many customer projects I’d like to share with you some of the solutions we came up with when facing everyday challenges of developing custom applications based on the SAP NetWeaver platfom.

22Oct 2007

TechEd’07 In Munich – It’s been very interesting days indeed; starting with the unique experience of attending Community Day on Tuesday, the somewhat entertaining keynotes, Demo Jam, the Evening event on Thursday and of course all the new input I got from the various lectures and hands-on sessions I attended. Not to forget all the networking and chit-chatting that was going on in between…