Ballerina Lang. Why New? Why Now?

Last Month, WSO2 announced the new language it designed for enabling integration, the flexible, powerful and beautiful Ballerina Language.



ESB is Dead?

Why a whole new language for integration. What is wrong with all the tools that we already have?
The tools that we have, including the proven, stable and powerful WSO2 ESB is configuration driven. Uses mostly XML or something similar for configuration. Tough we call it configuration, for complex integration scenarios it can get really complex.Configuration over code does not scale. 
In addition, every ESB is based on data flow architecture, and that does not scale either. The model is not good when it comes to complex scenarios.

So we need a language, because it better scales for complex problems. 
Scripting languages such as JavaScript are great. 
Even Java and C# has lots of formidable alternatives and options. And why not use those? 
In fact people do use them. And with the advent of micro services and with the existence of easy to use container friendly programming frameworks with Java and sometimes C# people have already implemented loads of integration services replacing traditional ESBs.

In the micro services world, there is no much room for the ESB pattern, and ESB is dying and often frowned upon. 
The programming model is inherently micro, so there is little room to worry about a third proxy layer. You are implementing a thin micro service anyway. A programming model would do the mere job. That is the simple thinking. Yet it could be over simplified at times.

Micro Integrations in a Micro Services World 

While the philosophy of micro services is absolutely right and the design principle is here to stay, there need to be more thought on what we are actually doing. What is being done today is actually mostly integration. Why is that?

Everything that you do today requires stuff from others.

The primary reason is that no matter what the business units do, they cannot live in the enterprise in a silo today. Either they have to re-use their own, or they got to connect to other services from other business units. 
Even if they do not want to re-use or connect to other business units at all, most useful IT assets are on the cloud today. The need to connect to the could and re-use those is inevitable. 
So re-use of existing IT assets in the form of services and/or the use of could services is a must for today’s software. If you are not doing that in your software, it could be an undergraduate assignment and not an enterprise application that you are talking about.

Ballerina is a programming language optimized for micro integration.

If you are already using existing programming languages for your micro services and wonder why you need a new programming language, the simple 80/20 rule apply. That is, if you are talking to other services 80% of the time then use Ballerina. In fact, if you take a step back and analyze what you are actually doing in your micro services, you will realize that bulk of your micro services are in this category. 

Ballerina looks at the micro services world form this view and enables micro integrations. If you are to integrate, the existing programming options and frameworks give you almost nothing as a programmer other than the usual programming constructs. 
So either you have to fall back to an ESB and then your logic is in configuration or you have to convert all that is in ESB configurations into Java, C# or whatever the programing language you use. So you are drinking the cool aid of micro services, but your are just moving logic across layers and not doing micro services right. 
With ballerina, designed to do the job, you can do micro services with micro integrations with fewer lines of code and more importantly with the right design in place. 

action tweet(Twitter t, string msg)(message ) {

    message request = {};

    string oauthHeader = constructOAuthHeader(consumerKey, consumerSecret, accessToken, accessTokenSecret, msg);

    string tweetPath = "/1.1/statuses/update.json?status=" + uri:encode(msg);

    messages:setHeader(request, "Authorization", oauthHeader);

    message response = http:ClientConnector.post(tweeterEP, tweetPath, request);

    return response;
}


The language also comes with visual tooling that uses sequence diagrams to help model the design of the integration. Sequence diagram based model is perfect for describing parallel, coordinated activities of many parties.




It is a new language, so, what is the effort for me to learn? Not much! If you are familiar with any major programming language, you can lean it quickly.

In addition to calming micro services ready and micro integrations enabling, Ballerina is truly lives up to the promises of needs of micro services architecture in that it is container friendly. It starts up in seconds and runs with a small footprint that is key requirements to make it natively micro services friendly.

Thought Leadership

WSO2 when started more than a decade ago was the new kid in the block in Web Services world. It took a novel path to solve the enterprise integration problem. It had leaders who knew the space but as a company, it did not have much industry experience. After more than a decade, and seasoned with delivering services and support for diverse range of large scale customers and hardened with that experience, WSO2 designed Ballerina with a much more practical view of the world. It is a mature moonshot for the next decade of integration solutions that would revolutionize the space.

However, it should also be noted, while WSO2 is coming up with Ballerina as an experienced decade old company there is no technical leftover debt baggage dragged over to ballerina. This is a fresh new design and perspective into new world of integration. There has not been backward compatibility worries brought into the table when the designs where done to drag the innovators from there freedom of thought.


Looking at how Ballerina development and design has been progressing over the past months, the enterprise grade experience brought into the effort could be sensed and felt. The maturity in the space is sensed. The analytics, logging, testing and debugging has been part and parcel of the design and not an afterthought. Performance and security has been looked into and explored and tested for from day one. As the one who owns support and services and the one who gets hit the hardest with the delivery challenges, I have much comfort on the efforts being put in to make Ballerina enterprise grade from day one. All the experience and best practices learned over the years and used in hardening the WSO2 products have been put in place to make sure Ballerina is of highest grade quality. 

If that worries you as an existing user of the previous generation of integration technologies such as ESB, then the good news is that there will be tools provided to help migration to new language based tools. Bad news is that, given the new design, 100% automated migration might nit be possible or even rational. You would be able to migrate 80% of older implementation into new Ballerina model. The rest would have to be implemented. But not to worry, the development effort is quite simple and less costly. 

Interested? Learn more from Ballerina Language documentation

Comments