fb
WSO2 Tutorial 6 min

Get ready for Ballerina

Rob Blaauboer
Rob Blaauboer
Integration Consultant & WSO2 Trainer
pexels photo 576801
Scroll

Ballerina-newOn 18 July 2018  WSO2 will release version 0.980 of the long-awaited Ballerina language during BallerinaCon in San Francisco (also streamed live to your PC). You might wonder what it is and how it’s going to change the way you do integration in your organization. In a series of blogs we are going to take a look at Ballerina and dive into some of the elements of Ballerina.

We will start off with an overview of what Ballerina is and what it consists of. In subsequent blogs, we’ll actually take you to look at how you develop new integrations [we are going back to coding again!], what kind of tools you use to develop and code [strongly typed source code and visual overview], some of the major features that are typically part of an enterprise integration pattern, and all your typical integration needs within your organization.

What is Ballerina

As you can see from the logo’s subtitle it is a Cloud Native Programming Language. From the inception, the language was created with the concept of accessing cloud (online) services. Ballerina is a language that we will see coming into several WSO2 products like the API Manager 2.5.0. We will cover that release in a separate blog since we want to keep the focus on Ballerina as a language for now. Ballerina is also a language that will allow you to create microservices and deploy them on a gateway, regardless of the use of the API Manager and/or the Enterprise Integrator. It looks like the Micro Services Framework for Java (MSF4J) aims at the more computational approach where as Ballerina is more towards the Cloud based / connected Microservices. We believe that the Enterprise Integrator is here to stay in it’s current form for the foreseeable future and that Ballerina will have a place next to it as a Microservices framework that will allow you to execute microservices and perhaps migrate some ESB proxies and APIs to Ballerina. For now, let us look at what Ballerina entails.

Why a new language?

According to WSO2 – who of course started with the development of Ballerina, after which they made it into open source, like all of the products from WSO2 that you concurrently download – we are entering a new world, a world where micro services, serverless computing and the like, will dominate. The current engines of the Enterprise integrator and the API manager from WSO2 used truck to trust the technology components like Synapse and AXIS2. These SOAP and XML-based components have been around for more than a decade and, especially with SOAP, becoming less and less popular. Today we have come to a point where continued support or use is not known to fit into new ways of working   whether it’s agile, continuous integration continuous delivery (CI/CD), containerization with Docker or Kubernetes and, especially, micro services/server less computing. The name Ballerina for me represents something lightweight, graceful and not resource hungry. This fits in with the trend to serverless computing and other trends. And in fact, it is a very modern language. Services, resources, endpoints, request and response objects are all native language constructs. That’s what makes it stand out.

Ballerina, Docerina, Testerina

Ballerina is a compiled language that also has an interpreter to run it in a non-compiled form. Like we know from the current development studio environment, basically used for Enterprise integration work there is both a source and graphical view. Developers will be happy that, apart from the Composer tool that is browser based and comes with Ballerina, there are plug-ins for tools like intelliJ idea and VS code. Eclipse / Developer Studio seems to be not supported. Ballerina is more than just a programming language. It also has two other components called Docerina and Testerina for automated documentation and automated unit testing.

Connectors, libraries and everything is an endpoint

One of the best-features of WSO2 Enterprise integrator is the ability to connect to cloud-based services like Twitter using connectors. This principle is also available in Ballerina, but it’s completely given to the community. So, you can add your own connector to that without interference of WSO2. You will find all of the connectors at Ballerina Central, but also you are able to download them on the fly from the development environment. Apart from the connectors that are also the libraries like the math library that will offer specific features in this case around mathematic functions like a random function to name but one. Technically there is no difference between a connector in the library, they’re both simply just packages that you can add to your Ballerina files.

Wine and programming languages

Developing a new programming language, basically from scratch, but based on the fundamentals of many well-known languages like Java, Go, Python -and the like, is quite an adventure. Integration with Java is difficult according to WSO2, since his origins stem from an era where we did not have SOAP / REST  and  the like. Programming languages are like good wines, they need some maturation before you can drink them and enjoy it. Note that we say drink it and enjoy it! Like a wine that you drink when it’s too young, using a language that hasn’t ripened enough is probably not going to be an enjoyable experience. IT is not something trivial, it’s an important part of your business or even it is your business.

Let’s be clear about this, although Ballerina is really at the horizon, but you are in control. WSO2 will support the now current versions of their API manager and Enterprise Integrator for many years to come [long-term support is currently at 10 years]. So, it’s up to you to define if, when, where, and how you’re going to do the migration. You can stick with what you currently have for the foreseeable future or even start looking into ballerina what impact might be on your organization, your IT landscape and also, very important, skill set and training of your development teams. So, which products of the current WSO2 stack will work using Ballerina? At this moment, we see the API manager as well as the Enterprise Integrator as the two products that will work with Ballerina. We will look at what we know now of Ballerina in conjunction with these two WSO2 products.

API manager

The API manager is one of what we like to call the big four WSO2 product lines [the other ones are integration, identity and access management and analytics]. The next version of the API manager [version 2.50] is going to be released in about a months’ time. It will have dual support, this means it will run both the traditional gateway based on the enterprise service bus technology [Synapse and AXIS2]. It will have a Ballerina-based microgateway that delivers high performance and low footprint. At this moment, we are looking at a beta version of the API Manager 2.5.0, to see how this is going to work and perform.

The version 3.0 the API manager is expected to be released sometime at the end of this year, perhaps even next year.

Enterprise Integrator

For the Enterprise Integrator, we currently do not have that much information. The current EI using Synapse and Axis2 will be supported for many years (also due  to WSO2 LongTermSupport that is 10 years). Ballerina aims to support what we can do with the current version of the EI as far as we know now.

Come and see ballerina

The unveiling of Ballerina at WSO2Con (or BallerinaCon) in San Francisco will be the beginning of a major change for WSO2 users. Because we can imagine that not everyone can fly to San Francisco we will host Ballerina meet-ups in several places across the world after summer.

We will keep you informed as to where and when these meet-ups will take place and we will hope to see you there. discuss if and when you put or should be dancing with. Interested to join WSO2Con or BallerinaCon? Click here to read more.