Ballerina (programming language)
![]() | |
Designed by | Sanjiva Weerawarana, James Clark, Sameera Jayasoma, Hasitha Aravinda, Srinath Perera, Frank Leymann and WSO2[1] |
---|---|
Developer | WSO2 |
First appeared | 2017 |
Typing discipline | Structural, strong, static, inferred |
OS | Cross-platform |
License | Apache2 License[2] |
Website |
ballerina |
Influenced by | |
Java, Javascript, Go, Rust |
Ballerina is a compiled, type-safe, concurrent programming language targeting microservice development and integration.[3]
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.[4]
Ballerina has various constructs geared toward cloud-native development including support for modern data formats and protocols, reliability, distributed transactions, APIs, and event streams.[5]
Syntax
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<http:Service> hello bind {port:9090} {
hi (endpoint caller, http:Request request) {
http:Response res;
res.setTextPayload("Hello World!\n");
_ = caller->respond(res);
}
}
References
- ↑ "Ballerina Language Specification" (PDF). WSO2. 2018-05-01. Retrieved 2018-05-03.
- ↑ "WSO2 / LICENSE". github.com. WSO2. 2017-03-08. Retrieved 2018-03-01.
- ↑ Jackson, Joab. "Ballerina: An API-First Programming Language". The New Stack. Retrieved 2018-06-11.
- ↑ "Ballerina Microservices Programming Language: Introducing the Latest Release and "Ballerina Central"". InfoQ. Retrieved 2018-06-07.
- ↑ staff, Techworld. "Top programming languages you should try". Techworld. Retrieved 2018-06-07.
External links
This article is issued from
Wikipedia.
The text is licensed under Creative Commons - Attribution - Sharealike.
Additional terms may apply for the media files.