Ballerina (programming language)

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Ballerina
Ballerina Language
Designed bySanjiva Weerawarana, James Clark, Sameera Jayasoma, Hasitha Aravinda, Srinath Perera, Frank Leymann and WSO2[1]
DeveloperWSO2
First appeared2017
Typing disciplineStructural, strong, static, inferred
OSCross-platform
LicenseApache2 License[2]
Websiteballerina.io
Influenced by
Java, Javascript, Go, Rust, C#[3]

Ballerina is a compiled, type-safe, concurrent programming language targeting microservice development and integration.[4]

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.[5]

Ballerina has various constructs geared toward cloud-native development including support for modern data formats and protocols, reliability, distributed transactions, APIs, and event streams.[6]

Syntax[edit]

A simple hello world REST API is depicted below.

// The simplest hello world REST API
// To run it:
// ballerina run demo.bal
// To invoke:
// curl localhost:9090/hello/hi

import ballerina/http;

service hello on new http:Listener(9090) {
  resource function hi (http:Caller caller, http:Request request) {
      _ = caller->respond("Hello, World!");
  }
}

References[edit]

  1. ^ "Ballerina Language Specification" (PDF). WSO2. 2018-05-01. Retrieved 2018-05-03.
  2. ^ "WSO2 / LICENSE". github.com. WSO2. 2017-03-08. Retrieved 2018-03-01.
  3. ^ "Ballerina, A modern programming language focused on integration" (PDF): 15.
  4. ^ Jackson, Joab. "Ballerina: An API-First Programming Language". The New Stack. Retrieved 2018-06-11.
  5. ^ "Ballerina Microservices Programming Language: Introducing the Latest Release and "Ballerina Central"". InfoQ. Retrieved 2018-06-07.
  6. ^ staff, Techworld. "Top programming languages you should try". Techworld. Retrieved 2018-06-07.

External links[edit]