This is a recurring newsletter of content around Ballerina and related technology topics such as integration, microservices, distributed systems, and cloud computing.
Why aren’t my microservices working?
In the past few years, we have seen rapid growth in microservice adoption. But as of recent, microservices have been criticized. When they aren’t created and managed properly they can prove to be more detrimental than beneficial. To truly leverage the advantages of agility, scalability, reusability, and efficiency promised by microservices, you need to adopt the right tools and build your architecture in the most optimal manner.
The reactive manifesto is a set of guiding principles that help create a higher quality distributed system. A reactive system is responsive, resilient, elastic, and message-driven. You can effectively apply these concepts to the microservices world. More specifically, Ballerina, which was designed from the ground up to have first-class support for microservices, can fulfill this requirement with some easy-to-use developer abstractions. To learn more, read Anjana Fernando’s DZone article on Reactive Microservice Done Right.
An effective communication approach between microservices is something you need to think about when designing your system, which includes choosing whether it needs synchronous or asynchronous communication or a mix of both. This should be determined by the nature of your service operations and the performance characteristics you require from the system. Ballerina has core features built-in that can be used to build microservices in either of these two patterns. Read Anjana’s DZone article on Practical Microservices Development Patterns: Sync vs. Async to learn more.
Most often, developers design, architect, and implement microservices without thinking about deployment, causing them to underperform in the given execution environment. This happens because deployment is currently not a part of the programming process of creating, building, and running. To solve this, Ballerina has introduced a set of cloud native abstractions and tools into the language to write microservices that just work in platforms like Kubernetes. Read Lakmal Warusawithana’s DZone article on Microservices in Practice: Deployment Should Not Be an Afterthought to learn more.
What’s New in Ballerina?
Ballerina 1.0, which was released in September 2019, implemented the 2019-R3 specification. Although this provided us with a good foundation, we needed to make a few changes to make it even better for building integration features like transactions, querying, streams, and improving features like table support, database integration, XML support, and JSON support.
That’s why we released the first preview version of the all-new Ballerina Swan Lake on June 20 (which is backward incompatible with Ballerina 1.2). Ballerina Swan Lake will be a major new version of Ballerina that we plan to release in January 2021. Read our release blog for more information.
Here are some key features of Ballerina Swan Lake Preview 1:
Immutability in the type system, which guarantees that immutable values stay unchanged
distinct types bring native support for nominal typing into the structural type system in Ballerina
Improved error type design eliminates pain-points in the previous version. The distinct error type allows you to define more refined error types that support common error handling use cases
Improved transaction support in the language designed to make it easier and more convenient to write robust applications in Ballerina
Enhanced query expressions that bring the power of SQL-like query capabilities directly into the language as comprehensions for data processing
Introducing the table type: A new built-in collection type that works like a general-purpose hash table, where the keys are part of the values being stored
Improved Ballerina SQL module API that leverages the latest languages features such as stream type, query expressions, and raw templates
The new mocking API, which helps you to mock an entire object or a function allowing you to test your code independent of external dependencies
We hope you found this information useful. We’ll catch you again soon!