SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
09/13/2022
DeveloperWeek Cloud 2022
Programming language Designed for Cloud Native Applications
Anupama Pathirage
Source : https://snarky.ca/the-key-challenges-in-designing-a-programming-language/
In this session
Why we need a new programming language?
What is Ballerina?
Key features of Ballerina
Demo - Develop a REST service using Ballerina
Open source contributions to Ballerina
Application development process
● Write code to integrate many systems
● Test and document the code
● Build and package into Docker
● Write deployment descriptors
● API management and security
● Scaling and performance
● Observe the usages and analytics
● Adjust and redeploy
Why we need a new programming language?
○ Better network abstractions
○ Better support for data representation
○ Network aware type system
○ 1st Class support for a wide spectrum of network protocols
○ Ability to handle concurrency easily
○ Cloud friendliness
○ Visual representations for the full picture
○ Should be a complete platform, not just a language
History of Ballerina?
○ Started in 2016 by WSO2.
○ A general-purpose programming language.
○ Specializes in solving integration & cloud-based problems by providing the
right level of language abstractions and tools.
○ Open-source project and driven by the community.
What is Ballerina?
○ Data-Oriented
○ Language has objects, the development methods are not completely OOP-based.
○ Both objects and functions are first class concepts, giving developers the ability to choose
the best option based on their requirements.
○ Primary focus is on represent, describe, communicate pure data.
○ Compiled
○ Flexibly typed
○ Concurrent
○ Ballerina is NOT a JVM language. It has two implementations.
○ jBallerina - written in java to run on top of JVM and generate JVM bytecode . This is the
first implementation to prove the language.
○ nBallerina - Compiled using LLVM, directly to the platform architecture.
Ballerina Provides Network Abstractions
○ Provides abstractions for both network
services and network clients.
○ For clients - Client objects with remote
methods to represent outbound network
messages
○ For services - Service objects
○ A remote method on a service object
represents a network-callable method.
○ A resource method, which enables a
more data-oriented view of services.
○ Incoming network messages are
dispatched to service objects by using
objects implementing the
language-defined Listener type.
Ballerina has Network-Aware Data & Type System
● Ballerina’s type system is specifically focused
on aiding the development of networked and
distributed applications.
● Plain Data
○ Messages exchanged by network
protocols are represented by plain
data
○ This is called anydata in Ballerina
○ Can be directly serialized to and from
JSON in a simple, natural way.
● Ballerina has a structural type system
○ Type compatibility is identified by
considering the structure of the value
rather than just relying on the name of
the type.
Code to Cloud with Ballerina
● Ballerina provides a unique developer
experience to move from code to cloud.
● The Ballerina compiler can be extended to
read the source code and generate artifacts
to deploy your code into different clouds.
● These artifacts can be Dockerfiles, Docker
images, Kubernetes YAML files, or serverless
functions.
● Building the source with
○ bal build --cloud=k8s Generate the
Kubernetes YAML files and Docker image
○ bal build --cloud=docker
Generate the Docker image and Dockerfile
Ballerina is Concurrent, Reliable & Maintainable
● With more and more applications needing to
support network interaction, concurrency
becomes important for handling scale.
○ Asynchronous function calls - calls a function
asynchronously and the function runs on a
separate logical thread
○ Workers - Represents a single strand of a
function invocation.
○ A strand is a logical thread of control assigned
to every worker, which is multitasked
cooperatively instead of preemptively.
● Ballerina runtime has built-in support for
interacting with a transaction manager.
○ language provides syntax for delimiting
transactions.
Ballerina Provides Sequence Diagram
Ballerina is a Platform
Ballerina has:
- "The language" - This is the core and it's the part that's defined in the
language specification.
- "Platform" - The language has been designed in conjunction with key
components of the surrounding ecosystem
The platform includes:
● a standard library
● a centralized module repository, and the tooling needed to support that
● a documentation system (based on Markdown)
● a testing framework
● extensions/plug-ins for popular IDEs (notably Visual Studio Code).
All batteries included
Auth
Cache
Crypto
Log
io
time
Let’s write some code
● Ballerina 2201.1.1 (Swan Lake)
● VSCode with Ballerina extension
Countries with highest case-fatality ratio (CFR)
Join with Ballerina
○ https://discord.com/invite/wAJYFbMrG2
○ - - https://groups.google.com/g/ballerina-dev
○ https://github.com/ballerina-platform/
○ https://ballerina.io/

Más contenido relacionado

Similar a [DeveloperWeek Cloud - 2022]Programming language Designed for Cloud Native Applications

OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebula Project
 
Cloud Native Application Integration With APIs
Cloud Native Application Integration With APIsCloud Native Application Integration With APIs
Cloud Native Application Integration With APIsNirmal Fernando
 
The Role of Integration in Microservice Architecture (MSA)
The Role of Integration in Microservice Architecture (MSA)The Role of Integration in Microservice Architecture (MSA)
The Role of Integration in Microservice Architecture (MSA)Asanka Abeysinghe
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015aspyker
 
Docker microservices and the service mesh
Docker microservices and the service meshDocker microservices and the service mesh
Docker microservices and the service meshDocker, Inc.
 
Megha_Smriti_resume
Megha_Smriti_resumeMegha_Smriti_resume
Megha_Smriti_resumemegha smriti
 
Cloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps ApproachCloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps ApproachNicola Ferraro
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetesJuraj Hantak
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesAdam Hamsik
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE Corporation
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...NETWAYS
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamDataWorks Summit
 
Docker, Microservices, and the Service Mesh
Docker, Microservices, and the Service MeshDocker, Microservices, and the Service Mesh
Docker, Microservices, and the Service MeshTony Pujals
 
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021StreamNative
 
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...Docker, Inc.
 
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the EnterpriseWSO2
 
Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)Kontena, Inc.
 
Networking in Docker
Networking in DockerNetworking in Docker
Networking in DockerKnoldus Inc.
 

Similar a [DeveloperWeek Cloud - 2022]Programming language Designed for Cloud Native Applications (20)

OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
OpenNebulaConf2019 - Welcome and Project Update - Ignacio M. Llorente, Rubén ...
 
Cloud Native Application Integration With APIs
Cloud Native Application Integration With APIsCloud Native Application Integration With APIs
Cloud Native Application Integration With APIs
 
The Role of Integration in Microservice Architecture (MSA)
The Role of Integration in Microservice Architecture (MSA)The Role of Integration in Microservice Architecture (MSA)
The Role of Integration in Microservice Architecture (MSA)
 
Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015Triangle Devops Meetup 10/2015
Triangle Devops Meetup 10/2015
 
Docker microservices and the service mesh
Docker microservices and the service meshDocker microservices and the service mesh
Docker microservices and the service mesh
 
Megha_Smriti_resume
Megha_Smriti_resumeMegha_Smriti_resume
Megha_Smriti_resume
 
Cloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps ApproachCloud Native Applications on Kubernetes: a DevOps Approach
Cloud Native Applications on Kubernetes: a DevOps Approach
 
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
4. CNCF kubernetes Comparison of-existing-cni-plugins-for-kubernetes
 
Comparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetesComparison of existing cni plugins for kubernetes
Comparison of existing cni plugins for kubernetes
 
KnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative FunctionsKnativeCon 2022 - Knative Functions
KnativeCon 2022 - Knative Functions
 
6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF6. The grid-COMPUTING OGSA and WSRF
6. The grid-COMPUTING OGSA and WSRF
 
LINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native WorldLINE's Private Cloud - Meet Cloud Native World
LINE's Private Cloud - Meet Cloud Native World
 
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
stackconf 2020 | The path to a Serverless-native era with Kubernetes by Paolo...
 
Realizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache BeamRealizing the promise of portable data processing with Apache Beam
Realizing the promise of portable data processing with Apache Beam
 
Docker, Microservices, and the Service Mesh
Docker, Microservices, and the Service MeshDocker, Microservices, and the Service Mesh
Docker, Microservices, and the Service Mesh
 
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
Function Mesh: Complex Streaming Jobs Made Simple - Pulsar Summit NA 2021
 
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...
Docker Networking in Production at Visa - Sasi Kannappan, Visa and Mark Churc...
 
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
[WSO2 API Day Toronto 2019] Cloud-native Integration for the Enterprise
 
Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)Running and Scaling Symfony app in container(s)
Running and Scaling Symfony app in container(s)
 
Networking in Docker
Networking in DockerNetworking in Docker
Networking in Docker
 

Último

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxFIDO Alliance
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxFIDO Alliance
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxFIDO Alliance
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfdanishmna97
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...caitlingebhard1
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringWSO2
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 

Último (20)

Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Intro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptxIntro to Passkeys and the State of Passwordless.pptx
Intro to Passkeys and the State of Passwordless.pptx
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
How to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cfHow to Check CNIC Information Online with Pakdata cf
How to Check CNIC Information Online with Pakdata cf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...Stronger Together: Developing an Organizational Strategy for Accessible Desig...
Stronger Together: Developing an Organizational Strategy for Accessible Desig...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Choreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software EngineeringChoreo: Empowering the Future of Enterprise Software Engineering
Choreo: Empowering the Future of Enterprise Software Engineering
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 

[DeveloperWeek Cloud - 2022]Programming language Designed for Cloud Native Applications

  • 1. 09/13/2022 DeveloperWeek Cloud 2022 Programming language Designed for Cloud Native Applications Anupama Pathirage
  • 3. In this session Why we need a new programming language? What is Ballerina? Key features of Ballerina Demo - Develop a REST service using Ballerina Open source contributions to Ballerina
  • 4. Application development process ● Write code to integrate many systems ● Test and document the code ● Build and package into Docker ● Write deployment descriptors ● API management and security ● Scaling and performance ● Observe the usages and analytics ● Adjust and redeploy
  • 5. Why we need a new programming language? ○ Better network abstractions ○ Better support for data representation ○ Network aware type system ○ 1st Class support for a wide spectrum of network protocols ○ Ability to handle concurrency easily ○ Cloud friendliness ○ Visual representations for the full picture ○ Should be a complete platform, not just a language
  • 6. History of Ballerina? ○ Started in 2016 by WSO2. ○ A general-purpose programming language. ○ Specializes in solving integration & cloud-based problems by providing the right level of language abstractions and tools. ○ Open-source project and driven by the community.
  • 7. What is Ballerina? ○ Data-Oriented ○ Language has objects, the development methods are not completely OOP-based. ○ Both objects and functions are first class concepts, giving developers the ability to choose the best option based on their requirements. ○ Primary focus is on represent, describe, communicate pure data. ○ Compiled ○ Flexibly typed ○ Concurrent ○ Ballerina is NOT a JVM language. It has two implementations. ○ jBallerina - written in java to run on top of JVM and generate JVM bytecode . This is the first implementation to prove the language. ○ nBallerina - Compiled using LLVM, directly to the platform architecture.
  • 8. Ballerina Provides Network Abstractions ○ Provides abstractions for both network services and network clients. ○ For clients - Client objects with remote methods to represent outbound network messages ○ For services - Service objects ○ A remote method on a service object represents a network-callable method. ○ A resource method, which enables a more data-oriented view of services. ○ Incoming network messages are dispatched to service objects by using objects implementing the language-defined Listener type.
  • 9. Ballerina has Network-Aware Data & Type System ● Ballerina’s type system is specifically focused on aiding the development of networked and distributed applications. ● Plain Data ○ Messages exchanged by network protocols are represented by plain data ○ This is called anydata in Ballerina ○ Can be directly serialized to and from JSON in a simple, natural way. ● Ballerina has a structural type system ○ Type compatibility is identified by considering the structure of the value rather than just relying on the name of the type.
  • 10. Code to Cloud with Ballerina ● Ballerina provides a unique developer experience to move from code to cloud. ● The Ballerina compiler can be extended to read the source code and generate artifacts to deploy your code into different clouds. ● These artifacts can be Dockerfiles, Docker images, Kubernetes YAML files, or serverless functions. ● Building the source with ○ bal build --cloud=k8s Generate the Kubernetes YAML files and Docker image ○ bal build --cloud=docker Generate the Docker image and Dockerfile
  • 11. Ballerina is Concurrent, Reliable & Maintainable ● With more and more applications needing to support network interaction, concurrency becomes important for handling scale. ○ Asynchronous function calls - calls a function asynchronously and the function runs on a separate logical thread ○ Workers - Represents a single strand of a function invocation. ○ A strand is a logical thread of control assigned to every worker, which is multitasked cooperatively instead of preemptively. ● Ballerina runtime has built-in support for interacting with a transaction manager. ○ language provides syntax for delimiting transactions.
  • 13. Ballerina is a Platform Ballerina has: - "The language" - This is the core and it's the part that's defined in the language specification. - "Platform" - The language has been designed in conjunction with key components of the surrounding ecosystem The platform includes: ● a standard library ● a centralized module repository, and the tooling needed to support that ● a documentation system (based on Markdown) ● a testing framework ● extensions/plug-ins for popular IDEs (notably Visual Studio Code).
  • 15. Let’s write some code ● Ballerina 2201.1.1 (Swan Lake) ● VSCode with Ballerina extension
  • 16. Countries with highest case-fatality ratio (CFR)
  • 17. Join with Ballerina ○ https://discord.com/invite/wAJYFbMrG2 ○ - - https://groups.google.com/g/ballerina-dev ○ https://github.com/ballerina-platform/ ○ https://ballerina.io/