Archive for the ‘conference’ Category


Digesting Microservices at muCon

On Friday, I had the privilege of presenting at the very first Microservices conference – muCon. In my talk, Engineering Sanity into Microservices, I spoke about the technical issues surrounding state in distributed systems as a whole, how these become a bigger problem as the number of deployed services goes up, and a few suggested patterns that will help you stay sane. The video is now available on the Skilllsmatter site (registration required).

MuCon was a really enjoyable single-topic conference, the talks ranged from high-level CTO-type overviews all the way to the gory details, and war stories. It will be interesting to turn up next year to hear more of the latter.

My biggest takeaway was from Greg Young’s presentation The Future of Microservices, where he spoke about Conway’s Law. As a reminder:

Organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations
— M. Conway

The topical corollary to which he explained as (I paraphrase):

Siloed organizations will never be able to get the benefits of a microservice architecture, as it does not correspond to their communication structures.

Read that again, and really let it sink in.

I will put a layer of interpretation on this: SOA is absolutely not dead. It is a useful tool for highly compartmentalized organizations. Microservices is not its replacement. They are two different tools for different organizational types.

That insight alone was worth turning up for.

Get Functional

That was the message that was coming through the Devoxx conference presentations this year. The idea that it will help your code run in the brave new world of multi everything (multi-core, multi-thread etc.) is one that’s widely touted, but rarely the primary driver for its use. Instead, it’s about less code, that’s more easily understood. When you do get to scaling it, it won’t do any harm either.

As Guillaume Laforge tweeted, from 800 Java developers in his session, only 10 knew/used Scala, 3 Clojure, 20 Ruby, and 50 were on Groovy – which gives a nice gentle introduction to some of the constructs for those looking to wade in. Good stats to cut through they hype. So what of the roughly 90% slogging on without closures, does this mean that they have to miss out on this fun?

Quite simply, no. There’s heap of drop in libraries that you can add into a Java project for all manner of functional goodness, and which don’t change the syntax of the language. LambdaJ for example gives a nice functional way of dealing with collections. To steal an example directly from the website, the following typical Java code:

List<Person> sortedByAgePersons = new ArrayList<Person>(persons);
Collections.sort(sortedByAgePersons, new Comparator<Person>() {
        public int compare(Person p1, Person p2) {
           return Integer.valueOf(p1.getAge()).compareTo(p2.getAge());
        }
});

is replaced with:

List<Person> sortedByAgePersons = sort(persons, on(Person.class).getAge());

Fancy a bit of map-reduce without a grid? Well, it comes stock-standard with the Fork Join (JSR166y) framework that will be added to the concurrency utilities in JDK 7. If you don’t fancy waiting until September 2010 (the latest expected date for the GA release), it’s downloadable here. As an aside, Doug Lea has written a really good paper on the FJ framework.

Don’t fancy loops in loops in loops to filter, aggregate, do set operations with all the null checking that Java programming typically entails? Well, the Google Collections library (soon to be integrated into Guava, a set of Google’s core libs), contains predicates and transform functions that make all of this a lot easier to write and reason about. Dick Wall had a great presentation about this showing just how much code can be reduced (heaps).

A thing I heard a number of times outside the sessions was, “I don’t know about all this stuff, surely as we get further from the metal, performance suffers”. Sure, it gets harder to reason about timings as the abstractions get weirder, but the environment gets better all the time, and the productivity gains more than outweigh performance in all but the most perf-intensive environments. Brian Goetz spoke about how the JVM supports this new multi-language world. Not something that I had ever really given much thought to, but the primary optimizations aren’t at the language compiler level (javac, scalac, groovyc etc.)- they’re are all done at runtime, when the JVM compiles the bytecode. The number of optimizations in HotSpot are massive (there was a striking slide showing 4 columns of individual techniques in a tiny font). Multiple man-centuries of effort have gone into it, and each new release tightens it up. If you’re not sure, then profile it and make up your own mind. JDK 7 will also see the VM with some goodness that will make dynamic languages really fly.

One thing that still sticks out like a sore thumb is Closures support in Java. It’s not a candidate for inclusion in JDK 7, and the proposed syntax shown at the conf by Mark Reinhold looks pretty ugly when compared to other langs (see the proposal by Neal Garter). Either way, not a sniff of actual implementation. I understand there’s some serious work on the VM to make any of this possible regardless of the syntax. Not holding my breath. [Closures will actually be in JDK7 – thanks Neal.]

All up, I’m pretty excited by all this, and can’t wait to get my hot little hands on some of these tools. The functional style yields code that’s much easier to read and reason about, and the fact that it’s essentially all Java syntax, means that there’s no reason not to apply it. If you’re already comfortable with using EasyMock on your team, you won’t find it a huge mind shift.

Sucky Way to End a Great Conference

I just got this in the mail this morning

“The JavaOne conference team has been notified by the San Francisco Department of Public Health about an identified outbreak of a virus in the San Francisco area. Testing is still underway to identify the specific virus in question, but they believe it to be the Norovirus, a common cause of the “stomach flu”, which can cause temporary flu-like symptoms for up to 48 hours. Part of the San Francisco area impacted includes the Moscone Center, the site of the JavaOne conference which is being held this week. We are working with the appropriate San Francisco Department of Public Health and Moscone representatives to mitigate the impact this will have on the conference and steps are being taken overnight to disinfect the facility. We have not received any indication that the show should end early, so will have the full schedule of events on Friday as planned. We hope to see you then.

Please see the attached notification from the Department of Public Health.

For further information, as well as Frequently Asked Questions related to the Norovirus, please visit the San Francisco Department of Public Health website at http://sfcdcp.org/norovirus.cfm

 

Well, that sucks.

Pimping Builds

From the Pimp My Build session by the Atlassian guys.

  • Use Ant imports. The imported stuff can check for preconditions and fail cleanly using the <fail unless=”…”> tag.
  • Use macros.
  • Don’t build stuff you don’t need using the <uptodate> task. Use <outofdate> from ant-contrib, which is even better.
  • You can use audio snippets to tell you when you screw it all up :)
  • You can filter messages in builds using the Unix shell to notify you of actually important stuff rather than the standard boiler plate.
  • Don’t be afraid to write tasks – everyone should know how the build works. Don’t be precious about it. If you have repetitive tasks, why not script it?
  • Use scripts. You can embed Javascript directly into your Ant build via a <[CDATA[..]]> block
  • Use conditional tasks (ant-contrib) <if> <then> <else>
  • Don’t do one-off analysis. PMD, Checkstyle and Findbugs can be scripted! I found this to be particularly useful. Much easier to find issues, especially if coupled with continuous integration.
  • Document your build! Ant targets have descriptions. You do it with your code, why not your build artefacts? Use the -target_name convention for private targets.
  • Use continuous integration. This has been an absolute life changing thing for me as a developer.
  • Test in your builds!!! JUnit, TestNG et al.
  • Maven tips:
    • Use a remote repository proxy – caches are good (Apache Archiva). Helps performance and stability – make sure you can run when the net goes down.
    • Create a local repository for private artifacts
    • Local repository for public artifacts – third party Jars or commercial stuff not available in public repositories

Oh yeah, Ivy is good when you aren’t using Maven.

Service Integration with SCA and Tuscany

The nice thing about JavaOne is that if you can’t get into the session that you wanted, the fall-back option probably kicks butt anyway :) Having missed out on the Grails/JFX/Android combo, I had the pleasure of getting the low down on Apache Tuscany, an open source Service Component Architecture(SCA) implementation. Tuscany is really about empowering the domain developer to produce and integrate local and remote services in the same way without caring about the underlying transport details.

Think dependency injection where the services that your class uses being accessible on some remote point in the cloud, and exposed using web services. As far as you are concerned, you use the interface, and let Tuscany take care of the rest. Likewise, if you want to expose your service classes to the cloud, you code up the business logic, and leave Tuscany to weave its magic. Great stuff!

CommunityOne First Impressions

Well. it’s true what they say about Americans. They like to do things big. I hadn’t had my head around exactly what 15000 people at a conference would look like, but I’m slowly beginning to. Moscone is bloody huge! All this space, and I’m having trouble finding a coffee though :( Thankfully can see folks getting the juice of the bean set up :) The swag is great.

Today’s schedule is all about community stuff, everything from operating systems, tools, tools and languages. Scripting is the flavour of the moment: Groovy, Ruby, Python. I only have a few things of real interest scheduled in today (nice light start compared to tomorrow) – Lightning Talks and JUGs. The unconference looks like it will be the big ticket item for me.

JavaOne Flights and Accomodation at the Last Minute

Despite the fact that is the world’s biggest conference out there, it seems that San Francisco is more than capable of dealing with it. I booked my flights a few weeks back, and have planned to stay with friends, but buying stuff at the last minute is definitely an option since neither cost nor availability seem that big an issue. If you have the nerve to hold out, flights from London can be bought today for £313 (one-stop, I paid around £140 more than that for a direct one), and there are heaps of hotels in the immediate vicinity of the Moscone Center doing really good discounts through sites like hotelclub.com. Good one to keep in mind for future reference.

JavaOne Flights Booked

Everything is finally booked and I am looking forward to hitting the shores of San Francisco next weekend. The lineup looks really good and I’m still having difficulty choosing between the sessions. I will also be at CommunityOne, which looks outstanding for a free event. 14 tracks!? Amazing! Hats must go off to the organizers. The only session that I have firmly fixed is on Java User Groups, but I have no doubt that the rest of the schedule will work itself out with ease.

I hope to be blogging live (ie. unedited notes and opinion) while there, but that all depends on how the laptop batteries manage to hold out. Fingers crossed!

All that and I get to sample Delta Airlines’ world famous hospitality too 😉

JavaOne Pre-booking

I finally got around to booking in onto some of the tech sessions for JavaOne in San Francisco next month. Gasp! The amount of stuff going on is incredible. From new languages on the JVM (Fortress, Scala, JRuby) to SOA, mobility and techniques in app development it’s pretty easy to book up 12 hours a day. My approach, lock in a full programme of stuff that looks good, and turn up if the brain is still functioning. It has taken the better part of an hour to read through the sessions for the Tuesday, so it’s no easy task. I can’t wait. All I have to do is get around to sorting out the minor detail of a flight from London 😉

Desktop Apps made easier, JavaFX and that ESB thing…

Isn’t it always the way, when you want to blog other stuff comes up? I had intended to write up a final post about the last day of Tech Days, but the weather has been great to get the kite out and the holiday is winding down so…

Day 3 was pretty cool, as I went to a few tech sessions related to stuff that I don’t normally work with, as I do web apps most of the time. The Netbeans sessions were pretty good, with a great demo of the Matisse GUI Builder. I think that with Netbeans 6, Java has finally got it’s answer to the VB/Delphi mode of development. The introduction of the Swing Application Framework (JSR 296) and Beans Binding (JSR 295), really takes away a lot of the grunt work in building small to mid sized desktop apps, and Netbeans does a great job in hiding a lot of the initial application setup code. It’s really nice stuff, and to be honest it really drops the barrier to entry. At some stage you will inevitably need to get into the bowels of Swing, but Matisse gives you a great leg up and means that the learning curve can be that little bit easier. The fact that basic CRUD type applications are pretty well automatically generated is a huge help and lets you get down to doing the interesting bits.

I had the pleasure afterwards to turn up to Jim Weaver’s presentation on Java FX that give a great overview of how the technology worked from an architectural perspective. The user interface is defined using FX Script, which has a weird nested CSS-ish feel to it and is used to define your interface, event handlers and UI transitions. This is then compiled down to a Java app. The apps themselves are distrubuted either as applets (remember those?) or via Webstar/JNLP and talk to the home server via JSON invocations, which means that anything can support the interface on the server side. It would be cool to have a play with sticking a Grails app on the back. Nifty stuff.

The last session was no less interesting, as I am finally getting my head around this ESB stuff! I’ve always found the concept a bit esoteric, not having worked in an environment that uses a bus and it’s not something that lends itself easily to kicking the tires. SOA initiatives that I have worked on in the past involved point to point hooks, but I can really see why the ESB concept might come in handy. It’s very easy to get bamboozled by talk of federation, mediation and orchestration. Essentially the idea is pretty simple – hook up everything to a massive pipe, define standard messages and worry only about communication with the pipe itself. The devil, as in any such thing, is in the details – but essentially the pipe handles things like transactionality, message delivery, data transformation, enrichment, routing and the like through underlying mechanisms. You need to understand how to use the specific pipe in question, as with any such piece of infrastructure, but the payoff looks really good. I have not yet come across a decent guide in layman’s english (not a marketecture white paper) as to how to get everything humming, but I feel like the pieces are falling into place.

Winding down the Australia trip this week for my migration to London. Back to reality – CVs, agents, company setups, finding apartments and poms 😉 All I have to deal with is a flood of contractors on the market because of the sub-prime debacle (wasn’t Basel2 supposed to make sure this nonsense wouldn’t happen?) and the April budget rounds. Bring it on!