Ballerina - A new way to Approach Cloud-Native Programming

Aug 8, 2018 9:05:00 AM

BallerinaIt’s a strange irony: The more we try to make technology simpler, easier, more intuitive, and more convenient for end users, the more complex it becomes.

Consider the personal computer. The earliest PCs were simple by modern standards, with straightforward hardware architecture and minimally functional operating systems. But the user interfaces (C:\> prompt, anyone?) were opaque to anyone who wasn’t a computer engineer or hobbyist.

Apple’s Macintosh (“the computer for the rest of us”) and its descendants, including the iPad and iPhone, showed that with careful, user-centered design, it was possible to hide the ever-increasing complexity of computers with a simple, intuitive user interface that just worked, the first time, every time, without requiring the user to deal with lots of buttons, knobs, jumpers, setup, and configuration. But while these user interfaces simplified the process of using a computer, under the hood, they have become incredibly complex systems.

The Next Level of Complexity: Cloud Computing

As we continue our collective journey to ubiquitous computing, the next stop appears to be in the cloud. The promise of cloud computing is that it will make our applications more robust, reliable, accessible, and secure, removing much or all of the trouble of installing, configuring, and updating software applications—i.e., improving the user experience. Doing so, however, requires a mind-bogglingly complex system of hardware, operating systems, supporting software, network infrastructure, communications protocols, and more. And it all has to work together in a way that reacts gracefully (defined as “the user doesn’t even notice”) to the faults and errors that are inevitable in any system with that level of complexity.

Recognizing this, a commercial outfit called WSO2 has created a new, open-source programming language and development platform called Ballerina.

What Is Ballerina?

Ballerina was designed to fill a crucial gap between online resources and general-purpose programming languages. Online resources require deployment and configuration that do not lend themselves well to Agile-type development principles. On the other side, general purpose programming languages such as Java, C#, and JavaScript require developers to build their own tools for managing connections with sometimes unreliable online resources, parceling out work among multiple resources, and other aspects of the cloud environment. For developers, Ballerina provides the following benefits, among others:

  • Parallel processing. Ballerina makes it easy to distribute tasks to multiple “workers” that can operate in parallel. The behavior of this parallel processing is completely configurable—an application can wait for all workers to finish their tasks before proceeding, or proceed after an arbitrary number of them finish.
  • Dealing with unreliable resources. With Ballerina, developers can easily implement “circuit breakers” that gracefully handle the case where an online resource is unavailable or fails to respond within a set period of time.
  • Built-in security. Ballerina’s compiler is designed to recognize dangerous code that would introduce system vulnerabilities such as SQL injection.
  • Container friendly programming. Ballerina includes support for Docker and Kubernetes containerization.
  • Complete development environment. Ballerina is more than just a programming language; it’s a complete platform that enables iterative coding, building, and testing, specifically for the cloud environment.

The Ballerina ecosystem includes a large and growing number of well-managed packages that enable connections to and management of various types of cloud-based resources. By leveraging hardware-agnostic protocols such as XML, JSON, and SQL, this approach eliminates the need to anticipate and program for specific types of hardware. True to Ballerina’s open-source principles, these packages are contributed by third-party developers for all to use.

Why Ballerina Is Important

Ballerina fills an important need in the up-and-coming world of “cloud-native programming.” A search of this term will turn up several different definitions, but the basic idea is that cloud-based applications should be architected in a highly modular, containerized manner that builds in resiliency by reducing critical dependencies and single points of failure. By simplifying the cloud application development process, Ballerina reduces the effort required for cloud-native programming and leverages the iterative, agile development model that most developers are accustomed to these days.

Businesses and their users are demanding usable, reliable, secure, scalable applications. Increasingly, the answer to these demands lies in cloud-based solutions. Ballerina, and tools like it, will help developers satisfy these demands rapidly and accurately.

Brian Geary

Written by Brian Geary

Brian is a true believer in the Agile process. He often assists the development process by performing the product owner role. In addition to his technical background, he is an experienced account manager with a background in design and marketing.

Lists by Topic

see all