Cache is a concept we used in programming to improve the performance.
Cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere.
~ Source: Wikipedia
Ballerina had a cache standard library v1.0 (ballerina/cache
) from the initial stages. But there were few drawbacks.
ballerina/cache
only supported in memory storage mechanism where cache entries are stored in a map-based data structure as a key, value pair. There was no…In this article, we will implement HTTP client and server with both HTTP/1.1 and HTTP/2 protocols; and with Go programming language.
HTTP/2 is the second major version of the application protocol, which was officially standardized in response to Google’s HTTP-compatible SPDY protocol. Following articles explain everything about HTTP/2 clearly.
Before starting, you have to setup your machine with Go Lang. Please refer Go Getting Started Guide.
Once you have successfully installed Go, execute go version
command to ensure it works. This should display the Go version you installed.
NOTE: All the Go codes in this article are tested and…
NOTE: All the Ballerina codes in this article are tested and compatible with Ballerina version 1.1.0
Ballerina is a cloud-native programming language whose syntax and run-time address the difficult problems of integration.
HTTP/2 is the second major version of the application protocol, which was officially standardized in response to Google’s HTTP-compatible SPDY protocol. These 2 articles explain everything clearly.
NOTE: All the Ballerina codes in this article are tested and compatible with Ballerina version 0.980.0
Ballerina is a cloud-native programming language whose syntax and run-time address the difficult problems of integration.
Ballerina uses client endpoints to connect to external systems. With the use of an endpoint, it handles security and makes the end user’s life easier by avoiding the external API behavior. Simply, this is a wrapper of external API.
Almost all the client endpoints are secured with different kind of authentication schemes like Basic, HMAC, OAuth 1.0, OAuth 2.0, etc. Some endpoints even support multiple authentication schemes. …
NOTE: All the Ballerina codes in this article are tested and compatible with Ballerina version 1.2.0
We build a Twitter connector, which can be used to Tweet, Retweet etc. with the use of Ballerina programming language. Then we publish it to Ballerina Central using GitHub Actions and make our connector available to use by everyone.
GitHub Repository:
Connector in Ballerina Central:
Before starting, you have to setup your machine with Ballerina. Please refer to Installing Ballerina guide.
Once you have successfully installed Ballerina, execute ballerina -v
command to make sure it works. This should display the Ballerina version you installed.
…
File transport allows files in the local file system to be read from and written to. A polling transport scans a directory or set of directories repetitively with a given period of interval. This is usually an overhead and leads to inefficient use of system resources since it scans the entire set or directories and files periodically even when there are no modifications. As a solution, NIO file transport acts as a non-polling transport which will trigger an event if and only if a file or a directory is created or modified within its monitoring scope.
NIO File Transport of…
This article explains how to deploy a JAVA web application which have MySQL database in DigitalOcean. You have to do following steps in order.
These steps are already explained as Tutorials in DigitalOcean community. So, I will use those tutorials and connect them with the required modifications.
First you have to create and DigitalOcean and create a droplet which is a virtual private server. …
This is a comparison of the research done by Sandra Parsick. This analyze a deeper comparison of SSHJ, Apache’s Commons VFS and JSch libraries for SFTP support.
The comparison is done under the following categories:
* Client authentication over password/public key
* Server authentication
* Upload/Download files over SFTP
* Execute plain shell commands
* File operations on the remote host like move, delete, list over SFTP
SCP (Secure Copy) allows the files in the local file system or a remote file system to be copied to the local files system or a remote file system. This uses SSH for data transfer and provides the same authentication and same level of security as SSH.
Authentication between two hosts can be done using the ‘private and public key pair’ or ‘username and password’. But user has to make sure that the public key of the local machine should be saved in authorized_keys of the remote machine.
Note: The remote host can be the same localhost
. …
Tech Enthusiast | Software Engineer @ WSO2 | Computer Science Engineering @ UoM | Rotaractor | Maliyadeva College