Computerworld

MYOB's engineers speed innovation with microservices

Service-oriented design pattern delivers for accounting software firm

There is a revolution going on in the software engineering world, according to MYOB's CTO, Simon Raik-Allen: The shift away from building monolithic applications to microservices.

"You could argue it's been around for 20 years," the CTO says. "It probably has under different names and different guises, but it's now getting traction under its new name microservices."

Although the concept of service-oriented architecture has a (relatively) venerable history, Thoughtworks' Martin Fowler and James Lewis have argued there is at least some merit in distinguishing the idea of microservices from SOA.

"[T]he microservice style is very similar to what some advocates of SOA have been in favor of," the two noted in an article published in March.

"The problem, however, is that SOA means too many different things, and that most of the time that we come across something called 'SOA' it's significantly different to the style we're describing here."

"We've had the API revolution already — which has been fantastic. I'm a big fan of APIs; everything in my opinion should be built on an API. And once you've got that world where everything you've built is on an API, that now opens up the opportunity for services," says Raik-Allen.

For MYOB the shift to microservices has meant building more loosely coupled applications based on independent, reusable and more easily updated and deployed components.

Raik-Allen gives the example of an invoicing system that MYOB has recently been working on that is codenamed 'Popeye'.

"So you work in [MYOB's accounting application] Accountright and you create a new invoice. When you use Popeye, it looks at your account and goes, 'Ooh, I see a new invoice. Okay I will send it off to the person, I'll send them a link and make a little website for them.' Then the person receiving the invoice can come to that website, they can see all the invoices they've got they can click 'pay right now'," Raik-Allen says.

"It makes it very easy for you as a business owner to manage the sending and collection of payments. The system will remind the receiver that payment is in a few days. Yada yada. All the things that a business owner doesn't do well in terms of follow-up. It's a great little system."

"If I gave that to a regular engineer he'd say 'Okay, fine' — he'd go to a whiteboard and draw one box and a database and he'd be done," the CTO says. "But instead we've now drawn eight boxes and eight databases for that one app. There's a little piece of the puzzle which is the email gateway and the email management system, the scheduler. And then there's a payment gateway. Then there are two apps: There's one for the merchant who's signing up and saying 'I want these invoices in the system', and then there's one for the payees."

"Those are two separate services," the CTO says. "Then there's this whole 'what's the state of the invoice' — has it been paid, have we already sent a reminder out for it, has it even been sent at all, has it been finalised. And there's lifecycle management around invoicing and invoices — that's another service."

The whole application comprises some six to eight services, Raik-Allen says.

"What's nice about that is there are a lot of benefits: Firstly, you build in little pieces, so each piece is manageable on its own, each piece is deployable on its own, and each piece is updateable on its own."

Deploying a bug fix to the lifecycle management system won't affect the other services, for example. "It's a very nice, decoupled model," the CTO says.

"You can now test everything indecently, which means you can really get a much better guarantee of correctness for your applications."

The "icing on the cake" is the ability for other teams to easily build new applications using already existing services, Raik-Allen adds

"We've already seen that Popeye, before it was even in beta, we had other teams using various services."

"It's a real accelerator of innovation," Raik-Allen says. "I mean, I've been saying that about APIs for five years — but this is the icing on the cake on top of the APIs," the CTO says. "Not only is it in dev — it's also in [production]. It's awesome.