Ballerina (programming language)


Ballerina is a general-purpose programming language with features optimized for distributed computing applications. It is easy to write and modify and is suitable for application programmers.
It is an open source project started in 2015 by architects from WSO2 as code-based alternative to the configuration-based integration tools such as EAI, ESB, and workflow products.
Ballerina has various constructs geared toward cloud-native development including support for modern data formats and protocols, reliability, distributed transactions, APIs, and event streams.

Examples

A simple hello world service is depicted below.

// To start the service, navigate to the directory that contains the
// `.bal` file and execute the `ballerina run` command.
import ballerina/http;
import ballerina/log;
service hello on new http:Listener

Print “Hello, World!” in parallel using workers

import ballerina/io;
public function main