A programming language is what humans use to communicate and deliver instructions to machines. With hundreds of programming languages in existence, and many more being produced every day, what purpose do we have for another one?

Although it would first appear that having one standard language would make learning and using code much simpler, various languages enable programmers to design applications that are both more specialised and diversified.

Machines and programs evolve and adapt with the way people use them, and so must the programming languages that are used to build them.

Ballerina, is a new programming language created by WSO2, an open-source technology firm formed in 2006 by programmers and entrepreneurs, Sanjiva Weerawarana and Paul Fremantle. Their new language is designed especially for emerging cloud-based applications, and to showcase its capabilities, they partnered with the Massachusetts Institute of Technology (MIT) to bring six students to its Colombo office last January, to learn the language along with seven other local students.

 

Programming Language

Programming languages may be split into three primary categories:

A machine language, which is the lowest level language that is simple to grasp for computers, while quite complex for humans. These instructions provide the computer’s central processing unit (CPU) highly particular tasks to execute, and applications are very seldom written in machine code since it is laborious and error-prone.
An assembly language (sometimes termed symbolic machine code), which is a representation of machine language and acts as a bridge between instructions supplied by the programmer, and those executed by the machine.
A high-level language, which is what programmers work with to develop software. These include languages like Java, C++, Javascript, etc., which encapsulate computer instructions into commands and structures that people can comprehend and create easily. Almost all software nowadays is created using high-level languages, ranging from whole operating systems to the number of programs that run on them.
Most programs nowadays also need extra software, called middleware, to connect with the operating system and other apps. Also dubbed ‘plumbing’ or ‘software glue’ it lets various programs to communicate information, and is particularly vital for programmes which operate on a network.

As a developer of middleware, WSO2 designed Ballerina in order to incorporate its functionalities into the applications itself. And as Weerawarana noted, “middleware is gone, because middleware is everywhere.” The rise of digital services, mobile apps, and linked gadgets means that most applications don’t simply work on one device at a time, but in numerous places concurrently.

Ballerina is unusual since it takes network distribution into account inside the language itself, streamlining how developers can design and deploy cloud-native apps and services – basically cutting out the middle-ware. 


What Makes Ballerina Unique?

First launched on September 10, 2019, Ballerina language syntax takes form based on computer languages such as Java, C++, Go and JavaScript. It incorporates key concepts, ideas, and techniques of distributed system integration into the language. These include distributed transactions, reliable communications, stream processing, workflows and container management systems.

As part of the WSO2/MIT cooperation, the 13 students studying Ballerina were assigned an application to create. Sanjiva Weerawarana, together with Achala Meddegama, the CEO of Esoft Technologies and creator of Reforest Lanka, collaborated with the Ministry of Environment to collect a list of needs. The aim was to construct a single platform that assisted monitor environmental factors including deforestation, reforestation, development, and conservation initiatives.

“The platform enables the Environment Ministry to develop, process and issue requests,” noted Tamara Mitrovska, a student in the course.

“For example if someone wants to remove some trees in an area or develop anything, it needs to pass through various government offices. Currently, it's a difficult procedure. With this program, all the requests can be handled in parallel,” Mitrovska remarked.

The application presents a map of Sri Lanka in which users may choose any section of land and then choose what they want to use it for, such as farming, constructing a residential structure, or creating a hotel, etc. The app then processes the request via the Ministry, looking for the protection status and zoning restrictions of the specified region and decides whether the request may be allowed or not.

“I haven’t worked a lot with networking features but it is much simpler to design services that interact across a network in Ballerina,” said Sisam Bhandari, one of the MIT students studying the language. “For example, while creating HTTP requests you may see a visual graph that helps you examine the links between the services.”

 is a lot more simple,” said Shikar Jagadeesh, another student studying Ballerina. “In a prior project I've worked on, the back-end service took a long time to figure out without aid. I had to utilize other services, but with Ballerina it's lot simpler to see it.”

Ultimately, the language facilitates the construction of programmes that perform better in today’s internet environment. “Modern apps are effectively integrations of services, data, transactions and processes from a large variety of resources to create creative, new services. However, conventional integration efforts have failed to maintain pace,” said Weerawarana.

“The Ballerina programming language is supporting a big evolutionary leap in the creation of cloud-native distributed apps that is ripping down the outmoded boundaries between app development and integration, to enable higher agility, performance and resilience.”