Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

[DeveloperWeek Austin 2019] Microservices in Practice with Ballerina, Kubernetes and Istio

33 views

Published on

This slide deck explores how Ballerina specializes in writing microservices and deploying them into Kubernetes and Istio without having to write YAMLs and dockerfiles.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

[DeveloperWeek Austin 2019] Microservices in Practice with Ballerina, Kubernetes and Istio

  1. 1. Microservices in Practice with Ballerina, Kubernetes and Istio November 2019 Lakmal Warusawithana, Senior Director - Cloud Architecture, WSO2 @lakwarus
  2. 2. Why Microservices?
  3. 3. Agility
  4. 4. Let’s write a Microservice
  5. 5. Inherently Async I/O
  6. 6. JSON as a native type json is just a union - () | int | float | string | map<json> | json[] // JSON object json payload = { "orderdata": { "id": 1, "name": "XYZ", "price": 2500 } }; //Access object values json orderid = payload.orderdata.id; //JSON arrays json orders = { "orderdata": [ { "id": 1, "name": "XYZ", "price": 2500 }, { "id": 2, "name": "ABC", "price": 3000 } ] };
  7. 7. XML as a native type // Simple XML literal xml x1 = xml`<name>Lakmal Warusawithana</name>`; // XML with namespaces xmlns "http://wso2.com" as ns0; xml x2 = xml `<name id="123" status="married"> <ns0:fname>Lakmal</ns0:fname> <ns0:lname>Warusawithana</ns0:lname> </name>`; // XML literal with interpolation string lastName = "Warusawithana"; xml x3 = xml`<lname>${lastName}</lname>`; // Concat XML values xml x4 = x1 + x2 + x3;
  8. 8. Let’s deploy the Microservice
  9. 9. apiVersion: apps/v1 kind: Deployment metadata: name: hello-deployment labels: app: hello spec: replicas: 1 selector: matchLabels: app: hello template: metadata: labels: app: hello spec: containers: - name: hello image: hello:latest imagePullPolicy: "IfNotPresent" ports: - containerPort: 9090 Create a deployment.yaml
  10. 10. apiVersion: "v1" kind: "Service" metadata: labels: app: "hello" name: "hello" spec: ports: - port: 9090 protocol: "TCP" targetPort: 9090 selector: app: "hello" type: "NodePort" Create a service.yaml
  11. 11. However, those parts are not part of the programming experience for the developer.
  12. 12. Ballerina Cloud Native Support
  13. 13. ● @kubernetes:Deployment{} ● @kubernetes:Service{} ● @kubernetes:Ingress{} ● @kubernetes:HPA{} ● @kubernetes:Secret{} ● @kubernetes:ConfigMap{} Supported K8s and Istio Kinds ● @kubernetes:PersistentVolumeClaim{} ● @kubernetes:ResourceQuota{} ● @kubernetes:Job{} ● @openshift:Route{} ● @istio:Gateway{} ● @istio:VirtualService{}
  14. 14. ● Ballerina helps to write Microservices by providing network abstraction as first class language constructs ● Ballerina natively understand Cloud Native platforms like Docker, Kubernetes and Istio. ● Ballerina removes gap between developers and Ops. ● Ballerina and Kubernetes support agile development to deployment and improve productivity. Takeaways
  15. 15. How to get involved Learn more Open source Get support http://ballerina.io http://github.com/ballerina-platform/ Stack Overflow #ballerina tag

×