Cloud Foundry: Design and Architecture
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
The content has been bookmarked!
There was an error bookmarking this content! Please retry.
Posted by Bienvenido David III on Sep 09, 2011
SpringSource, a division of VMware, has released Spring AMQP 1.0 GA (1.0.0.RELEASE). The Spring AMQP project applies core Spring concepts to the development of AMQP-based messaging solutions, and is available in both Java and .NET versions. For a good primer on Spring AMQP and AMQP in general, read the "Introduction to SpringSource's Advanced Message Queuing Protocol Support".
Spring AMQP provides org.springframework.amqp.core.AmqpTemplate for sending and receiving messages. AMQP template implementations support sending and receiving POJOs instead of javax.jms.Message instances. They also provide a way to customize the MessageConverter used to marshal the Object. Spring + JMS users will notice similarities between JmsTemplate and the new AmqpTemplate.
Here are code snippets on how synchronous messaging works using Spring AMQP with RabbitMQ behind the scenes. RabbitMQ is a VMware product and is the default AMQP implementation used in the official Spring AMQP examples.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:rabbit="http://www.springframework.org/schema/rabbit" xsi:schemaLocation="http://www.springframework.org/schema/rabbit http://www.springframework.org/schema/rabbit/spring-rabbit-1.0.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <rabbit:connection-factory id="connectionFactory"/> <rabbit:template id="amqpTemplate" connection-factory="connectionFactory"/> <rabbit:admin connection-factory="connectionFactory"/> <rabbit:queue name="helloworld.queue"/> </beans>
The above spring configuration xml references the ConnectionFactory, creates a RabbitTemplate for access to the message broker, creates a RabbitAdmin to manage exchanges, queues and bindings, and finally creates the queue. Next are the Java code snippets to send and receive messages.
Producer.java
import org.springframework.amqp.core.AmqpTemplate;
...
AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class);
amqpTemplate.convertAndSend("helloworld.queue", "Hello World");
Consumer.java
import org.springframework.amqp.core.AmqpTemplate;
...
AmqpTemplate amqpTemplate = context.getBean(AmqpTemplate.class);
System.out.println(amqpTemplate.receiveAndConvert("helloworld.queue"));
To get started, download the Spring AMQP for Java or the Spring AMQP for .NET. The Spring AMQP for Java artifacts are also available in the SpringSource Maven repository and Maven Central. Dependencies are spring-amqp, spring-core, spring-context. Include spring-rabbit if you are using RabbitMQ as the message broker. You can also try the Spring AMQP examples hosted at GitHub. The examples are Maven based projects and requires RabbitMQ and Erlang. Read the readme.md file that comes with the sample code for complete build instructions.
For Cloud Foundry users, VMware has also announced the free public beta of RabbitMQ on Cloud Foundry. You can use Spring AMQP to connect to RabbitMQ on Cloud Foundry, with examples to help you quickly get started. For Spring Integration users, AMQP support is available in version 2.1 M1.
Besides VMware's RabbitMQ, other AMQP based message-oriented middleware are Apache Qpid, Red Hat Enterprise MRG, and StormMQ (hosted). iMatrix's OpenAMQ is no longer supported and thus no longer an alternative.
For more information on Spring AMQP, please visit the Spring AMQP Reference for Java and the Spring AMQP Reference for .NET reference pages.
Introducing SQLFire: a memory-optimized, high performance SQL database
Tutorial: Integrating SQLFire with tc Server and Spring Data
Tools to unit test your JavaScript
VMware vFabric SQLFire - Test drive the data management system with memory speed, horizontal scalability and a familiar SQL interface
Derek Collison discusses the goals, the design premises and patterns employed in creating the architecture of Cloud Foundry, VMware’s open source PaaS, unveiling internal architectural details.
Andrew Watson talks about the work of the OMG, where CORBA is alive and well (hint: in your car), UML and UML Profiles vs. custom Modeling languages, DDS and other middleware, and much more.
Sohil Shah discusses creating iPhone and Android enterprise mobile applications based on cloud services using the open source platform OpenMobster.
Paul Sanford presents the transformations supported by data throughout its life cycle, and how that can be better done with Splunk, an engine for monitoring and analyzing machine-generated data.
A common “best practice” for unit tests is to only write a one assertion in each test. I intend to question this advice by showing that multiple assertions per test are both necessary and beneficial.
John Rauser presents the architectural and technological evolution of Amazon retail websites starting with 1994 and ending with adopting Amazon Web Services.
Michael Stal discusses system architecture quality, how to avoid architectural erosion, how to deal with refactoring, and design principles for architecture evolution.
Every developer has had to integrate with another system, API or component. Tis article provides strategies to handle the change and for he separating system boundaries.
No comments
Watch Thread Reply