Showing posts with label web services. Show all posts
Showing posts with label web services. Show all posts

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!).

Saturday, 18 June 2011

Cloud Foundry

I attended the London Spring User Group seminar on the Cloud Foundry. This is styled as "Platform as a Service (PaaS)", which extends services such as Azure and AWS to allow deployment of web services (in the larger sense) involving multiple technologies. The talk was given by Russ Miles, who had the habit of walking up and down, causing the video podcast to have to re-focus every so often. Russ demonstrated the public service by deploying Java, JavaScript and Ruby code and then did the same with a private Cloud Foundry he's set up on his own server.