Technology and stuff by Martin Anderson

Tag Archives: Actors

The fear of public speaking regularly comes in at number 1 in a top 10 of people’s biggest fears. It’s generally agreed that the idea of standing up in front of a group of people to give a talk is terrifying so you won’t judge me too harshly when I say that I was lightly cacking my pants when I went to the London Java Community Open Conference last week since I planned to be up on stage to give my first ever talk.

Unlike normal conferences where you have a schedule of speakers in advance, in an Open Conference anyone can put their name down for a talk. I decided that is something is worth doing then it’s worth doing twice by entering two talks: one 30 mins talk detailing my current team’s work as we rebuild a high volume website in Java (peaks of 30,000 executions in a minute and 88,000 http requests per SECOND! – slides) and one lightning talk of 5 minutes only to compare threads and actors for concurrency (slides).

Supplied with enough coffee and pastries to gird my loins, I put my name in for both and went in for the main kickoff session from Martijn Verburg and Ben Evans. As soon as that had finished I darted out to look at the schedule and saw what every first time speaker wants to see- I was first up!

Joking aside, this is perfect since you don’t end up sitting waiting for your turn and I bolted to my meeting room and got set up as quickly as I could. That I could welcome everyone in made me feel in control but with less than 5 minutes to go I only had way fewer people that I had hoped. Let’s face it, as a first time speaker you want to steer between the Scylla and Charybdis of too few and too many attendees. There’s no way I want to give my talk to the entire conference but likewise, I’d feel a little foolish giving it to only a couple of people.

Thankfully, the last couple of minutes before the start time saw the room fill up and I gave my talk to a full room of about 25 people. It may have been a bit of a cheat but the majority of this talk was based on the one given by Tim Morrow at Velocity EU so not only did I know the topic well but I had seen it been given by an experienced (and good!) speaker already. As soon as I got passed the first slide any nervousness had evaporated and I was off and running. I’d practised it a few times so timing the talk was not hard and the presenter view on powerpoint rocks since it gives you both the running time and your progress through your deck of slides. I was a little nervous about question time but since this was a case study on my own work I was on pretty safe ground.

My second talk was after lunch which meant that I had to sweat through that and the 3 speakers before me. That and the fact that this one was going to be to the full Five minute talks are simultaneously easy and hard – your time is too short to get into too much detail so you can focus on the area in hand (i.e. the bits you know!) but you have to have a perversely good understanding to explain your topic in only 5 minutes since you only have time for salient points. I was way more nervous for my lightning talk but again the waiting was far worse than actually standing up there and talking. Again, the questions were the hard bit and someone asked a great question that I didn’t know the answer to – “will Akka support Java in the future?”. What was cool was that the best way to answer this was to join up to the Akka user mailing list (something I have been meaning to do but never have) and ask and it doesn’t get much better when the Tech Lead and the CTO of the company behind Akka answer (“Abso-friggin-lutely, wouldn’t want it any other way.” according to the Tech Lead).

So how did it feel to finally give a talk? I felt far more involved that I ever had before. Yes people come up and talk to you afterwards and you end up chatting with other speakers whether you like it or not (and you do!) but the effort you put into your talk means that you are naturally interested in what everyone else is talking about and whether it affects your topic. The whole subject of the conference seems far more related to your own interests. It might be because you are interested enough in that topic to want to give a talk on part of it but I think that giving something back in this fashion creates an emotional bond that dispels any sense of imposter syndrome and just lets you enjoy the conference more. You don’t have to find a justification for just being there and you also learn far more.

So if you are thinking about giving a talk, all I can say is get stuck in and give it a go.

My work has kicked into top gear in the last couple of weeks. I’ve had so many demands on my time that I have been unable to do any coding. Now I know that that is part and parcel of being a Tech Lead but the moment you step away from the code you start to lose the qualities that make you so useful to the business, i.e. being able to stick your nose into the codebase and shout “Yep, I know what this bit does.”

So I’ve been spending a few hours every night keeping my skills sharp on a project that a) has a direct impact on what I do everyday and b) is bloody good fun. How much fun I here you ask? So much that my wife forced me to sleep in the “huff” bed (the spare room – where you go when you are too angry or too drunk to sleep together) since I kept talking about what I was doing.

So what is it? Some multi-threaded mayhem of course!

Not really of course. I regard manual thread manipulation and the last refuge of fools and geniuses and I ain’t either. My current project is a web application which makes a large number of concurrent requests for each page request. We use various bits of the java.util.concurrent libs to do this. This works great but at scale can cause issues since each thread takes a few MB. Once you’ve spun up a couple of thousand of them, your machine has eaten itself. A solution to this would be to use Actors instead and since the excellent Akka framework can be used in Java and not just Scala I thought I would give it a go. At the same time, since it was a home project I thought I would use Git for version control.

I finished up the project today and it’s pretty cool. Akka’s syntax in Java is comparatively clunky to its syntax in Scala but I’ve seen far worse. Some perf testing on Monday should show what difference it makes and if it is good enough I might take it to the next LJC meeting.