Planet Apache

Syndicate content
Updated: 1 hour 23 min ago

Justin Mason: Links for 2014-03-25

Tue, 2014-03-25 18:58
  • Microservices and nanoservices

    A great reaction to Martin Fowler’s “microservices” coinage, from Arnon Rotem-Gal-Oz: ‘I guess it is easier to use a new name (Microservices) rather than say that this is what SOA actually meant’; ‘these are the very principles of SOA before vendors does pushed the [ESB] in the middle.’ Others have also chosen to define microservices slightly differently, as a service written in 10-100 LOC. Arnon’s reaction: “Nanoservice is an antipattern where a service is too fine-grained. A nanoservice is a service whose overhead (communications, maintenance, and so on) outweighs its utility.” Having dealt with maintaining an over-fine-grained SOA stack in Amazon, I can only agree with this definition; it’s easy to make things too fine-grained and create a raft of distributed-computing bugs and deployment/management complexity where there is no need to do so.

    (tags: architecture antipatterns nanoservices microservices soa services design esb)

  • Accidentally Turing-Complete

    slightly ruined by the inclusion of some “deliberately Turing-complete” systems

    (tags: turing computation software via:jwz turing-complete accidents automatons)

Categories: FLOSS Project Planets

Matt Raible: Documenting your Spring API with Swagger

Tue, 2014-03-25 14:13

Over the last several months, I've been developing a REST API using Spring Boot. My client hired an outside company to develop a native iOS app, and my development team was responsible for developing its API. Our main task involved integrating with Epic, a popular software system used in Health care. We also developed a Crowd-backed authentication system, based loosely on Philip Sorst's Angular REST Security.

To document our API, we used Spring MVC integration for Swagger (a.k.a. swagger-springmvc). I briefly looked into swagger4spring-web, but gave up quickly when it didn't recognize Spring's @RestController. We started with swagger-springmvc 0.6.5 and found it fairly easy to integrate. Unfortunately, it didn't allow us to annotate our model objects and tell clients which fields were required. We were quite pleased when a new version (0.8.2) was released that supports Swagger 1.3 and its @ApiModelProperty.

What is Swagger?
The goal of Swagger is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.

To demonstrate how Swagger works, I integrated it into Josh Long's x-auth-security project. If you have a Boot-powered project, you should be able to use the same steps.

1. Add swagger-springmvc dependency to your project.

<dependency> <groupId>com.mangofactory</groupId> <artifactId>swagger-springmvc</artifactId> <version>0.8.2</version> </dependency>

Note: on my client's project, we had to exclude "org.slf4j:slf4j-log4j12" and add "jackson-module-scala_2.10:2.3.1" as a dependency. I did not need to do either of these in this project.

2. Add a SwaggerConfig class to configure Swagger.

The swagger-springmvc documentation has an example of this with a bit more XML.

package example.config; import com.mangofactory.swagger.configuration.JacksonScalaSupport; import com.mangofactory.swagger.configuration.SpringSwaggerConfig; import com.mangofactory.swagger.configuration.SpringSwaggerModelConfig; import com.mangofactory.swagger.configuration.SwaggerGlobalSettings; import com.mangofactory.swagger.core.DefaultSwaggerPathProvider; import com.mangofactory.swagger.core.SwaggerApiResourceListing; import com.mangofactory.swagger.core.SwaggerPathProvider; import com.mangofactory.swagger.scanners.ApiListingReferenceScanner; import com.wordnik.swagger.model.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import static; @Configuration @ComponentScan(basePackages = "com.mangofactory.swagger") public class SwaggerConfig { public static final List<String> DEFAULT_INCLUDE_PATTERNS = Arrays.asList("/news/.*"); public static final String SWAGGER_GROUP = "mobile-api"; @Value("${}") private String docsLocation; @Autowired private SpringSwaggerConfig springSwaggerConfig; @Autowired private SpringSwaggerModelConfig springSwaggerModelConfig; /** * Adds the jackson scala module to the MappingJackson2HttpMessageConverter registered with spring * Swagger core models are scala so we need to be able to convert to JSON * Also registers some custom serializers needed to transform swagger models to swagger-ui required json format */ @Bean public JacksonScalaSupport jacksonScalaSupport() { JacksonScalaSupport jacksonScalaSupport = new JacksonScalaSupport(); //Set to false to disable jacksonScalaSupport.setRegisterScalaModule(true); return jacksonScalaSupport; } /** * Global swagger settings */ @Bean public SwaggerGlobalSettings swaggerGlobalSettings() { SwaggerGlobalSettings swaggerGlobalSettings = new SwaggerGlobalSettings(); swaggerGlobalSettings.setGlobalResponseMessages(springSwaggerConfig.defaultResponseMessages()); swaggerGlobalSettings.setIgnorableParameterTypes(springSwaggerConfig.defaultIgnorableParameterTypes()); swaggerGlobalSettings.setParameterDataTypes(springSwaggerModelConfig.defaultParameterDataTypes()); return swaggerGlobalSettings; } /** * API Info as it appears on the swagger-ui page */ private ApiInfo apiInfo() { ApiInfo apiInfo = new ApiInfo( "News API", "Mobile applications and beyond!", "", "", "Apache 2.0", "" ); return apiInfo; } /** * Configure a SwaggerApiResourceListing for each swagger instance within your app. e.g. 1. private 2. external apis * Required to be a spring bean as spring will call the postConstruct method to bootstrap swagger scanning. * * @return */ @Bean public SwaggerApiResourceListing swaggerApiResourceListing() { //The group name is important and should match the group set on ApiListingReferenceScanner //Note that swaggerCache() is by DefaultSwaggerController to serve the swagger json SwaggerApiResourceListing swaggerApiResourceListing = new SwaggerApiResourceListing(springSwaggerConfig.swaggerCache(), SWAGGER_GROUP); //Set the required swagger settings swaggerApiResourceListing.setSwaggerGlobalSettings(swaggerGlobalSettings()); //Use a custom path provider or springSwaggerConfig.defaultSwaggerPathProvider() swaggerApiResourceListing.setSwaggerPathProvider(apiPathProvider()); //Supply the API Info as it should appear on swagger-ui web page swaggerApiResourceListing.setApiInfo(apiInfo()); //Global authorization - see the swagger documentation swaggerApiResourceListing.setAuthorizationTypes(authorizationTypes()); //Every SwaggerApiResourceListing needs an ApiListingReferenceScanner to scan the spring request mappings swaggerApiResourceListing.setApiListingReferenceScanner(apiListingReferenceScanner()); return swaggerApiResourceListing; } @Bean /** * The ApiListingReferenceScanner does most of the work. * Scans the appropriate spring RequestMappingHandlerMappings * Applies the correct absolute paths to the generated swagger resources */ public ApiListingReferenceScanner apiListingReferenceScanner() { ApiListingReferenceScanner apiListingReferenceScanner = new ApiListingReferenceScanner(); //Picks up all of the registered spring RequestMappingHandlerMappings for scanning apiListingReferenceScanner.setRequestMappingHandlerMapping(springSwaggerConfig.swaggerRequestMappingHandlerMappings()); //Excludes any controllers with the supplied annotations apiListingReferenceScanner.setExcludeAnnotations(springSwaggerConfig.defaultExcludeAnnotations()); // apiListingReferenceScanner.setResourceGroupingStrategy(springSwaggerConfig.defaultResourceGroupingStrategy()); //Path provider used to generate the appropriate uri's apiListingReferenceScanner.setSwaggerPathProvider(apiPathProvider()); //Must match the swagger group set on the SwaggerApiResourceListing apiListingReferenceScanner.setSwaggerGroup(SWAGGER_GROUP); //Only include paths that match the supplied regular expressions apiListingReferenceScanner.setIncludePatterns(DEFAULT_INCLUDE_PATTERNS); return apiListingReferenceScanner; } /** * Example of a custom path provider */ @Bean public ApiPathProvider apiPathProvider() { ApiPathProvider apiPathProvider = new ApiPathProvider(docsLocation); apiPathProvider.setDefaultSwaggerPathProvider(springSwaggerConfig.defaultSwaggerPathProvider()); return apiPathProvider; } private List<AuthorizationType> authorizationTypes() { ArrayList<AuthorizationType> authorizationTypes = new ArrayList<>(); List<AuthorizationScope> authorizationScopeList = newArrayList(); authorizationScopeList.add(new AuthorizationScope("global", "access all")); List<GrantType> grantTypes = newArrayList(); LoginEndpoint loginEndpoint = new LoginEndpoint(apiPathProvider().getAppBasePath() + "/user/authenticate"); grantTypes.add(new ImplicitGrant(loginEndpoint, "access_token")); return authorizationTypes; } @Bean public SwaggerPathProvider relativeSwaggerPathProvider() { return new ApiRelativeSwaggerPathProvider(); } private class ApiRelativeSwaggerPathProvider extends DefaultSwaggerPathProvider { @Override public String getAppBasePath() { return "/"; } @Override public String getSwaggerDocumentationBasePath() { return "/api-docs"; } } }

The ApiPathProvider class referenced above is as follows:

package example.config; import com.mangofactory.swagger.core.SwaggerPathProvider; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.util.UriComponentsBuilder; import javax.servlet.ServletContext; public class ApiPathProvider implements SwaggerPathProvider { private SwaggerPathProvider defaultSwaggerPathProvider; @Autowired private ServletContext servletContext; private String docsLocation; public ApiPathProvider(String docsLocation) { this.docsLocation = docsLocation; } @Override public String getApiResourcePrefix() { return defaultSwaggerPathProvider.getApiResourcePrefix(); } public String getAppBasePath() { return UriComponentsBuilder .fromHttpUrl(docsLocation) .path(servletContext.getContextPath()) .build() .toString(); } @Override public String getSwaggerDocumentationBasePath() { return UriComponentsBuilder .fromHttpUrl(getAppBasePath()) .pathSegment("api-docs/") .build() .toString(); } @Override public String getRequestMappingEndpoint(String requestMappingPattern) { return defaultSwaggerPathProvider.getRequestMappingEndpoint(requestMappingPattern); } public void setDefaultSwaggerPathProvider(SwaggerPathProvider defaultSwaggerPathProvider) { this.defaultSwaggerPathProvider = defaultSwaggerPathProvider; } }

In src/main/resources/, add an "" property. This will need to be changed as you move your application from local -> test -> staging -> production. Spring Boot's externalized configuration makes this fairly simple.

3. Verify Swagger produces JSON.

After completing the above steps, you should be able to see the JSON Swagger generates for your API. Open http://localhost:8080/api-docs in your browser or curl http://localhost:8080/api-docs.

{ "apiVersion": "1", "swaggerVersion": "1.2", "apis": [ { "path": "http://localhost:8080/api-docs/mobile-api/example_NewsController", "description": "example.NewsController" } ], "info": { "title": "News API", "description": "Mobile applications and beyond!", "termsOfServiceUrl": "", "contact": "", "license": "Apache 2.0", "licenseUrl": "" } }

4. Copy Swagger UI into your project.

Swagger UI is a good-looking JavaScript client for Swagger's JSON. I integrated it using the following steps:

git clone cp -r swagger-ui/dist ~/dev/x-auth-security/src/main/resources/public/docs

I modified docs/index.html, deleting its header (<div id='header'>) element, as well as made its url dynamic.

... $(function () { var apiUrl = window.location.protocol + "//" +; if (window.location.pathname.indexOf('/api') > 0) { apiUrl += window.location.pathname.substring(0, window.location.pathname.indexOf('/api')) } apiUrl += "/api-docs"; log('API URL: ' + apiUrl); window.swaggerUi = new SwaggerUi({ url: apiUrl, dom_id: "swagger-ui-container", ...

After making these changes, I was able to open fire up the app with "mvn spring-boot:run" and view http://localhost:8080/docs/index.html in my browser.

5. Annotate your API.

There are two services in x-auth-security: one for authentication and one for news. To provide more information to the "news" service's documentation, add @Api and @ApiOperation annotations. These annotations aren't necessary to get a service to show up in Swagger UI, but if you don't specify the @Api("user"), you'll end up with an ugly-looking class name instead (e.g. example_xauth_UserXAuthTokenController).

@RestController @Api(value = "news", description = "News API") class NewsController { Map<Long, NewsEntry> entries = new ConcurrentHashMap<Long, NewsEntry>(); @RequestMapping(value = "/news", method = RequestMethod.GET) @ApiOperation(value = "Get News", notes = "Returns news items") Collection<NewsEntry> entries() { return this.entries.values(); } @RequestMapping(value = "/news/{id}", method = RequestMethod.DELETE) @ApiOperation(value = "Delete News item", notes = "Deletes news item by id") NewsEntry remove(@PathVariable Long id) { return this.entries.remove(id); } @RequestMapping(value = "/news/{id}", method = RequestMethod.GET) @ApiOperation(value = "Get a news item", notes = "Returns a news item") NewsEntry entry(@PathVariable Long id) { return this.entries.get(id); } @RequestMapping(value = "/news/{id}", method = RequestMethod.POST) @ApiOperation(value = "Update News", notes = "Updates a news item") NewsEntry update(@RequestBody NewsEntry news) { this.entries.put(news.getId(), news); return news; } ... }

You might notice the screenshot above only shows news. This is because SwaggerConfig.DEFAULT_INCLUDE_PATTERNS only specifies news. The following will include all APIs.

public static final List<String> DEFAULT_INCLUDE_PATTERNS = Arrays.asList("/.*");

After adding these annotations and modifying SwaggerConfig, you should see all available services.

In swagger-springmvc 0.8.x, the ability to use @ApiModel and @ApiModelProperty annotations was added. This means you can annotate NewsEntry to specify which fields are required.

@ApiModel("News Entry") public static class NewsEntry { @ApiModelProperty(value = "the id of the item", required = true) private long id; @ApiModelProperty(value = "content", required = true) private String content; // getters and setters }

This results in the model's documentation showing up in Swagger UI. If "required" isn't specified, a property shows up as optional.

Parting Thoughts
The QA Engineers and 3rd Party iOS Developers have been very pleased with our API documentation. I believe this is largely due to Swagger and its nice-looking UI. The Swagger UI also provides an interface to test the endpoints by entering parameters (or JSON) into HTML forms and clicking buttons. This could benefit those QA folks that prefer using Selenium to test HTML (vs. raw REST endpoints).

I've been quite pleased with swagger-springmvc, so kudos to its developers. They've been very responsive in fixing issues I've reported. The only thing I'd like is support for recognizing JSR303 annotations (e.g. @NotNull) as required fields.

To see everything running locally, checkout my modified x-auth-security project on GitHub and the associated commits for this article.

Categories: FLOSS Project Planets

Heshan Suriyaarachchi: Custom Log Formatter

Tue, 2014-03-25 11:09
Following is the source for a custom log formatter.

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.logging.Formatter;
import java.util.logging.Handler;
import java.util.logging.LogRecord;

public class CustomFormatter extends Formatter {

private static final DateFormat df = new SimpleDateFormat("dd/MM/yyyy hh:mm:ss.SSS");

public String format(LogRecord record) {
StringBuilder builder = new StringBuilder(1000);
builder.append(df.format(new Date(record.getMillis()))).append(" - ");
builder.append(record.getSourceMethodName()).append("] - ");
builder.append("").append(record.getLevel()).append(" - ");
return builder.toString();

public String getHead(Handler h) {
return super.getHead(h);

public String getTail(Handler h) {
return super.getTail(h);

Following is the way how the log messages will turn up in your log file.

25/03/2014 08:46:17.770 - [] - INFO - thread05 compositekey set time : 5 ms
25/03/2014 08:46:17.781 - [] - INFO - thread03 compositekey set time : 11 ms
25/03/2014 08:46:17.783 - [] - INFO - thread05 compositekey set time : 12 ms
25/03/2014 08:46:17.785 - [] - INFO - thread03 compositekey set time : 4 ms
25/03/2014 08:46:17.787 - [] - INFO - thread05 compositekey set time : 4 ms
Categories: FLOSS Project Planets

Bryan Pendleton: Condemned to repeat it?

Tue, 2014-03-25 09:05

Apparently, 15 years is just long enough to prove the worth of Santayana's famous saying ("Those who cannot remember the past are condemned to repeat it").

An interesting story in this weekend's San Francisco Chronicle: How tech became the enemy - then and now.

The flyer tucked on the windshield of a tech worker's car on South Van Ness didn't mince words: "The Mission has been colonized by pigs with money. ... They help landlords drive up rents, pushing working and poor people out of their homes."

The leaflet urged people to key the cars of wealthy new transplants: "Take action now!"

The year was 1999.

San Francisco, of course, is one of the few places I know of, outside Manhattan, that have some sort of rent control, and a lot of this current struggle turns out to be about money, behind the scenes:

Meanwhile, 31-year-old housing activist Erin McElroy was struggling to get the media to link housing and tech. Evictions performed using the Ellis Act peaked in 2000, and though they've risen sharply in the recent years - surging 81 percent last year alone - they haven't returned to the levels of the dot-com boom. But McElroy said more landlords were turning to buyouts and tenant harassment to get units back on the market. And she blamed it on tech money.

There are lots of things you can criticize the new tech giants for: kow-towing to the NSA, selling our personal information to marketers and advertisers, building corporate fortunes on the backs of deeply poor Asian factory workers, etc.

But it's hard to see them as the devil for providing high-paying, interesting, safe, productive jobs for young people.

I guess that's why I have trouble feeling much outrage for companies who provide safe transit for their employees.

Over here in the East Bay, I'm kind of out of the argument (though we have plenty of Google Buses here), so maybe I'm missing the whole point.

Am I? Drop me a line and let me know.

Categories: FLOSS Project Planets

Justin Mason: Links for 2014-03-24

Mon, 2014-03-24 18:58
Categories: FLOSS Project Planets

Ioannis Canellos: DevNation 2014

Mon, 2014-03-24 15:05
CamelOne + Judcon + Red Hat Connect Developer Exchange = DevNation

Starting from 2014 CamelOne will be part of a wider open source conference: DevNation.

DevNation 2014 will take place in San Fransisco on April 13 - 17.

Fabric8 @ DevNation

This year I'll be giving two talks at DevNation both related to Fabric8.

The first talk is going to be an introduction to Fabric8 and it will aim at people that want to know what Fabric8 is all about, the problems that it tries to solve, its architecture and its awesome features.

In the second talk we are going to dive deeper into Fabric8 and discuss on how you can code, provision and manage your application with Fabric8 in all different environments (private, public clouds, PaaS etc).

With the first community release of Fabric8 as an individual project right at the door, it's going to be a fantastic opportunity to learn about all the new stuff included in the release (and of course to have a beer or two).

See you there !!!

Categories: FLOSS Project Planets

Piergiorgio Lucidi: Packt Publishing 2000th title released

Mon, 2014-03-24 08:18

Packt Publishing has reached 2000 titles in their catalog and they are offering a free book for every purchased item.

Categories: FLOSS Project Planets

Adrian Sutton: Revert First, Ask Questions Later

Mon, 2014-03-24 06:02

The key to making continuous integration work well is to ensure that the build stays green – ensuring that the team always knows that if something doesn’t work it was their change that broke it. However, in any environment with a build pipeline beyond a simple commit build, for example integration, acceptance or deployment tests, sometimes things will break.

When that happens, there is always a natural tendency to commit an additional change that will fix it. That’s almost always a mistake.

The correct approach is to revert first and ask questions later. It doesn’t matter how small the fix might be there’s a risk that it will fail or introduce some other problem and extend the period that the tests are broken. However since we know the last build worked correctly, reverting the change is guaranteed to return things to working order. The developers working on the problematic change can then take their time to develop and test the fix then recommit everything together.

Reverting a commit isn’t a slight against its developers and doesn’t even suggest the changes being made are bad, merely that some detail hasn’t yet been completed and so it’s not yet ready to ship. Having a culture where that’s understood and accepted is an important step in delivering quality software.

Categories: FLOSS Project Planets

Adrian Sutton: Testing@LMAX – Test Results Database

Mon, 2014-03-24 06:01

One of the things we tend to take for granted a bit at LMAX is that we store the results of our acceptance test runs in a database to make them easy to analyse later.  We not only store whether each test passed or not for each revision, but the failure message if it failed, when it ran, how long it took, what server it ran on and a bunch of other information.

Having this info somewhere that’s easy to query lets us perform some fairly advanced analysis on our test data. For example we can find tests that fail when run after 5pm New York (an important cutoff time in the world of finance) or around midnight (in various timezones). It has also allowed us to identify subtly faulty hardware based on the increased rate of test failures.

In our case we have custom software that distributes our acceptance tests across the available hardware so it records the results directly to the database, however we have also parsed JUnit reports from XML and imported into the database that way.

However you get the data, having a historical record of test results in a form that’s easy to query is a surprisingly powerful tool and worth the relatively small investment to set up.

Categories: FLOSS Project Planets

Stefane Fermigier: Week-end readings #2

Mon, 2014-03-24 03:10

(A new series of post dedicated to interesting stuff found on the web).


Flask-User: an alternative to Flask-Security.


Scribe, a new in browser editor from the Guardian.

Data Modeling

How to model data that changes over time? Some pointers:

Temporal Patterns (Martin Fowler).

Five Tips for Managing Database Version Tables.

Temporal Tables & Asserted Versioning

Example using SQLAlchemy.

DBMS2 revisited: alternative data models

Categories: FLOSS Project Planets

Andrew Savory: Mastering the mobile app challenge at Adobe Summit

Sun, 2014-03-23 12:00

I’m presenting a 2 hour Building mobile apps with PhoneGap Enterprise lab at Adobe Summit in Salt Lake City on Tuesday, with my awesome colleague John Fait. Here’s a sneak preview of the blurb which will be appearing over on the Adobe Digital Marketing blog tomorrow. I’m posting it here as it may be interesting to the wider Apache Cordova community to see what Adobe are doing with a commercial version of the project…


Mobile apps are the next great challenge for marketing experts. Bruce Lefebvre sets the the scene perfectly in So, You Want to Build an App. In his mobile app development and content management with AEM session at Adobe Summit he’ll show you how Adobe Marketing Cloud solutions are providing amazing capabilities for delivering mobile apps. It’s a must-see session to learn about AEM and PhoneGap.

But what if you want to gain hands-on practical experience of AEM, PhoneGap, and mobile app development? If you want to roll up your sleeves and build a mobile app yourself, then we’ve got an awesome lab planned for you. In “Building mobile apps with PhoneGap Enterprise“, you’ll have the opportunity to create, build, and update a mobile application with Adobe Experience Manager. You’ll see how easy it is to deliver applications across multiple platforms. You’ll also learn how you can easily monitor app engagement through integration with Adobe Analytics and Adobe Mobile Services.

If you want to know how you can deliver more effective apps, leverage your investment in AEM, and bridge the gap between marketers and developers, then you need to attend this lab at Adobe Summit. Join us for this extended deep dive into the integration between AEM and PhoneGap. No previous experience is necessary – you don’t need to know how to code, and you don’t need to know any of the Adobe solutions, as we’ll explain it all as we go along. Some of you will also be able to leave the lab with the mobile app you wrote, so that you can show your friends and colleagues how you’re ready to continuously drive mobile app engagement and ROI, reduce your app time to market, and deliver a unified experience across channels and brands.

Are you ready to master the mobile app challenge?


All hyperbole aside, I think this is going to be a pretty interesting technology space to watch:

  • Being able to build a mobile app from within a CMS is incredibly powerful for certain classes of mobile app. Imagine people having the ability to build mobile apps with an easy drag-and-drop UI that requires no coding. Imagine being able to add workflows (editorial review, approvals etc) to your mobile app development.
  • No matter how we might wish we didn’t have these app content silos, you can’t argue against the utility of content-based mobile apps until the mobile web matures sufficiently so that everyone can build offline mobile websites with ease. Added together with over-the-air content updates, it’s really nice to be able to have access to important content even when the network is not available.
  • Analytics and mobile metrics are providing really useful ways to understand how people are using websites and apps. Having all the SDKs embedded in your app automatically with no extra coding required means that everyone can take advantage of these metrics. Hopefully this will lead to a corresponding leap in app quality and usability.
  • By using Apache Cordova, we’re ensuring that these mobile app silos are at least built using open standards and open technologies (HTML, CSS, JS, with temporary native shims). So when mobile web runtimes are mature enough, it will be trivial to switch front-end app to front-end website without retooling the entire back-end content management workflow.

Exciting times.

Categories: FLOSS Project Planets

Claus Ibsen: Apache Camel 2.13.0 released

Sat, 2014-03-22 02:43
We have just released Apache Camel 2.13.0 which you can download from Apache, as well from Maven Central. This release is about 6 months of work since Camel 2.12.0 was released.

In this release the community have contributed a number of new components such as integration with Splunk, Apache Hadoop 2.x, Infinispan, JGroups, and a few others. We also have a component to integrate with Apache Kafka, but currently the documentations is outstanding.

The Splunk component was developed and contributed by Preben Asmussen, whom wrote a blog post about it in action.

A number of open source projects has migrated to use the ASL2 license which allows us to provide the Infinispan and JGroups components out of the box - Yeah the ASL2 license rocks!

There is also a new language that leverages JSonPath which makes routing using JSon payloads.

We also improved support for Spring 4.x, so you should be able to use Spring with this release. However the release is built and tested against Spring 3.2.8. If you have any trouble let us know, but we intended to upgrade for Spring 4.x for the next release.

This release comes with the usual hardening, improvements and bug fixes we do for each release.

You can find more information in the release notes, and make sure to read the sections in the bottom of the page, when you upgrade.

Categories: FLOSS Project Planets

Justin Mason: Links for 2014-03-21

Fri, 2014-03-21 18:58
  • Microsoft “Scroogles” Itself

    ‘Microsoft went through a blogger’s private Hotmail account in order to trace the identity of a source who allegedly leaked trade secrets.’ Bear in mind that the alleged violation which MS allege allows them to read their email was a breach of the terms of service, which also include distribution of content which ‘incites, advocates, or expresses pornography, obscenity, vulgarity, [or] profanity’. So no dirty jokes on Hotmail!

    (tags: hotmail fail scroogled microsoft stupid tos law privacy data-protection trade-secrets ip)

  • Theresa May warns Yahoo that its move to Dublin is a security worry

    Y! is moving to Dublin to evade GCHQ spying on its users. And what is the UK response?

    “There are concerns in the Home Office about how Ripa will apply to Yahoo once it has moved its headquarters to Dublin,” said a Whitehall source. “The home secretary asked to see officials from Yahoo because in Dublin they don’t have equivalent laws to Ripa. This could particularly affect investigations led by Scotland Yard and the national crime agency. They regard this as a very serious issue.” There’s priorities for you!

    (tags: ripa gchq guardian uk privacy data-protection ireland dublin london spying surveillance yahoo)

  • A Look At Airbnb’s Irish Pub-Inspired Office In Dublin –

    Very nice, Airbnb!

    (tags: airbnb design offices work pubs ireland dublin)

  • Internet Tolls And The Case For Strong Net Neutrality

    Netflix CEO Reed Hastings blogs about the need for Net Neutrality:

    Interestingly, there is one special case where no-fee interconnection is embraced by the big ISPs — when they are connecting among themselves. They argue this is because roughly the same amount of data comes and goes between their networks. But when we ask them if we too would qualify for no-fee interconnect if we changed our service to upload as much data as we download** — thus filling their upstream networks and nearly doubling our total traffic — there is an uncomfortable silence. That’s because the ISP argument isn’t sensible. Big ISPs aren’t paying money to services like online backup that generate more upstream than downstream traffic. Data direction, in other words, has nothing to do with costs. ISPs around the world are investing in high-speed Internet and most already practice strong net neutrality. With strong net neutrality, new services requiring high-speed Internet can emerge and become popular, spurring even more demand for the lucrative high-speed packages ISPs offer. With strong net neutrality, everyone avoids the kind of brinkmanship over blackouts that plague the cable industry and harms consumers. As the Wall Street Journal chart shows, we’re already getting to the brownout stage. Consumers deserve better.

    (tags: consumer net-neutrality comcast netflix protectionism cartels isps us congestion capacity)

  • Micro jitter, busy waiting and binding CPUs

    pinning threads to CPUs to reduce jitter and latency. Lots of graphs and measurements from Peter Lawrey

    (tags: pinning threads performance latency jitter tuning)

  • The Day Today – Pool Supervisor – YouTube

    “in 1979, no-one died. in 1980, some one died. in 1981, no-one died. in 1982, no-one died. … I could go on”

    (tags: the-day-today no-one-died safety pool supervisor tricky-word-puzzles funny humour classic video)

  • The colossal arrogance of Newsweek’s Bitcoin “scoop” | Ars Technica

    Many aspects of the story already look like a caricature of journalism gone awry. The man Goodman fingered as being worth $400 million or more is just as modest as his house suggests. He’s had a stroke and struggles with other health issues. Unemployed since 2001, he strives to take care of basic needs for himself and his 93-year-old mother, according to a reddit post by his brother Arthur Nakamoto (whom Goodman quoted as calling his brother an “asshole”). If Goodman has mystery evidence supporting the Dorian Nakamoto theory, it should have been revealed days ago. Otherwise, Newsweek and Goodman are delaying an inevitable comeuppance and doubling down on past mistakes. Nakamoto’s multiple denials on the record have changed the dynamic of the story. Standing by the story, at this point, is an attack on him and his credibility. The Dorian Nakamoto story is a “Dewey beats Truman” moment for the Internet age, with all of the hubris and none of the humor. It shouldn’t be allowed to end in the mists of “he said, she said.” Whether or not a lawsuit gets filed, Nakamoto v. Newsweek faces an imminent verdict in the court of public opinion: either the man is lying or the magazine is wrong.

    (tags: dorian-nakamoto newsweek journalism bitcoin privacy satoshi-nakamoto)

  • Papa’s Maze | spoon & tamago

    While going through her papa’s old belongings, a young girl discovered something incredible – a mind-bogglingly intricate maze that her father had drawn by hand 30 years ago. While working as a school janitor it had taken him 7 years to produce the piece, only for it to be forgotten about… until now. 34″ x 24″ print, $40

    (tags: mazes art prints weird papas-maze japan)

  • Continuous Delivery with ETL Systems [video]

    Lonely Planet and Dr Foster Intelligence both make heavy use of ETL in their products, and both organisations have applied the principles of Continuous Delivery to their delivery process. Some of the Continuous Delivery norms need to be adapted in the context of ETL, and some interesting patterns emerge, such as running Continuous Integration against data, as well as code.

    (tags: etl video presentations lonely-planet dr-foster-intelligence continuous-delivery deployment pipelines)

  • The MtGox 500

    ‘On March 9th a group posted a data leak, which included the trading history of all MtGox users from April 2011 to November 2013. The graphs below explore the trade behaviors of the 500 highest volume MtGox users from the leaked data set. These are the Bitcoin barons, wealthy speculators, dueling algorithms, greater fools, and many more who took bitcoin to the moon.’

    (tags: dataviz stamen bitcoin data leaks mtgox greater-fools)

  • What We Know 2/5/14: The Mt. Chiliad Mystery

    hats off to Rockstar — GTA V has a great mystery mural with clues dotted throughout the game, and it’s as-yet unsolved

    (tags: mysteries gaming via:hilary_w games gta gta-v rockstar mount-chiliad ufos)

  • Make Your Own 3-D Printer Filament From Old Milk Jugs

    Creating your own 3-D printer filament from old used milk jugs is exponentially cheaper, and uses considerably less energy, than buying new filament, according to new research from Michigan Technological University. [...] The savings are really quite impressive — 99 cents on the dollar, in addition to the reduced use of energy. Interestingly (but again not surprisingly), the amount of energy used to ‘recycle’ the old milk jugs yourself is considerably less than that used in recycling such jugs conventionally.

    (tags: recycling 3d-printers printing tech plastic milk)

Categories: FLOSS Project Planets

Bryan Pendleton: Stuff I'm reading, March Madness edition

Fri, 2014-03-21 18:11

My bracket is a shambles ... Mercer?

But here's some madness of a different sort:

  • Brief History of Latency: Electric Telegraph Brief look at the history of the electric telegraph - how it came to be, how it was used, and the early problems it encountered. Namely, networking congestion, which was caused by routing and queuing delays!
  • Denial of Service AttacksOver the last year, we have seen a large number and variety of denial of service attacks against various parts of the GitHub infrastructure. There are two broad types of attack that we think about when we're building our mitigation strategy: volumetric and complex.

    We have designed our DDoS mitigation capabilities to allow us to respond to both volumetric and complex attacks.

  • Go Concurrency Patterns: Pipelines and cancellationGo's concurrency primitives make it easy to construct streaming data pipelines that make efficient use of I/O and multiple CPUs. This article presents examples of such pipelines, highlights subtleties that arise when operations fail, and introduces techniques for dealing with failures cleanly.
  • Marginally UsefulBut while it may be wishful thinking to imagine Bitcoin as a true currency, it’s a highly functional and effective technology. Bitcoin’s “block chain protocol” is built atop well-understood, established cryptographic standards and allows perfect certainty about which transactions occurred when.
  • HackHack is a programming language for HHVM that interoperates seamlessly with PHP. Hack reconciles the fast development cycle of PHP with the discipline provided by static typing, while adding many features commonly found in other modern programming languages.

    Hack provides instantaneous type checking via a local server that watches the filesystem. It typically runs in less than 200 milliseconds, making it easy to integrate into your development workflow without introducing a noticeable delay.

  • Facebook Introduces ‘Hack,’ the Programming Language of the FutureFacebook engineers Bryan O’Sullivan, Julien Verlaguet, and Alok Menghrajani spent the last few years building a programming language unlike any other.

    Working alongside a handful of others inside the social networking giant, they fashioned a language that lets programmers build complex websites and other software at great speed while still ensuring that their software code is precisely organized and relatively free of flaws — a combination that few of today’s languages even approach. In typical Facebook fashion, the new language is called Hack, and it already drives almost all of the company’s website — a site that serves more than 1.2 billion people across the globe.

  • Facebook VP of Engineering on Solving Hard Things EarlyBuilding great products is hard enough without allowing the ease of early management to fool founders into thinking they invented something new. Build great management, train new managers, and introduce sustainable, scalable structure now. Do not wait until world-class managers and radical re-orgs are needed to fix poor information flow or productivity problems.
Categories: FLOSS Project Planets

Bryan Pendleton: Skyrim snort for a Friday afternoon

Fri, 2014-03-21 15:23

It's not just a game, it's an obsession: The Cheesing of Lydia.

Categories: FLOSS Project Planets

Edward J. Yoon: 고급 분석 알고리즘 총 집합, Apache Hama 예제들을 알아보자!

Fri, 2014-03-21 02:51
Apache Hama의 예제들은 대단히 현실적이고 바로 써먹을 수 있는 고급 분석 알고리즘들로 꽉 차있다는 사실, .. 지금부터 알아보자.

현재 구현된 예제들은 다음과 같다:

  1. Bipartite-Matching 
  2. GradientDescent
  3. Kmeans
  4. NeuralNetwork
  5. PageRank
  6. SSSP
  7. Semi-Clustering 
대충 보면 학창시절 어디서 한번 씩은 들어본 (게다가) "몇 개 되지 않는 알고리즘들, 뭐 어쩌라고?" 할지 모른다. 그러나 이는 우리가 선진 웹 서비스에 어떻게 녹아 있는지, 나는 어떻게 활용해야하는지 잘 모르기 때문에 그런거다. 
후루룩 훑어보면, Bipartite Matching, 짝에 남자 출연자와 여자 출연자 선호도를 가지고 최대 매칭수를 뽑는 뭐 그런거다. 소셜 네트워크 서비스나, 이미지 검색 시스템 등에서 활용 될 수 있다 (아! Semi-Clustering 도). Google Images에서의 감동적인 유사 이미지 검색을 보라. 이런 서비스 기반엔 이미지 프로세싱, 그래프 이론과 기계학습 등이 숨어있었단 말이지. 또, Gmail에 스팸, 그리고 Primary와 Social 등 메일 종류 분류해주는 것도 기계 학습에 의한 것으로 보면 된다. 
K-Means와 Neural Network은 군집분석과 추천 엔진 등에 활용될 수 있다. 또, PageRank, SSSP, 그리고 K-core 같은 그래프 알고리즘은 사회 망이나 복잡계 네트워크 분석 툴로 쓰일 수 있고, 더 나아가서 생물정보학, 자동차/선박 부품 분석에도 유용하게 적용 가능하다는 사실. ㅠ.ㅠ
자 요약하면, 쇼핑몰, 정보 검색, 영상처리, 사회망 서비스, 제조 회사, ... 등 다양한 산업의 빅 데이터 분석에 당장 써먹을 수 있는 현실적인 분석 알고리즘! 아마도 빅데이터 분석의 대부분은 MapReduce를 통한 적절한 가공과 Hama 예제만으로도 가능할 것이다.

수집과 가공은 중간 단계물이고, 결과물은 언제나 분석에서 나온다!
Categories: FLOSS Project Planets

Adrian Sutton: Javassist &amp; Java 8 – invalid constant type: 15

Thu, 2014-03-20 23:32

Here’s a fun one, we have some code generated using javassist that looks a bit like:

public void doStuff(byte actionId) {
switch (actionId) {
case 0: doOneThing(); break;
case 1: doSomethingElse(); break;
throw new IllegalArgumentException("Unknown action: " + actionId);

This works perfectly fine on Java 6 and Java 7 but fails on Java 8.  It turns out the problematic part is "Unknown action: " + actionId. When run on Java 8 that throws “ invalid constant type: 15″ in javassist.bytecode.ConstPool.readOne.

The work around is simple, just do the conversion from byte to String explicitly:

throw new IllegalArgumentException("Unknown action: " +

There may be a more recent version of Javassist which fixes this, I haven’t looked as the work around is so trivial (and we only hit this problem in the error handling code which should never be triggered anyway).

Categories: FLOSS Project Planets

Justin Mason: Links for 2014-03-20

Thu, 2014-03-20 18:58
Categories: FLOSS Project Planets

Tim Bish: Packt Publishing now has 2000 titles and a great sale.

Thu, 2014-03-20 11:26

Packt is celebrating it's 2000th title and has a cool buy one get one free offer.  This is a great time to add to your personal library and start learning some new tech skills.  Its also a great time to grab a copy of my ActiveMQ book at Packt.

The sale ends 26th-Mar-2014 so don't wait to long.
Categories: FLOSS Project Planets

Nick Kew: 2005 revisited

Thu, 2014-03-20 09:43

Yesterday’s budget sounded a note of optimism.  The economy is growing, the deficit is shrinking, and …

… hang on …

… the deficit?  We’re running a still-huge deficit when we’re in the cyclical boom?   Right, straight back to the bubble-economics that got us into trouble in the first place!

2005 was kind-of the opposite.  The economy was slowing, the credit bubble had grown beyond sustainable, house prices were stumbling, and we were staring at recession.  The government of the day spent its way out with a huge dose of Ballsian stimulus: add fuel to the fire, buy a couple more years feelgood at the price of turning that recession into the biggest slump for 30 years.

The chancellor of the day rationalised breaking his own rules by explaining that when he had talked of a balanced budget, he meant over the economic cycle.  So at the bottom of the cycle in 2005 he would spend more, and make it up when the economy recovered.  Ed Balls said much the same even as his idea collapsed in flames.  And now … today’s chancellor has made clear his own commitment to Osbrownomics: run a huge structural deficit and – currently – claim the credit when a cyclical boom takes a few quid off the headline figure.

Hmmm … not really so different to 2005 after all …

On the plus side, the mood music about savings is a real change, and a welcome one.  It will probably work for some time, propped up by “safe haven” status for the global super-rich.  But that of course is another bubble involving prostituting our economy most wantonly!  One day sentiment towards Sterling will change, and then what can survive a round of Weimar inflation in commodities including food and energy?

Categories: FLOSS Project Planets