Ballerina revamps RESTful services support

Programming language designed for building cloud-native applications adds ‘first class’ support for data-oriented protocols such as GraphQL and RPC-style protocols such as gRPC.

Ballerina overhaul shines on RESTful services

Ballerina 2201.0.0, aka “Swan Lake,” is now available in a production-ready, General Availability version. Swan Lake was announced February 1, following six beta releases. 

A “major overhaul” of the cloud-geared programming language, the Swan Lake release adds language features and platform tools that make it easier to build programs that deal with network interactions, data, and concurrency, and that are easy to maintain, the Ballerina team said.

Developed by WS02, Ballerina can be downloaded from The new features and improvements in Swan Lake:

  • Ballerina services have been redesigned to support RESTful services in a “first-class” way. Services have become service objects that work uniformly with client objects. Service objects can have both remote methods, supporting RPC-style protocols, or resource methods, supporting data-oriented protocols such as HTTP or GraphQL.
  • Objects work in a more familiar and ergonomic way, through the introduction of class definitions.
  • Distinct types provide functionality similar to nominal types but within the framework of the Ballerina structural type system. Distinct types work with objects and errors.
  • The table type has been redesigned to work consistently with structural types.
  • Enum declarations provide a more convenient and familiar syntax for working with unions of strong constants.
  • An isolated qualifier has been added to enable compile-time concurrency safety.
  • A read-only type enables the type system to offer immutability guarantees.
  • Error handling has been improved. Ballerina’s developers have built on distinct types to rework how error types are defined. Also, on-fail clauses have been added, allowing control over the effect of check expressions.
  • The Ballerina Central UI has been refreshed to support packages and enhance the user experience.
  • Standard library APIs have been redesigned by leveraging the latest language features.
  • bal shell, an interactive command-line tool to prototype Ballerina code, makes its debut.
  • The Ballerina Visual Studio Code extension was revamped to improve the editing experience.

Since the Ballerina 1.0 release in 2019, integration features have been added such as querying, transactions, streams, table support, and database integration. JSON and XML support also have been included.

Copyright © 2022 IDG Communications, Inc.

InfoWorld Technology of the Year Awards 2023. Now open for entries!