Spring XD 1.0 Milestone 1 Released

Engineering | Mark Pollack | June 12, 2013 | ...

Today we are pleased to announce the 1.0 M1 release of Spring XD  (download).Spring XD is a unified, distributed, and extensible system for data ingestion, real time analytics, batch processing, and data export.  The project’s goal is to simplify the development of big data applications.

From the 10,000 foot view, big data applications share many characteristics with Enterprise Integration and Batch applications.  Spring has provided proven solutions for building integration and batch applications for more than 6 years now via the Spring Integration and Spring Batch projects.  Spring XD builds upon this foundation and provides a lightweight runtime environment that is easily configured and assembled via a simple DSL.

In this blog we will introduce the key components of Spring XD, namely Streams, Jobs, Taps, Analytics and the DSL used to declare them, as well as the runtime architecture.  Many more details can be found in the XD Guide.

Streams

A Stream defines how data is collected, processed and stored or forwarded.  For example, a stream may collect syslog data, filter it, and store it in HDFS.  Spring XD provides a DSL to define a stream.  The DSL allows you to start simple using a UNIX pipes-and-filters syntax to build a linear processing flow but lets you also describe more complex flows using an extended syntax.

Sources and Sinks

A simple linear stream consists of the sequence: Input Source, (optional) Processing Steps, and an Output Sink.  As a simple example consider the collection of data from a HTTP Source writing to a File Sink. The DSL to describe this stream is
http | file

You tell Spring XD to create a stream by making a HTTP request to the XD Admin Server which runs on port 8080 by default.  In the M2 release we will provide an interactive shell to communicate with XD, but for M1 the easiest way is to interact with XD is using ‘curl’.

curl -d "http | file" http://localhost:8080/streams/httptest

The name of the stream is httptest, the default HTTP port to listen on is 9000, and the default file location is /tmp/xd/output/${streamname}.

If you post some data on port 9000 with curl
curl -d "hello world" http://localhost:9000

You will see the string hello world inside the file /tmp/xd/output/httptest

To change the default values, you can pass in option arguments

http --port=9090 | file --dir=/var/streams --name=data.txt

The supported sources in M1 are file, time, HTTP, Tail, Twitter Search, Gemfire (Continuous Queries), Gemfire (Cache Event), Syslog and TCP.  The supported sinks are Log, File, HDFS…

This Week in Spring - June 11, 2013

Engineering | Josh Long | June 11, 2013 | ...

Hey guys, welcome to another installment of This Week in Spring! This week I'm in New York City, New York, talking to developers at the NYC Java Meetup and at ScalaDays about Spring. We've got a lot of webinars this month, so be sure to check out the details below!

  1. Want a pass to SpringOne 2GX 2013? If you're a Spring champion, show off your stuff on our champions forum and follow these instructions by June 21, 2013. You might be one of our 5 lucky winners! (If you're a Groovy & Grails or Cloud Foundry champion, never fear, we will be rolling out future contests for you!)
  2. Oliver Gierke has announced Spring Data Babbage, the first milestone of the next Spring Data release train. This release includes a lot of new features, so be sure to check out the release note!
  3. Spring Batch 2.2.0 is now available! This is a major release that supports Spring Data, Java Configuration, AMQP, and SQLFire in addition to a number of other features. Spring Batch and our participation in the expert group has heavily informed the JSR-352 specification that recently has been finalized.
  4. Spring Tool Suite and Groovy / Grails Toool Suite 3.3.0 M2 has been released, based on Eclipse Kepler 4.3. This milestone release improves Java Configuration support and is Spring Framework 4 ready.
  5. Craig Walls has announced that Spring Social Twitter 1.0.5 and Spring Social 1.0.3 have been released! The new release fixes a few bugs and is being made available in anticipation of the deprecation of the 1.0 version of the Twitter API.
  6. Gary Russell has also announced the Spring Integration 2.2.4 and 2.1.6 maintenance releases, to incorporate the Spring Social Twitter updates mentioned above.
  7. I'll be doing a webinar on Thursday on RESTful service design with Spring. As usual, there will be two sessions - one at 3PM GMT and one at 10:00AM PST - to accommodate as many timezones as possible. The webinar will introduce Spring's stack for building RESTful services. We'll start with a simple API, then advance the API, introducing Hypermedia controls with Spring HATEOAS, introducing conventions-oriented repository-based APIs with Spring Data REST, security with Spring Security OAuth and Spring Social and addressing common cases like file uploads, exception handling, record paging, and Ajax. I look forward to seeing you there!
  8. Don't miss Jon Brisbin on June 18th, 2013 as he introduces Introducing Reactor - A framework for asynchronous applications on the JVM. Reactor provides a foundational framework for applications that need high throughput when performing reasonably small chunks of stateless, asynchronous processing.
  9. Join Tony Erksine from Liberty University on June 27th as he instructs us How to talk Spring and Influence People, a pragmatic lesson on soft skills and technology adoption strategies needed to help get other developers in your company excited about,a nd using, new technology -- in this case, with Spring.
  10. I gave a talk on the latest at the amazing DevNexus conference in March on Spring 3.1, 3.2, and 4.0 in March, and that talk is now available online on InfoQ. Do check out the talk, but also be sure to check out the more up-to-date version of that deck from my talk at JAXConf available on my SlideShare account.
  11. Head over to the Pivotal Blog for a short primer on Hadoop programming, which walks you through a simple word count program. The example looks at the canonical word-count problem and then looks at other solutions in the ecosystem like Pig, Hive and Cascading. The next blog in the series will introduce Spring for Apache Hadoop for a beginning audience, providing a unified, consistent alternative to the four different methods discussed in this blog post.
  12. In related news, if you're in the New York City area, join me Wednesday evening where I'm giving the same talk at the 10gen offices for the NYCJava meetup. Thanks again go to 10gen, the company behind MongoDB, for hosting the meetup.
  13. The JavaBeat blog has a nice post on how to use Spring's robust multipart file upload support. Spring's support abstracts away common APIs for file uploads - including the commons-fileupload API and the Servlet 3 API - and lets you use those APIs for HTTP miltipart-encoded file uploads, typically in web applications or REST services. Definitely worth a read, check it out!
  14. Idan Fridman put together a rundown on some of the common types of components in Spring Integration, including splitters, transformers, aggregators, and more.
  15. For those of you who are looking to take your Spring skills to a new level of expertise, SpringSource has just released the Professional Spring Training Schedule for July 2013
  16. The Spring tutorials blog has a great post introduce Spring's @Async and @Scheduled annotations.

First milestone of Spring Data release train Babbage arrived

Engineering | Oliver Drotbohm | June 10, 2013 | ...

I am pleased to announce the first service milestone release for the Spring Data release train named Babbage. It includes the following modules:

The first milestone includes quite a few new features as well as all the bug fixes already released in the service release for Arora.

A quick tour through the release

Most of the changes of this release have made it into Spring Data Commons to build a solid foundation for the next generation of Spring Data projects and make sure that foundation matures fastly. The other modules released in this train station have been adapted to these changes and thus benefit from them as well.

We've upgraded to Querydsl 3.x APIs to accomodate the changes introduced in their major release. The repositories abstraction has added support for ordering ignoring case as well as count…By…(…) projection for derived queries…

This Week in Spring - June 4, 2013

Engineering | Josh Long | June 05, 2013 | ...

Welcome to another installment of This Week in Spring. The SpringOne2GX super early bird registration discount expires on June 10th, 2013, so make your arrangements now to secure the discount. Also, we've got three webinars coming up this month, check out the details below. As usual, we've got a lot to cover, so let's get to it!

  1. I'll be doing a webinar on building effective REST APIs with Spring on June 13th. I'll be introducing Spring's deep support for REST services, starting with Spring MVC and moving up the Richardson Maturity Model to incorporate Spring HATEOAS and, ultimately, Spring Data REST. Along the way we'll look at the REST shell, and other concerns like security through OAuth.
  2. Join Jon Brisbin as he introduces Reactor in a webinar on June 18th. Reactor provides a foundational framework for applications that need high throughput when performing reasonably small chunks of stateless, asynchronous processing.
  3. Join Tony Erksine from Liberty University on June 27th as he instructs us How to talk Spring and Influence People, a pragmatic lesson on soft skills and technology adoption strategies needed to help get other developers in your company excited about,a nd using, new technology -- in this case, with Spring.
  4. If you're in the bay area, be sure to check out JAXConf happening right now in Santa Clara. Admission is free and there are some great speakers there. I will be speaking there tomorrow on Spring 4, and Multi Client Development with Spring, so feel free to drop by if you'd like to talk Spring, Cloud Foundry and big-data.
  5. You probably saw Paul Chapman's awesome posts introducing Spring MVC's support for content negotiation last month and this month he's back with a post on content negotiation using Spring MVC views. Be sure to check both of them out, as they provide solid foundations for dealing with content negotiation in the ever increasing paradigm of REST.
  6. Our friend Petri Kainulainen continues his look at Spring Data SOLR and explains how to add custom repository methods to the implementations above and beyond what Spring Data already provides out of the box. This example is in the context of Spring Data SOLR but the approach is generic and works for all the repository implementations.
  7. RabbitMQ ninja Alvaro Videla has done an amazing job introducing RabbitMQ's power in the latest edition of Developer Magazine.
  8. Every now and then I run into old but cool content, like this project demonstrating how to build a Spring MVC application with Scala. As you might imagine, there's not much difference between Scala and Java, but this is nonetheless an interesting example. Check it out.
  9. I've been knee deep in REST, in preparation for my upcoming webinar, and I stumbled upon a great, albeit older, post by Apache Shiro PMC member and REST-ninja Lez Hazelwood on providing good client feedback on errors with REST in Spring MVC.
  10. Spring HATEOAS lead and Spring Data ninja Oliver Gierke did an amazing talk introducing Spring HATEOAS at Oredev last year and it's available online. Definitely be sure to check it out!
  11. Our pal Nicolas Fränkel is back, this time with a short rant on how to approach modularity in Spring configuration.
  12. JavaBeat has a nice post on how to handle themes in Spring MVC.
  13. The BitwiseOR blog has a nice post on how to setup a simple, working Spring MVC application.
  14. Alexey Zvolinskiy put together a nice, complete-with-code, post on how to use Spring Data JPA to build an application.
  15. David, from The small world for Yiyi blog, has put together a nice post on using PDF, XML and JSON from Spring MVC.
  16. Our pal Johnathan Mark Smith is back, this time with another video introducing how to use Spring's Java configuration

Content Negotiation using Views

Engineering | Paul Chapman | June 03, 2013 | ...

In my previous post I introduced the concept of content negotiation and the three strategies Spring MVC uses to determine the content requested.

In this post I want to extend the concept specifically to supporting multiple views for different content-types using the ContentNegotiatingViewResolver (or CNVR).

Quick Overview

Since we already know how to setup content-negotiation from the previous post, using it to select between multiple views is very straightforward. Simply define a CNVR like this:


    <!--
      // View resolver that delegates to other view resolvers based on the
      // content type…

This Week in Spring - May 28, 2013

Engineering | Josh Long | May 29, 2013 | ...

Welcome to another installment of This Week in Spring. In case you missed it last week, the vast majorty of the SpringOne2GX 2013 agenda has been published, so book now and get the early bird rate on the conference, and airfare! As usual, we've got a lot to cover this week, so let's get to it!

  1. Spring Batch lead Michael Minella announced Spring Batch 2.2.0 RC2. The new release is chalk full of great new features including support for the Spring Batch Java configuration API and a Spring Data GemFire ItemReader and ItemWriter.
  2. Gary Russell just announced Spring Integration 3.0 milestone 2. Be sure to check out the new features and kick the tires!
  3. Join me for a webinar on Building REST-ful Services with Spring - June 13th, 2013. I'll discuss OAUTH, Spring MVC and Spring HATEOAS as it relates to REST.
  4. Rossen Stoyanchev's blogged about the upcoming support for WebSockets in Spring 4 and it looks very compelling!
  5. Gary Russell also just announced the Spring Integration MQTT extension adapter, milestone 1, that makes it easy to work with MQTT - a messaging technology that lends itself to lightweight messaging - from Spring Integration.
  6. Oliver Gierke has written up a great response to the question, how do I return a Spring Data page as JSON on Stack Overflow.
  7. Long-time readers of this roundup will know about Thymeleaf, the templating engine that breathes new life into your web application view templates and that works really well with Spring. The first, stable 2.0.0 version of Thymeleaf-testing has just been released.
  8. Joris Kuipers, on the Trifork blog, has announced a new set of macros for doing form inputs with Spring applications using Freemarker, an alternative - and very powerful - templating engine.
  9. Oleg Tsal-Tsalko put together a talk on the new bits in Spring 4. Nicely done, Oleg!
  10. Johnathan Mark Smith is back at it again, this time with a video on how to do Java configuration with Spring. Check it out!
  11. Maciej Walkowiak put together a great post on how to audit entities using Spring Data MongoDB.
  12. The poorly-named Java2J2EE blog has a great, short-and-sweet post on how to setup JPA and Spring MVC with Spring's Java configuration style. I would however discourage users from calling the lifecycle methods on a Spring FactoryBean directly, and instead choose to dereference the configured result:
    @Bean public EntityManagerFactory emf(){
       LocalContainerEntityManagerFactoryBean lcemfb = ..
       return lcemfb;
    } 
    
    @Bean public PlatformTransactionManager transactionManager(){
      EntityManagerFactory emf = emf().getObject();
      return new JpaTransactionManager( emf );
    } 
    
    

Spring Framework 4.0 M1: WebSocket Support

Engineering | Rossen Stoyanchev | May 23, 2013 | ...

As you may have seen, the first milestone of Spring Framework 4.0 was already announced and with it we've released early WebSocket support. Why WebSocket matters? It enables efficient, two-way communication over the web that is essential in applications where messages need to be exchanged between client (typically browser) and server at high frequency and with low latency. Common examples include trading, games, collaboration, data visualization, and others but the range of scenarios and use cases will grow over time.

WebSocket is a very broad subject! You can watch our “Intro to WebSocket” on…

This Week in Spring - May 21, 2013

Engineering | Josh Long | May 22, 2013 | ...

This Week in Spring

Welcome to another installment of This Week in Spring! We are finally running out of SpringOne2GX video recordings.. this is the last week in Spring that you'll see them, so refer back to the replays page for an index. As usual, we've got a lot to cover so let's get to it!

  1. Spring lead Juergen Hoeller just announced the release of Spring Framework 4.0 M1 and 3.2.3.RELEASE The 3.2.3 update mainly includes updates and fixes related to Java 8 support. The 4.0 milestone, on the other hand, is a look ahead to the many awesome features in Spring 4.0 including support for web sockets, Java EE 7, the @Conditional annotation (in the same vein as the @Profile annotation) and much more, so be sure to check it out!
  2. TcServer 2.9.2 is now available! The release contains security fixes and updates, for more details check out the release notes.
  3. Jennifer Hickey's talk -- Thinking outside the container - Standalone Applications on CloudFoundry has been released in HD on YouTube.
  4. Stephen Bohlen's talk --An Introduction to Spring.NET for Java developers, has been released in HD on YouTube.
  5. InfoQ has done a nice writeup of Spring HATEOAS
  6. Johnathan Mark Smith has put together a nice post on how to use Spring's Java configuration style.
  7. Xavier Padró has put together a nice post on how to communicate within a Spring Web Flow flow
  8. Static.com has announced their Hadoop and Cloud Foundry-powered service. Frankly, it looks really cool and cost-effective as a public platform on which to host applications that need a backoffice Hadoop solution.
  9. I can't believe I missed this! RabbitMQ 3.1.0 is out (slightly old news) and, to introduce it, you should check out this amazing RabbitMQ 3.1.0 in pictures.
  10. The HMKCode blog has a nice post on doing the not-so-well-documented, but common, things with a MyBatis, Spring and jUnit integration.
  11. The Java Code Geeks have put together a nice tutorial on how to process radio buttons in a form in Spring MVC.
  12. Gerry Tan has put together a nice blog on how to bind form date values with Spring MVC.

Spring Framework 4.0 M1 & 3.2.3 available

Engineering | Juergen Hoeller | May 21, 2013 | ...

Dear Spring community,

It's my pleasure to announce the first milestone towards Spring Framework 4.0, delivering a first cut of our work on several key themes:

  • the first wave of Java SE 8 / OpenJDK 8 support (some details following below)
  • initial support for JMS 2.0, JPA 2.1, Bean Validation 1.1, and JSR-236 concurrency (from the EE 7 umbrella)
  • a first cut of our generalized condition mechanism for bean definitions (@Conditional along the lines of @Profile)
  • Spring's WebSocket endpoint model (which Rossen will be introducing in more detail soon)

With respect to Java SE 8, we support OpenJDK 8 build 88+ in several areas of the framework:

  • support for the 1.8 bytecode format in component scanning and subclass generation
  • lambda expressions and method references against Spring callback interfaces
  • JSR-310 Date-Time value types for Spring data binding and formatting
  • initial support for the JDK 8 parameter name discovery mechanism

Note: Spring's Java 8 support is a work in progress and tracking OpenJDK 8 snapshots on their way to the JDK 8 Developer Preview date in September (see http://openjdk.java.net/projects/jdk8/). We expect to release a corresponding Spring Framework 4.0 release candidate around that time, to be presented at SpringOne (September 9-12; see http://springone2gx.com

This Week in Spring - May 14, 2013

Engineering | Josh Long | May 15, 2013 | ...

Welcome to another installment of This Week in Spring! Some rather exciting projects have been announced this week, and if you can believe it, we're almost out of SpringOne 2012 replay content! Good thing the SpringOne 2013 agenda grid is going live very soon, so we'll be able to look ahead. As usual, we've got a lot to cover so let's get to it!

In preparation for the agenda grid going live, a lot of new SpringOne 2013 sessions have been accepted:

  1. Jon Brisbin announced the Reactor project. The Reactor project aims to provide a solid foundation for asynchronous IO-based applications, on top of which it is natural to provide integrations for technologies like Grails and Spring. Reactor already features a good multi-language story with support for Groovy and Java (and, particularly, the upcoming Java 8 release!) Be sure to check this out, especially the comments section if you have questions about how this compares to other asynch technology!
  2. Spring Security lead Rob Winch has been busily enhancing the Spring Security and Spring Security OAuth Java Configuration story. He's got a first cut of the Spring Security OAuth Java Configuration API available, and I'm sure he'd appreciate any feedback on the new DSL, so definitely be sure to check it out! Nice work, Rob!
  3. Webinar on Thursday May 16th with Chris Richardson, author of POJOs in Action, on Decomposing Application for Deployability and Scalabilty. Register Now!
  4. Join Broadleaf Commerce's Andre Azzolini for a Webinar on Tuesday, May 28th as they discuss their Lessons Learned Moving from GWT to SpringMVC.
  5. Paul Chapman introduces some of the diverse support for content negotiation in Spring MVC on the SpringSource blog.
  6. Chris Harris's talk, the Spring Data MongoDB Project, from SpringOne2GX 2012 is now available in HD on YouTube!
  7. Lee Faus's talk, Extreme Makeover - Application Edition, from SpringOne2GX 2012 is now available HD on YouTube!
  8. The JIWHIZ blog, and blogger Yuan Ji, has put together a nice post introducing Spring's Java configuration support.
  9. This post - from blogger Chris Wong in a January post called "JmsTemplate is not evil" - explains some of the subtleties of using Spring's CachingConnectionFactory with a raw ConnectionFactory and then, for extra points, introduces one approach to dramatically speeding up ActiveMQ, in particular.
  10. The HMKcode blog has a nice, exhaustive post introducing how to use the jQuery-file-upload plugin with Spring MVC.
  11. Have you taken a look at HATEOAS yet? HATEOAS is a design pattern, an approach, for building better RESTful web services. Spring HATEOAS makes doing so dead simple atop Spring MVC, and this blog by Geraint Jones introduces Spring HATEAOS very nicely
  12. Blogger Alexey Zvolinskiy answers a common question: how do I bind checkboxes to the model object that's sent back and forth to the server in Spring MVC?
  13. Our friend @baeldung maintains a daily Twitter feed of awesome posts about Spring on StackOverflow, and I think he's dug up some absolutely amazing content. One post answers a question I am frequently asked: how do I enumerate all the Spring MVC @Controller-annotated beans at runtime?
  14. Another great post that I found while trawling through the @SpringAtSO handle was this post, explaining how to propagate request-scoped attributes beyond the thread of the current request. This post applies generally to any situation where a request-scoped attribute needs to propagate beyond its original thread and request.

Get the Spring newsletter

Stay connected with the Spring newsletter

Subscribe

Get ahead

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

Learn more

Get support

Tanzu Spring 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