Software

Devops

Microservices guru warns devs that trendy architecture shouldn't be the default for every app, but 'a last resort'

Old-style monolithic but modular software is 'highly underrated'


QCon London Sam Newman, author of Building Microservices and Monolith to Microservices, told attendees at the QCon developer conference in London that "microservices should not be the default choice."

Microservices have become today's equivalent of "nobody ever got fired for buying IBM", a common catchphrase back in the '80s, said Newman. "With half of all the clients I have worked with, I have told them microservices are not for you."

In case you should doubt him, another session at QCon described how Segment, a data analytics company based in San Francisco, went "to microservices and back again."

"After years of continuing to add to our microservice architecture we found ourselves in a spot where our developer velocity was quickly declining and we were constantly tripping over our microservice architecture and its complexity," said the abstract. "Moving to a monolith was the solution that worked for us."

The implication is not that microservices are no good, but that developers have adopted them too readily, persuaded by the benefits. The idea of microservices is that decomposing an application into small independent services makes it possible to update it more quickly and safely, and to scale more efficiently, whereas applications that are compiled into a single large executable – monoliths – require all-or-nothing deployments that are harder to coordinate.

Explaining the benefits of microservices, Newman said: "There are lots of reasons why we might pick a microservices architecture, but the one I keep coming back to is this property of independent deployability."

If you want to make a change to some part of an application, such as the part that covers shipping, "I should be able to deploy that shipping service into a production environment without having to change the rest of the system. This helps to ship software more quickly and it helps our teams work in a more autonomous fashion."

What, then, is the problem? The core issue seems to be that it is hard to do microservices well. Newman described what he called "the worst of the monoliths, the distributed monolith". This describes a system that has been decomposed into multiple processes, "but for whatever reason, we have to deploy the entire system together as part of a lockstep release. Often this can occur because we've got our service barriers wrong. We're smearing business logic all over these different layers. We're having to coordinate between multiple teams to get anything done."

A sign of trouble, said Newman, is that "if you have a full-time release coordination manager, chances are you have a distributed monolith." Newman sees great value in continuous delivery, where software is automatically built and tested and therefore already ready for release.

The distributed monolith has the deployment complexity of a microservices architecture, but without its benefits. The services lack the "independent deployability" critical to success.

This was a popular session at QCon. Why? A clue came when Newman asked attendees if they have some application or system that is "too big, that you're trying to make smaller." Hands went up all over the room.

Modularity

Newman made the point that even applications deployed as a single process, or monoliths, can be modular in their design, with different teams working on each module. It is nothing new – it's an idea "from the early 1970s around structured programming", he said. This gives "a degree of independent working" and is "a highly underrated option". A potential problem with modular applications is that "people tend to be not good at defining module boundaries or having discipline about how module boundaries are formed" – the result being "they descend into a ball of mud". Overcome this, though, and many organisations "would be better off" with a modular monolith than with a microservices architecture.

It is worth noting too that if you have a well-designed modular application, decomposing it into microservices is relatively easy. You will be able to reuse a lot of the code because the concept of isolated sections of code dealing with different features is already in place. The "units of decomposition," said Newman, are the "domain concepts, such as invoicing, notifications and order management."

"Monolith has become a replacement for the term we used to use, which was legacy. It's a problem because some people are starting to see any monolith as something to be removed. That's deeply inappropriate. The monolith is not the enemy. This is not the problem that you've got."

Given that microservices are not the right solution in every case, what are the clues that an existing monolithic application might actually be a good candidate for decomposing into microservices? "You've tried all the easy stuff," Newman told The Register. "Have you done some value chain analysis? Have you looked at where the bottlenecks are? Have you tried modularisation? Microservices should be a last resort."

Even scalability may not be a good enough reason to adopt microservices. "My clients say, my application doesn't scale. I ask, have you tried running 10 copies of your monolith? And they haven't. Do all the easy stuff first." ®

Send us news
41 Comments

Chat among yourselves: New EU law may force the big IM platforms to open up

Send an iMessage to Facebook, and we'll talk

The European Parliament's new Digital Markets Act, adopted as a draft law this week, could compel big platforms owned by large firms including Apple, Google, and Facebook to make their tech interoperable.

Among other things, this might mean forcing the tech vendors' messaging apps to allow communication with other services.

If the EU deems a company to be what it calls a "gatekeeper", it could impose "structural or behavioural remedies" – compelling the largest outfits to allow interoperability, or imposing fines. The Act would also restrict what companies could do with personal data – not the first time it's tried.

Continue reading

Sweden asks EU to ban Bitcoin mining because while hydroelectric power is cheap, they need it for other stuff

Lighting and warming homes in winter, or ransoming encrypted files and buying drugs? Hmmm

The directors general of Sweden's Financial Supervisory Authority and Environmental Protection Agency have called upon both the EU and Sweden's government to ban cryptocurrency mining.

Continue reading

The rocky road to better Linux software installation: Containers, containers, containers

Let's be real: Everyone is trying to catch up with Apple

Analysis Linux cross-platform packaging format Flatpak has come under the spotlight this week, with the "fundamental problems inherent in [its] design" criticised in a withering post by Canadian software dev Nicholas Fraser.

Fraser wrote in a blog published on 23 November that "these are not the future of desktop Linux apps," citing a litany of technical, security and usability problems. His assertions about disk usage and sharing of runtimes between apps were hotly disputed by Will Thompson, director of OS at Endless OS Foundation a day later in a post titled: "On Flatpak disk usage and deduplication," but there is no denying it is horribly inefficient.

Most people don't care about that any more, one could argue. But they should.

Continue reading

EU needs more cybersecurity graduates, says ENISA infosec agency – pointing at growing list of master's degree courses

Skills gap needs filling somehow

The EU needs more cybersecurity graduates to plug the political bloc's shortage of skilled infosec bods, according to a report from the ENISA online security agency.

The public sectors of EU countries should "support a unified approach" to infosec-focused higher education, it says, addressing an issue that is by no means unique to the bloc.

In a new report titled "Addressing the EU Cybersecurity Skills Shortage and Gap Through Higher Education", academics Jason Nurse and Konstantinos Adamos, together with ENISA's Athanasios Grammatopoulos and Fabio Di Franco, said the European Union needs to get more students signing up for cybersecurity degrees.

Continue reading

Nuclear fusion firm Pulsar fires up a UK-built hybrid rocket engine

A win in the rocketry world: 'Flames came out of the right end'

UK nuclear fusion outfit Pulsar Fusion has fired up a chemical rocket engine running on a combination of nitrous oxide oxidiser, high-density polyethylene fuel and oxygen.

The acceptance tests of the UK-built rocket were conducted at COTEC, a UK Ministry of Defence site at Salisbury Plain in southern England.

We spoke to CEO of the company, Richard Dinan, in 2018, when he discussed the prospects for fusion power, and the use of the technology for space travel as well as electricity generation. In 2020 he was showing off an ion thruster with plasma running at several million degrees and particles fired at speeds over 20km per second.

Continue reading

Bad news for Tencent: Chinese companies steer employees away from Weixin or WeChat

Middle Kingdom's internet giant: It's a switch to enterprise apps. Try ours?

Managers of large Chinese state-run companies have told employees to delete, shutdown and discontinue use of Tencent messaging app Weixin for work purposes, citing potential security breaches, according to the Wall Street Journal.

The news outlet named China Mobile, China Construction Bank and China National Petroleum among nine companies that confirmed the communication policy change, although none have officially gone on record.

Employees have reportedly also been warned to beware Weixin's sister app, WeChat. No details were given regarding what communication tools personnel were directed to use instead.

Continue reading

Privacy Sandbox saga continues: UK watchdog extracts more commitments from Google over ad tech

Roll up, roll up. Come and be the CMA-approved trustee to keep an eye on the Chocolate Factory's antics

The torrid tale of Google's Privacy Sandbox took another turn today with the UK's Competitions and Markets Authority (CMA) saying it has "secured improved commitments" from the ad giant over the cookie crushing tech.

The CMA's claims come in the wake of yesterday's call by the UK's data watchdog, the Information Commissioner's Office (ICO), for Google and co to sort out the privacy risks posed by ads. The ICO continues to work with the CMA to review the plans of the Mountain View gang.

The investigation by the competition regulator kicked off in January amid worries that Google's intention to change its Chrome browser and phase out third party cookies in favour of a so-called Privacy Sandbox would, in fact, strengthen the megacorp's grip on the online ad ecosystem.

Continue reading

Government-favoured child safety app warned it could violate the UK's Investigatory Powers Act with message-scanning tech

Redesigned SafeToNet feature highlights tech law mess

A company repeatedly endorsed by ministers backing the UK's Online Safety Bill was warned by its lawyers that its technology could breach the Investigatory Powers Act's ban on unlawful interception of communications, The Register can reveal.

SafeToNet, a content-scanning startup whose product is aimed at parents and uses AI to monitor messages sent to and from children's online accounts, had to change its product after being warned that a feature developed for the government-approved app would break the law.

SafeToNet was hailed this week by senior politicians as an example of "new tech in the fight against online child abuse," having previously featured in announcements from the Department for Digital, Culture, Media and Sport over the past 12 months.

Continue reading

Reviving a classic: ThinkPad modder rattles tin to fund new motherboard for 2008's T60 and T61 series of laptops

When vendors don't update old models, someone must step up

The range of Thinkpads you can modernise is getting wider. XyTech is trying to crowdfund a new mainboard for the 2008 T60/T61 so fans can upgrade the much-loved noughties laptop.

"The goal is to recreate the TP experience as much as possible, while incorporating the latest CPUs and technology," XyTech's Xue Yao writes. "As the motherboard is not from [Lenovo], it will require quite a bit of hands-on from the user to get the best experience out of the machine. It will be as stable as any other computer motherboard but will not have original TP software support and features."

XyTech is not alone. CnMod is another small Chinese business that updates teenaged – and by laptop standards, that's positively geriatric – ThinkPads. The replacement motherboards come from cottage-industry scale manufacturers on the forums at 51NB.com. They offer replacement motherboards for various classic ThinkPads, including the X200, X201 and X62, updating them with modern processors, memory and storage. There's also the X330, which combines the classic keyboard of the X220 with the faster mainboard of an X230.

Continue reading

You forced me to use this fancypants app and now you're asking for a printout?

'Just take the meds, Mr Sloper, and enjoy your holiday'

Something for the Weekend, Sir? I could just do with some popcorn right now.

I am loitering among the sick and deranged. The selfish fools decided to pile into the chemist's at 9am, the very moment I sensibly chose to visit. Half of them seem to be loitering around the entrance, jabbing urgently at their smartphones and muttering to themselves.

The popcorn? It will not cure my ailment but, despite research from the Rotterdam School of Management that claims otherwise, popcorn would enhance my user experience (UX) of waiting in the queue.

Continue reading

<abbr title="Bastard Operator from Hell">BOFH</abbr>: What if International Bad Actors designed the vaccine to make us watch more Steven Seagal movies?

Pipe down – Nicolas Cage could be listening

Episode 21 I've got nothing against conspiracy theories in general because if they didn't exist the PFY would probably have to join a book club or a sewing circle. But even the PFY will admit there's a limit, and at lunch today we think we found it ...

"So let me get this straight," I say. "The vaccine contains tiny … robots …"

"Nanobots," the bloke across the table from me chips in.

Continue reading