Sergey Nivens - Fotolia


How does Ballerina stack up as a cloud-native programming language?

While WSO2 has high hopes for its microservices-centric and cloud-native programming language, what do developers think of the current version of Ballerina?

Ballerina's strength is that it simplifies how a program talks over the network, usually to an API. Its inventors claim that it is one of the first programming languages to use a modified syntax to accomplish this feat. Ballerina started in 2015 with WSO2, an API management software company that wished to integrate microservices for its own internal purposes.

The project began after the organization completed some 2,000 integrations. "We thought a code-first approach -- a language for integration -- would solve a lot of the problems of integration and of working at scale," said Tyler Jewell, CEO at WSO2, which is based in Mountain View, Calif.

Ballerina enables the company to write lighter services with a small syntax footprint to perform complex communications. "Developers using Ballerina now use it to simplify writing implementations of APIs, creating high transaction throughput microservices, writing workflow and replacing bash scripts," Jewell said.

WSO2 made the first production-grade release of Ballerina in May 2018. Jewell said that about six large Fortune-type accounts currently use Ballerina to create microservices.

An appealing cloud-native programming language

One user with early interest in Ballerina is Christian Posta, chief architect at Red Hat.

Red Hat's interest in Ballerina arose in connection to its goal of helping customers with OpenShift, the company's open source containerization application software. As a Red Hat OpenShift evangelist, Posta has encouraged customers to explore Ballerina and its capabilities since it aids Red Hat customers that run applications in OpenShift.

"You can do things like track the state changes of a particular variable through its lifecycle," he said at KubeCon 2018.

Posta added that Ballerina includes built-in security, particularly in terms of a provenance of data in the language. Often, developers write applications with inadequate security, which creates a vulnerability for injection attacks -- typically, SQL statements that could end up corrupting an application. Ballerina assumes that all data is potentially tainted and requires developers to vouch for the provenance -- and, presumably, the safety -- of the data they use.

Posta observed that the creators of Ballerina seemed to specifically notice that developers tend to draw diagrams to explain some particular interaction to another developer, since they decided to make sequence diagrams the foundation of the cloud-native programming language. These sequence diagrams are particularly popular among developers who want to describe behaviors.

How ready is Ballerina for mainstream adoption?

While some Ballerina adopters found the benefits that the creators envisioned, others are not yet completely convinced of its value.

"It's about time that somebody took a hard look at what it would be like to integrate tuples, XML and JSON directly into a language," said Ted Neward, a technology consultant who specializes in software architecture and multiple development languages. "The whole idea of building a language specifically for building web endpoints is long overdue."

Neward also hailed the inclusion of modeling services and resources as a step forward for those who try to connect services and resources with new development approaches that involve objects and functions.

However, Neward said that Ballerina might strive to address problems that it may not be ready to tackle. For example, he said there is no add() method or array types on record, which would enable developers to programmatically add records or an array of values to their code. No operator-based syntax seems to work, either, he said. Similarly, he's not sure how one would query a database, take the collection of records returned and filter the data out into a JSON response.

Neward said he is not ready to use Ballerina for a working prototype or proof-of-concept scenario. These are basic functions for any language, he said. Their absence will make more work for developers.

Dig Deeper on Application development and design

Software Quality
Cloud Computing