Pagero, ghostwriting Antony Riley Pagero, ghostwriting Antony Riley

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!

Read More
scania Antony Riley scania Antony Riley

LOGISTICS TO TRANSFORM BUSINESSES

28 MARCH 2018

LOTS Group, an independent part of the Scania and Volkswagen Group, is busy empowering companies to set up and operate sustainable and highly-advanced logistics systems.

Lean Optimised Transport Systems (LOTS) says it all. Scania has long worked with Lean principles and now, in its work with LOTS Group, the Lean process has been digitalised. LOTS Group helps to provide information that can transform businesses by contributing insights that can dramatically reduce waste and increase efficiency.

“We are convinced that the transport sector is on the verge of major change,” says Scania President and CEO, Henrik Henriksson. “We want to undergo this change in close collaboration with our customers and their customers to produce better solutions in both transport and logistics. By combining the experience of Scania with haulage companies’ local and sector knowledge, LOTS Group can achieve a more efficient flow of raw materials.”

LOTS logistics: the ultimate ‘helicopter’ view

Magnus Lindholm, Managing Director of LOTS China and Head of Operations at LOTS Group, is standing before a screen showing a satellite image of China. We see small icons in an area on the coast. As he zooms in it becomes clear that I am looking at a port.

“This is where the paper mill is,” says Lindholm, indicating an area coloured yellow on the image, “…and these are the trucks.” The trucks are represented by small arrows to give the viewer a clear understanding of which way they are facing. It is visualised information at its most powerful. By working with LOTS Group, the client, global forestry company is currently identifying bottlenecks in its operations, and doing so in real time.

p1000222-720x480.jpg

From a ‘control tower’ typically three screens that display the data and show exactly what is happening to a customer’s fleet at any one time clients can monitor and improve the day-to day-flow of their fleet. LOTS Group can advise on how to improve the flow by not only identifying the weak points but also by recommending possible tailored solutions, such as the best possible trucks for the work.

How it works: Data and transport transparency

“We have a data warehouse, into which goes a great deal of information, such as all the information from our connected trucks, information from our fuel partners, and other key data that supports our optimisation activities,” explains Lindholm.

“Then we use the Lots Transport Management  system to visualise where the trucks are and how much fuel they consume, and where there is waste such as unnecessary waiting times.” LOTS has a central IT team which has developed these tools to best visualise the data.

“You should be able to see and steer your fleet from pretty much anywhere in the world,” says Lindholm.

p1000823-600x400.jpg

The statistics are fed into software which allows the customer to drill down further into the numbers and see what is happening year-to-year, month-to-month and day-to-day. Working with the customer, targets can be established and, from a starting point of transparency, LOTS Group can help to reveal where there is waste and inefficiency in the extended logistics chain.

By taking a holistic view, looking to reduce waste and increase efficiency, and through continuous improvements, LOTS Group is supporting customers to truly streamline their flow and discover how to improve their daily operations.

- this article originally appeared on Scania Group website
Read More
SKF Antony Riley SKF Antony Riley

A FRICTION FIGHTER WITH A DREAM

Growing up with two volcanologist parents on the seismically active eastern edge of Siberia, Sergei Glavatskih seemed destined to be a scientist too. Now he uses chemistry and physics to take lubrication to the next level.

The son of two volcanologists, Sergei Glavatskih had a pathway into research that was in some ways preordained. “I was, by default, set for science,” Glavatskih reflects from his nondescript office at the Royal Institute of Technology (KTH) in Stockholm, Sweden. Raised on Russia’s far eastern Kamchatka peninsula, the land of volcanoes, he often “helped” his mother during summer research trips to geothermal fields and the Commander Islands.

Glavatskih says when he was growing up he always had a head full of questions, but at school he found his teachers tired and uninterested. Correspondence courses filled in some of the gaps in his learning, particularly in physics and mathematics, and there was the National Geographic, “one of the few magazines that remained relatively censor-free”, he says. In its pages he learned about people and places beyond his beautiful but cut-off homeland.

We should pursue impossible dreams sometimes, and if we are successful there will be incredible gains for society.
SERGEI GLAVATSKIH

Forgoing military service (and quite possibly, he believes, the war in Afghanistan) by attending university in Moscow, Glavatskih earned a master’s in mechanical engineering and went on to his first PhD, in cryogenics. He developed patented resonance sensors, later used in the refuelling system of a passenger aircraft, the TU-154, which operated on liquefied natural gas.

When the Cold War came to an end, Glavatskih left Russia, both to satisfy his yearning to travel and to begin his international research experience. “It was easier to come to Scandinavia, and I always liked the idea of Sweden,” he says. In Sweden Glavatskih embarked on his second PhD, in machine elements, which led to his work with Statoil on the development of environmentally adapted synthetic oils. The oils TURBWAY SE and TURBWAY SE LV became commercially available for rotating machinery.

Friction, as an area of research, has held increasing fascination for Glavatskih. He explains that it is one of the most fundamental areas in engineering and has been a concern of humankind since the earliest of times. Now it is more important than ever because of the amount of energy that the world produces and consumes, the associated losses and the consequent environmental implications.

Glavatskih says that many of today’s problems with machine efficacy come down to inappropriate lubricants and “just incremental” lubricant development over the years. Typically, he explains, machines are designed, and then it is decided which of the available lubricants to use based on viscosity.

“In many cases,” he says, “lubricants are regarded as chemical additives to an engineering solution.” Lubricant development is carried out by chemists and, as such, is considered almost a black art by mechanical engineers.

Sergei Glavatskih

Sergei Glavatskih

“We need to incorporate more advanced lubricant technologies in machine design and even new properties previously not possible with traditional lubricants to ensure the necessary improvements,” he says. “This can be achieved through a mechano-chemical approach, so we should use our knowledge of chemistry on a molecular level and some physics and mechanics to give lubricants new properties to enable new technologies.

“If you look back at history, even in the 19th century, the great scientists did not define themselves as scientists in ‘machine elements’ or ‘thermo-dynamics’,” Glavatskih explains. “They did many things in many different subjects. Unfortunately, for some reason, as time went on, everything became more ‘siloed’ – it has all become so narrow. As a result of that we have to change things about the way we work.”

The way in which researchers and scientists work stems naturally from the way they’ve been educated. As a scientist Glavatskih feels strongly that the educational aspect of his work at KTH is just as important as the research he is engaged in. “We must further investigate and consider the way we are teaching and training the engineers of tomorrow,” he says, adding that his work will plant the seed for a non-linear, collaborative and innovative way of thinking and working.

At KTH, Glavatskih leads a diverse team of researchers from backgrounds such as nano-technology, chemistry and fluid mechanics. “Our starting point is that we consider a lubricant a machine element in itself,” he says. The notion of lubricant as an integral part of the machine is key to Glavatskih’s design philosophy.

One of Glavatskih’s current research projects, supported by the Swedish Knut and Alice Wallenberg Foundation, is an investigation into ionic liquids (room temperature molten salts). Glavatskih and his team are exploring the potential of these ionic compounds in lubrication. Their results show that ionic liquids can serve as a key technology enabler in lubrication. A multiscale approach to the lubricant design developed by the team enables tuning the temperature, pressure and shear response of the ionic liquids to provide lubricants with desired properties. Important aspects of the design procedure are sustainable synthesis paths and a lower environmental impact.

It is possible, in situ, to control friction performance of the tailored ionic liquids, which is unachievable with conventional molecular lubricants. His vision is to bring to the market the novel “active” approach to the problem of friction and wear reduction in lubricated contacts, manipulating in real time the rheology and near-surface structure of the lubricants based on the tailored ionic liquids.

“My job as a scientist is to be a little crazy,” says Glavatskih. “We should pursue impossible dreams sometimes, and if we are successful there will be incredible gains for society.”

Sergei Glavatskih

Born: 1966.
Lives: Stockholm, Sweden.
Works: Royal Institute of Technology (KTH), Stockholm, Sweden, and Ghent University, Ghent, Belgium.
Education: Master’s in mechanical engineering, honours diploma, 1989, Bauman Moscow State Technical University; PhD in cryogenics, 1994, Bauman Moscow State Technical University; PhD in machine elements, 2000, Lulea University of Technology (LUT); docent in machine elements, 2003, LUT.
Currently readingVikingarnas Värld(Viking World), by Kim Hjardar.

 

Read More
KTH Antony Riley KTH Antony Riley

KTH SCHOOL OF ELECTRICAL ENGINEERING A PIECE OF HISTORY  2005 - 2017

KTH a piece of history  

Published December 2017  

A look back at the innovations and successes of the KTH school of electrical engineering. I wrote articles covering the following topics for this digest in addition to editing all articles.  

Read More