Sunday 25 October 2015

The Trouble with Robots - CHAPPiE and The Avengers: Age of Ultron

A movie update, while we're all waiting for Star Wars to turn up in December. This time it's all about robots and their relationship with their creators (without Mary Shelley, where would the film industry be?).

First up, CHAPPiE from District 9 and Elysium director Neill Blomkamp. To cope with the increasing crime rate in Johannesburg, the police turn to Tetravaal and their latest robot invention, created by Deon Wilson (Dev Patel), while Deon has a bright idea...


With a workable, if rather slow, story and decent enough effects, with a few A-List names to pull in the punters (Sigourney Weaver as Deon's boss and Hugh Jackman as his rival), this is a pretty good pizza movie IF you can stomach the idea of Afrikaaner Punks, which is where it falls down for me. And, for South Africa, surprisingly few black people.

Continuing the theme, I watched the latest Marvel release (Antman hasn't come out on DVD yet). After a successful raid by the Avengers on a Hydra fortress, Tony Stark (Robert Downey Jr.) experiments with what appears to be a new form of intelligence.


With lots of bangs and crashes we've become accustomed to by now, the plot is reasonable and tries to include a softer side, with the unlikely romance between Black Widow (Scarlett Johansson) and Bruce Banner (Mark Ruffalo), and Hawkeye's (Jeremy Renner) domesticity. James Spader provides the wit as the voice of Ultron, and I liked Iron Man's Hulk Smasher suit, but this felt to me like a mash-up of previous films, a film between other films. Plus this looks just awesome in comparison!

Wednesday 14 October 2015

London Java Community, Docklands - Swagger and Hazlecast

Tonight I went along to see two presentations hosted by the London Java Community Docklands branch at Credit Suisse, all wood panelling and soft carpets in the lobby:


First up was David Garry, whose soft Irish tones introduced us to Swagger, an open source REST API definition language and tool suite. You can either reverse engineer you existing API into Swagger or create a new one and generate code from that. The web site has a rather natty online editor:


which will allow you to roll your own definition as well as creating the source code for both server and client. Shown below is some the code produced for SpringMVC:

@Controller
@RequestMapping(value = "/addresses", produces = {APPLICATION_JSON_VALUE})
@Api(value = "/addresses", description = "the addresses API")
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.SpringMVCServerCodegen", date = "2015-10-13T22:20:28.432Z")
public class AddressesApi {

  @ApiOperation(value = "Addresses", 
                notes = "A collection of addresses.", 
    response = Address.class, 
    responseContainer = "List")
  @ApiResponses(value = { 
    @ApiResponse(code = 200, message = "An array of addresses"),
    @ApiResponse(code = 200, message = "Unexpected error") })
  @RequestMapping(value = "", 
                  method = RequestMethod.POST)
  public ResponseEntity<List<Address>> addressesPost(@ApiParam(value = "Latitude component of location.", 
  required = true) 
  @RequestParam(value = "latitude", required = true) Double latitude

It's a mess of annotations, as you can see, but I suppose if you've got a couple of hundred of these definitions, and you have to keep them all documented, Swagger can come in handy.

Next was David Brimley who introduced us to Hazelcast. A few months ago, Pakt had a free book offer and one I downloaded was on an introduction to the subject:


It's a kind of middleware for data services, styled as an "In-memory Data Grid", implying caching of data. It does implement the JCache standard (JSR107), but it also includes a messaging and event API, allowing you to be notified of changes in data; clustering and scaling of data "nodes"; and remote code execution (imagine Java stored procedures... sort of). David gave us a very thorough overview, given the limited time available to him.

Overall, it was a good set of lectures, but it wasn't a particularly relaxed venue: we had to give our name tags back, and there were no refreshments as at SkillsMatter. Next months Docklands do is at Barclays, so that might be a bit more relaxed. Not banking on it, though (sorry!).