[WSO2Con EU 2017] Keynote: Ballerina Plans and Futures

Preview:

Citation preview

Ballerina-in-ChiefFounder, Chairperson and Chief Architect; WSO2Lt. Col. & IT Advisor; Sri Lanka Army

Ballerina Plans and Futures

Sanjiva Weerawarana, Ph.D.

• Why are we doing Ballerina?

• What is the state of Ballerina?

• How will it affect the WSO2 products?

• What should you do to prepare for it?

What will you leave with?Hopefully, answers to these questions:

Why, oh why… ?

Make Integration Great Again

• 286k SaaS services to use– The new shared library

• Everything you make is useful to someone else– Serve, or be forgotten

• Need for agility– Recompose, recompose, recompose

Networked interactions are everywhere

• Too hot ‘n heavy for the future– Microservices, serverless, containers

• Too restrictive with DSL approach and hacks galore

Why not use ESBs?

• Too hot ‘n heavy for the future– Microservices, serverless, containers

• Too restrictive with DSL approach and hacks galore

• (In the future; today just keep buying the ESB!)

Why not use ESBs?

• Writing, managing and deploying code is now rapid with awesome SDLC tools

• DSLs and ESBs don’t love CICD processes

Code is Great Again!

“Configuration over code” is over

• Type system mismatches - no understanding of json, xml, sql

• Generally poor at handling asynchronous programming

• Writing network resilient programs is very hard with frameworks galore

Why not Java/NodeJS/Python/*?

Sequence diagram based programming language will make integration great again.

State of the Ballerina Union

• An event-driven, parallel programming language for networked applications

• Textual and graphical syntaxes with sequence diagram metaphor

• Powerful type system, connectivity and resiliency

• Designed for modern development practices

The Ballerina Programming Language

Ballerina has been influenced & inspired by C, C++, Java, Go, Kotlin, Dart, NodeJS, Javascript, Maven, NPM, Tomcat, Hysterix and a variety of other awesome programming languages, technologies & tools.

Thank you; we strive to do you proud.

Standing on the shoulders of giants!

• V0.95 released on Monday• Many things are stable• Some things are not stable• Performance is getting better, but not there

yet• Editing experience is getting better, but not

there yet

Work in progress

Type system

• Connectors– Failover, load balancing, circuit breaking,

caching, timeout, ..• Transactions

– XA for DB/JMS type– Microtransaction model for B-to-B usecases

• Security– Taint checking, authn, authzn

Resiliency

• Most languages are sequential first, parallel second

• Ballerina is parallel always ultimately natural– Sequence diagrams are inherently parallel

• Funky semantics for parallel workers of functions

• Async is not right yet; will make it better

Parallelism

• Server and client connectors as you’d expect

• Powerful I/O library for non-blocking I/O for any kind of channel of bytes, chars or records

• Caching, logging, math, ...

Standard library

• IDE support - Composer, Idea, VSCode, ..• Unit testing framework• Documentation framework• Versioned module and dependency framework• Docker integration

Support for programming lifecycle

• Compile to Ballerina byte codes .balo• Statically linked to executable .balx• BVM interpreter for bytecodes

– Written in Java

Execution model

• Ballerina has ZERO Java semantics• We’re writing most of the tools in Java

– Because its an ok language to do so ;-)– “native” is currently bound to Java, but internal

• Planning to compile from .balx to native binary– Looking at LLVM– Or Graal– Or ?? (Help wanted!)

Ballerina/Java: Friends without benefits!

• Download it, try it, give it a whirl

• Join the community– https://groups.google.com/forum/#!forum/baller

ina-dev

We want your help!

Ballerina and WSO2 Products

• Is awesome– API composition– Fantastic multi-environments via labels– Microgateways, offline gateways– Bunch of other cool things

• Oh, and it uses Ballerina in the gateway

API Manager v3

• Gateway will be programmed using Ballerina

• Much more flexible and easy to use than current gateway– Graphical composer will be part of it

API Manager v3 Gateway

• Will replace ESB and DSS with Ballerina

• Significant change from a programming model sense

• Migration tool will deal with a lot of the pain

Enterprise Integrator 7

NO!

Do APIMv3 and EI 7 have to be together?

• NO!

• APIMv3 and EI7 will support serverless, container and good ‘ol server modes

• If you want to go all micro, we’re there for you– (And the only one!)

Do I have to go microservices?

NO! There will be many more minor releases of EI6 as we continue to enhance its functionality.

It will be supported as long as you need it to be.

OMG is ESB/EI6 gone?

Dunno, yet.

What about IS / DAS / IoT

What should I do today?

Don’t stop buying the current products!

Very important!

• Avoid writing ESB class mediators as much as possible– Migration tool can’t convert those

• Don’t hack around with properties and magic

ESB, DSS, EI 6 users

• Don’t do too much hacking in the gateway mediation sequences– In particular, no Java code

• Use checkin-in/check-out for environments

APIM users

Play nice, stay within boundaries and don’t go crazy then you’ll be ok!

Summary

Conclusion

• Ballerina current supports main programs and services

• Thinking about long running processes

• Thinking about events & streams

APIs, events and streams

• Ballerina makes it easier to write smart(er) endpoints– Type system, resiliency, parallelism

Smart endpoints and dumb pipes

• Only about once in a decade and takes a decade or more– Fortran, Cobol, C, C++, Java, C#, Javascript,

Python, Go

• Combination of fast boot, low memory, non-blocking, network integration, micro all, serverless opens door for Ballerina to win

Creating a winning language is very hard.

Long term effort