2021 Issue 3

Issue #3 - August 30, 2021

This is a recurring newsletter of content around Ballerina and related technology topics such as integration, microservices, distributed systems, and cloud computing.
Not a subscriber yet? Sign up here.

Real-Time Communication

From short and long-polling to HTTP streaming and WebSockets, there have been many ways through the years to retrieve data in near real-time. WebSockets have proven to be both reliable and efficient when it comes to full-duplex, real-time communication. Check out Bhashinee Nirmali’s article on Go Real-Time with Ballerina WebSockets to learn why you need the WebSocket protocol, and how Ballerina provides a built-in tested and compliant WebSocket client and server implementation.

Microservices Security

Since microservices applications involve independent components that function as a system, you need to look at new approaches to security both in the infrastructure and code. Ballerina has first-class support for security including transport layer security like SSL/TLS and mTLS, and application layer security like Basic Auth, JWT Auth, and OAuth2. Chanaka Lakmal’s new blog on Microservices Security with Ballerina explores how you can apply these security features to your microservices deployment using an end-to-end example with code.

Testing in Ballerina

Testing is a prerequisite to identify issues or bugs and ensure that your software can be used reliably. Ballerina’s test framework allows you to easily test programs written in Ballerina. Fathima Dilhasha's article on Get Started with Service Testing Using Ballerina Test Framework details out, using an example, the basics you need to know when testing a Ballerina service.

Aquib Zulfikar dives deeper into Ballerina’s test framework in his article Unit Test Ballerina Integration with Mock Backends where he demonstrates how its object mocking feature can be used to mock backend calls when unit testing integrations.

What’s New in Ballerina?

Ballerina Swan Lake Beta3 will be released soon! Here are some key changes you can expect in the upcoming release:

Language changes:

  • The !is operator will be introduced to check if a value does not belong to a given type
  • The type for numeric literals in additive and multiplicative expressions will be inferred from the contextually-expected type
  • The where clause in a query will narrow the types similar to if statements
  • Enum declarations will be able to have duplicate members
  • Improved static type requirements will be introduced for == and !=

Standard Library changes:

  • GraphQL improvements such as input object support, mutation operation support, and variable support will be made
  • HTTP service improvements will be introduced, which automatically generate OpenAPI documentation and make it available during runtime
  • Look out for an improved WebSocket client and a revamped FTP module
  • Declarative auth configuration, external import paths, and new types support for timestamp, duration, and struct type will be added in gRPC
  • Support for queryRow() in the database connectors for retrieving a single row as a record, or a single value from the database will be added

Dependency management changes:

  • Build command will auto-update dependencies so the program will get the latest security fixes and patches from Ballerina Central
  • The --sticky flag will be introduced to lock the dependencies and get a repetitive build

Download Ballerina, try it out, and let us know your feedback.

Ballerina Community Call

In our call last month, we talked about the changes to the HTTP package in Ballerina Swan Lake, including a few hands-on demos. Our next call on GraphQL and Ballerina is happening tomorrow (Tuesday, August 31) at 9:00 a.m. PST. If you’d like to join the discussion, sign up to receive a calendar invite for our next call.

Support Us

You can follow us on Twitter and tweet with the #ballerinalang hashtag. You can also show us your support by starring the Ballerina GitHub repo and following us.

Privacy Policy | Terms of Service

Want to get hand-picked content and the latest news on Ballerina delivered directly to your inbox? Then subscribe to our monthly newsletter today!