Examples & Scenarios

Movie release reminder

Connect to a movie information service provider or providers and query release date information, process it and if the information is found create a Google calendar reminder.

Learning outcomes: basic Ballerina syntax, HTTP transport support, string manipulation support, JSON/XML support, creating connectors.

Tag collector

A stand-alone app that checks a person's facebook account for photos he/she is tagged in and if matches are found, stores them away in a predefined google drive location.

Learning outcomes: basic ballerina syntax familiarity, http transport support, string manipulation support, json xml support, creating connectors.

Bulk GitHub repo creator

The idea here is to create a set of github repos using parameters passed in. The list of repositories that needs to be created will be stored in the local file system.

Learning outcomes: basic ballerina syntax familiarity, http transport support, file connector usage, string manipulation support, json xml support, creating connectors(optional).

Ballerina based DevOps toolkit

The basic idea is to encapsulate a bunch of ballerina bmz bsz with shell scripts or another scripting language so that they can be used through the command line or be used inside other scripts.

The project is better suited for a team of developers, they will have to have some familiarity with ballerina or work up competency by playing around with it for a few hours first to identify the capabilities of ballerina and then figure out which aspects of it would be useful to a DevOp. Once they have passed this stage, they can start creating services and standalone apps that makes using those aspects of ballerina easy. Examples of actionable items in this stage,

  • Creating scripts to automate client key/secret generation needed for some of the connectors found in ballerina.
  • Creating ballerina services that act as a 1-to-1 json to xml proxy.
  • Filling in a parameterized XML template that's passed in as a service parameter to generate xml payloads on the fly before making outgoing HTTP calls.

Once the services and programs have been created they should be packed in with ballerina to be used conveniently, Examples of actionable items in this stage,

  • packing bsz, bmz and the script files that insulate them into a predefined location inside and creating a new zip distribution that can be unzipped and be run from the command line or be integrated into other scripts.
  • Documenting the scripts that encapsulate the services and programs.
Go to top