This slide deck explores Ballerina features and development - most of the talk will be a live demo together with a discussion on the motivation for creating a new programming language and the design inspirations.
6. The
Integration
Gap
- XPath for content access
- No data typing
- No compile time checks
- Complex dev/test lifecycle
- Decouples integration and runtime
- Code + config across many files
- Syntax is not integration-centric
- 3rd party build and packaging
8. Ballerina is a compiled, type safe,
concurrent programming language.
9. Ballerina is a fully supported
programming language for
building microservices.
May 2nd
- 1.0 language stability
- Ballerina.io live
- Ballerina Central opens
Q2
- Commercial support
- BallerinaCon @ SF
- Ballerina Workflow
Q4
- 1.0 final
- Ballerina @ CNCF
Sequence
Diagrammatic
Syntax and effective coding model forces developers
into best practices for interaction semantics with
programs displayed as a sequence diagram of its flow.
Network Type System Structural types with primitive, record, object, tuple and
union types with heterogeneous data handling and
explicit nulls.
Worker Concurrency Parallel-first concurrency model with lightweight
workers that communicate with message passing and
non-blocking policies.
Shared Package &
Cloud-Aware Build
Native module versioning, dependency management,
and centralized registry with target-aware build for
cloud-native environments.
Ballerina design principles for integration
30. // Built-In package mgmt, sharing, and unit testing
$ tree
.ballerina/ # Dependencies downloaded and cached locally
Ballerina.toml # Defines project build intent
my.package/ # Any folder is a package
RouterService.bal
tests/
RouterTests.bal
$ ballerina build
Pulling dependencies…
ballerinax/http [central.ballerina.io -> home repo] [====>] 56/56
ballerinax/rpc [central.ballerina.io -> home repo] [====>] 98/98
ballerinax/twitter [central.ballerina.io -> home repo] [====>] 79/79
Building binaries…
something.bal ⇒ target/something.balo
something.bal ⇒ target/something.balo
something.bal ⇒ target/something.balo
Running tests…
Test <mytest> ⇒ RUNNING … SUCCESS
Test <mytest> ⇒ RUNNING … SUCCESS
Test <mytest> ⇒ RUNNING … SUCCESS
Generating deployment artifacts…
@docker - complete 1/1
@kubernetes:ingress - complete 3/3
@kubernetes:svc - complete 3/3
@kubernetes:deployment - complete 1/1
SUCCESS
$ ballerina run
Service ready at http://192.168.1.101/customer
$ ballerina run kubernetes
Why Create a New Programming Language?
Developer productivity happens when coding is simple.
The Ballerina programming language is a type-safe, Turing
complete language so we can provide:
1. Incremental build and test
2. Type checking data during compilation
3. Verification of workflow and orchestration
4. A language server with intellisense in any IDE
5. An included GUI IDE for orchestrating interactions
6. Testerina for build-time unit testing integrations
7. Binaries with low footprint, high performance for
cloud native optimized execution
8. Composite app construction of polyglot services
9. Package mgmt, like maven, for simple code-level
sharing of integrations
10. Build-time instrumentation to enable debuggable
observability from your APM
38. Everything demoed is in the Ballerina By Guide repo
My setup
● Ballerina 0.975.0
● Docker Edge Version
18.05.0-ce-mac67 (25042)
○ includes k8s
● Visual Studio Code 1.24.1
● Ballerina vscode plugin
(0.975.0)
40. // Spring Integration - NOT INTEGRATION SIMPLE
@Component
public class PersonEndpoint {
@Autowired private PersonService service;
public Message<?> get(Message<String> msg) {
return MessageBuilder.fromMessage(msg)
.copyHeadersIfAbsent(msg.getHeaders())
.setHeader(STATUSCODE_HEADER,
HttpStatus.NOT_FOUND)
.build();
}
// + 20 more lines of Java
// + XML config for routing and mediation logic
<beans:beans>
<channel id="inputChannel"/>
<channel id="outputChannel">
<queue capacity="10"/>
</channel>
<service-activator input-channel="inputChannel"
output-channel="outputChannel"
ref="helloService"
method="sayHello"/>
<beans:bean id="helloService" class="samples.PersonEndpoint"/>
</beans:beans>
// + 6 other Java source files
// + XML maven or gradle configuration
// + SpringBoot + CloudFoundry for Kubernetes
// + Netflix for API Gateway
// + Hystrix for Circuit Breaker
Microservices frameworks, such as Spring,
abstract, but do not simplify integration
programming. Spring uses ESBs for integration
logic imposing non-agile developer workflow.
XML Code AdaptersESB
Not
Agile
+ + + =
41. Ballerina is the glue between microservices
Transactions
Circuit Breaking
Protocols
Payloads
Events
Security
Workflow
Streams
Compensation
42. Kubernetes Jaeger
Docker Prometheus
etcd OAuth2 / OIDC
Istio / Envoy
LinkerD RabbitMQ
Consul AMQP
Swagger/OpenAPI
MySQL gRPC / Protobuf
Postgres WebSub
Cassandra
Spring/Java
Visual Studio Code
Intellij IDEA
Ecosystem extensions for
disaggregated architecture
43. In the demo
Discover at
ballerina.io
Ballerina bridges the Integration Gap
Agile Integration Simple
Edit / Build / Run Package management Services Transformations
Language server Ballerina Central Endpoints JSON primitive
IDE plugins Type safety Resources Annotations
Projects Union types Connectors Circuit breaker
Docker and K8S Flow control -> Async
Debugger Observability Workers, fork/join gRPC
Testerina: unit tests CI/CD Message broker Protobuf
Doc generation Table, vector, map Versioning XML type
CLI extensions Struct Bridge Streams
Dev tracing Lambda Swagger CSV
I/O Tasks, scheduling Databases Session mgmt
Projects Dependency mgmt
44. Ballerina is a fully supported
programming language for
building microservices.
May 2nd
- 1.0 language stability
- Ballerina.io live
- Ballerina Central opens
Q2
- Commercial support
- BallerinaCon @ SF
- Ballerina Workflow
Q4
- 1.0 final
- Ballerina @ CNCF
No Risk Adoption Join 100 organizations in the early adoption, deployment,
support, and refinement of the language during the pre-1.0
release cycle.
Commercial
Support
Provided by WSO2, the largest open source integration
vendor with 500 customers. Query support is provided
through ticketing with a guaranteed response SLA.
Unlimited Query
Support
Ask an unlimited number of questions.
Fees $2500 for 5 dev seats for 12 months
Referenceability Dev teams are encouraged to inject numerous ideas for
how to improve the language and runtime. We do require
some form of external referenceability.
Fixes Until the language hits 1.0, there may be incompatible
language changes. Fixes and changes will require
roll-forward updates. Ballerina makes this easy.
Ballerina Early Access Commercial Support
45. How to get involved
Learn more
Open source
Get support
http://ballerina.io
http://github.com/ballerina-platform/
Stack Overflow #ballerina tag