SIMPLICITY LIES AT THE HEART OF NATS
FROM KUBECON IN COPENHAGEN TO PAGERO IN GOTHENBURG
At Pagero, we constantly evaluate new technologies and software products. Sometimes, they turn out to be dead ends, but quite often, they help us speed up our development, or provide a better service to our customers. One project that we have been watching for a while, is NATS.
We already have an event-driven architecture, using RabbitMQ; a battle-tested message broker. While RabbitMQ is working pretty well for us, NATS is really interesting for us. We’ve already tried it as an embedded queue in some prototype Go (programming language) application, where it a great experience to work with.
When we heard that the NATS team were visiting Kubecon 2018 in Copenhagen, it was exciting news. Many of our developers were interested in NATS but not all could attend Kubecon. Thus, we contacted Synadia and asked if anyone would be willing to come to speak at a couple of meetups in Gothenburg. Renown NATS core contributor Waldemar Quevedo graciously accepted, and we were thrilled.
From doing a keynote in front of 4.500 people at Kubecon Copenhagen, Wally arrived in a warm and sunny Gothenburg to speak at two meetups at Pagero. Continue reading my article or check out Wally’s entire presentation below:
THE HISTORY BEHIND NATS
Wally began by explaining a little of the history behind NATS. A Cloud Native (CNCF) messaging system NATS was developed in 2010 by industry veteran, entrepreneur and pioneer in large-scale distributed systems and cloud computing, Derek Collison.
Collison, a messaging developer for some twenty-five years began to develop the system as a side project. Originally written in Ruby and built for Cloud Foundry it was later rewritten in 2012 in Go.
Open-source, NATS is currently available under Apache License (2.0) and is deployed in some of the largest cloud platforms, including VMware, Cloud Foundry, Baidu, Siemens, and GE. It is recognised by the industry for several specific strengths over its competitors such as Kafka.
“From doing a keynote in front of 4.500 people at Kubecon Copenhagen, Wally arrived in a warm and sunny Gothenburg to speak at two meetups at Pagero.”
WAY, WAY FASTER!
Speed is one of the central pillars to its success. When the system underwent its re-write in Go, or upgrade, it became pretty quick. “It’s way, way faster!” Wally explains.
In fact, the speed of the system is something he was keen to underline during the meetup: “If I have to tell you one single thing about NATS is that it’s very fast” he says, and he backs up his confident statement with some solid facts.
Wally explains that “Even in the days of Ruby it could push 150,000 messages a second,” but that’s nothing compared to the turbo-charging it went through thanks to Go. Now a single server can push approximately 11milion messages a second.
Wally explains that it achieves this thanks to its agile architecture. NATS is designed to be as operationally simple and reliable as possible while maintaining a high performance. Performance, simplicity, security and availability are the real DNA of NATS. Simplicity, Wally says, is key to effective and agile functionality.
THE TWO NATS: NATS AND NATS STREAMING
NATS is offered in two interoperable modules:
The first is the core NATS platform known simply as “NATS”.
The second is NATS Streaming, originally known as STAN (as the opposite of NATS, though the name didn’t stick).
NATS Streaming is an event streaming service that can be used to add event streaming, delivery guarantees, and historical data replay to NATS. In addition to the features of the core NATS platform, NATS Streaming provides several extra features such as enhanced message protocol – NATS Streaming implements its own enhanced message format using Google Protocol Buffers.
NATS Streaming messages can contain the following fields:
Subject – The NATS Streaming delivery subject
Reply – The optional “reply-to” subject
Data – The message payload
Timestamp – the received timestamp, in nanoseconds.
Redelivered – A flag signifying whether this message has been redelivered by the server
“NATS is designed to be as operationally simple and reliable as possible while maintaining a high performance.”
THE DARK SECRET OF NATS
Having given an extensive and authoritative rundown on the design and background to NATS and NATS Streaming, Wally draws his presentation to a close.
However, there is one question left unanswered: What does the apparent acronym “NATS” stand for?
Even on the NATS website, there is a reference to the “lore” of the NATS name but there are no answers. Unfortunately, we are still in the dark about this and can only hope that Wally returns for another meetup and an explanation soon.
OUR TAKEAWAYS
Our takeaways from Wally’s presentations are the following:
In software, complexity is dangerous. What we love about NATS is the simplicity. This goes for NATS-streaming as well.
NATS has no place in the ballroom. It doesn’t do elegant, it’s a simple, gritty beast that does exactly what it advertises.
It does not bring any dependencies, while Kafka requires Zookeeper (not to mention the JVM ). In fact, both NATS and NATS Streaming are very straightforward to embed into your Go applications, and with a very small footprint.
While Kafka is positioned as the enterprise-ready, battle-tested option, NATS Streaming can be described as a hungry contender.
It does not offer exactly-once-delivery; but do you really need it?
Also, on this topic, another project that might interest you is Jocko – a Kafka rewrite in Go.
PRACTICAL NATS: FROM BEGINNER TO PRO
For further reading on the problems which come along with microservices and cloud-native application development, do not miss Waldemar Quevedo’s newly published book “Practical NATS: From Beginner to Pro“.
GOTHENBURG TECH RADAR
Join Pageros’ meetup Gothenburg Tech Radar for more information and invitations to future events about the latest software, technology and methodologies!
SCIENCE BASED TARGETS, REAL TARGETS FOR REAL CHANGE
Stora Enso has embraced science-based targets as the best way to reduce greenhouse gas emissions and honour the Paris Agreement.
In 2015, the world watched and celebrated as the Paris agreement was reached. This meant that 195 of the world’s governments committed to preventing climate change by limiting global warming to well below two degrees Celsius. In effect, this accelerated the transition to a low carbon economy not only at a governmental, but also at a company level.
For Stora Enso’s part, we have been forerunners in reporting on our greenhouse gas (GHG) emissions and achieved well ahead of time our previous target for reducing carbon dioxide (CO2) emissions. We have also been recognised for our work by several third-party organisations. Last year, we made a commitment to lower our GHG emissions by setting ambitious science-based targets. These targets will help us to truly combat global warming in an effective and structured way.
For companies to achieve a “science-based target,” it means that they must reduce GHG emissions in line with the level of decarbonisation required to keep global temperature increase below two degrees Celsius. Stora Enso was the first forest products company in the world to have an approved science-based target.
The target itself is third-party approved by the Science Based Target initiative consisting of four important organisational stakeholders – the World Wildlife Fund, the World Resource Institute, the Carbon Disclosure Project and the United Nations Global Compact. The initiative applies strict rules and target tools based on global industry data from the International Energy Agency and the Intergovernmental Panel on Climate Change (IPCC).
Stora Enso’s commitment is split into three key areas. In operations, we are committed to reducing our greenhouse gas emissions from our operations by 31 percent per tonne of pulp, paper and board by 2030 compared to our 2010 baseline levels. In regard to our suppliers, we commit to urging them to set their own greenhouse gas emissions reduction targets by 2025, with the aim to adopt a science-based target by 2030. Finally, when it comes to our customers, we commit to providing training to educate 100 percent of our customer-facing staff about global warming and the advantages of setting a science-based target by 2020.
To fully deliver on these goals, we must work on several fronts to ensure that the commitment we have made comes into effect and has a lasting impact. We will need to further improve the energy efficiency work that is continuously ongoing via, for instance, Stora Enso’s Energy Fund. We will need to continue to work towards carbon neutrality to replace fossil fuels with biomass-based fuels. Also of key importance will be our sourcing of electricity with low or no fossil CO2 content. For our suppliers, we now start work on a long-term process which initially means to start sharing information about our target and, in a stepwise approach let them understand what is required of them being a supplier to us. For our customer-related target, the divisions will start training our sales force and other customer-facing staff.
Science-based targets make great sense for Stora Enso, it is our opportunity to walk the talk when it comes to sustainability in the best possible way. As our CEO has said, “a science-based target is a way to transform the Paris agreement down to companies so that they do their share.”
- Ghost written blog post for Stora Enso after interview with Johan Holm
About Johan Holm:
Johan Holm is the Head of Environmental Policies and Programs in Sustainability at Stora Enso. He has 22 years of experience in the forest industry and over 25 years as an environmental professional. Johan is currently heading the developments with regards to corporate carbon aspects in Stora Enso to facilitate the efforts combatting global warming. Johan holds an MS in Civil Engineering from the University of Utah.