SlideShare a Scribd company logo
1 of 17
Download to read offline
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/

More Related Content

Similar to [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 to [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
 

Recently uploaded

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
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
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
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
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

[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/