Ballerina: A programming language for the cloud
Ballerina is a general purpose, concurrent and strongly typed programming language designed to make it easier to write programs that integrate APIs and services. It is specifically designed for cloud-native application development, providing support for distributed transactions, reliable messaging, stream processing, and workflows.
For example, here is a Ballerina program that sends a message to a web service and prints the response:
import ballerina/http;
endpoint http:Client helloWorldEP {
url:”http://example.com/hello”
};
public function main() {
http:Request req = new;
req.setMethod(“GET”);
http:Response res = check helloWorldEP->call(req);
io:println(res.getTextPayload());
}
No comments yet.