Image: https://caitiem.com/2016/08/18/a-quick-guide-to-testing-in-golang/

Concurrency is one of the most discussed topics is programming. A lot of concurrency patterns have been introduced over time in different programming languages. Golang is considered as a language with very rich support for concurrency. This article takes a deep dive into how these classical concurrency patterns can be adapted into Golang.

Go Concurrency Primitives

Golang’s rich support for concurrency is mainly based on two primitives

  • Channels

Two important principles about Go concurrency primitives,

  • Share by communicating (not using shared variables, but with channels)

Let’s dive into the concurrency patterns.

Asynchronous APIs

In languages like JavaScript…


Image: https://medium.com/@ashleymcnamara/gophercon-2018-b9a97387b954

It has been a couple of years since Serverless technology became a hot topic. Since then, there has been many debates and discussions over this topic. If you are a developer coming from a microservices background (like me), naturally you will get multiple questions on your mind at the beginning, such as,

  • How can I test the functions on my local env?
  • What should be the project structure?
  • How to handle logging?

And a lot more. In my case, I have been struggling with solving most of these issues since the day…


Image: https://stackify.com/learn-go-tutorials/

Errors are one of the most important aspects of a programming language. The way you handle errors impacts the performance of the application in many ways such as,

  • Traceability
  • Debuggability
  • Maintainability

How errors are defined in Golang is a bit different from languages like Java. In Go, errors are values. For example, you can assign an error to a variable in the same way you assign an integer to a variable. Consider the following example,

config, err := ioutil.ReadFile("config.json")
if err!=nil{
fmt.Print("Error:",err)
}

We can handle Go errors mainly in two ways,


Dependency management is a problem that is there with the programming languages. Most of the programming languages have their own solution to this problem. In Golang, currently, there are two dependency management solutions. Go Dep was introduced by the Go development team as

the “official experiment” dependency management tool for the Go language

So, most of the Go software projects started using Go Dep. But in later go versions, it was officially decided to go with Go Modules as the official dependency management tool for Golang. …


First of all, we need to install the dependencies required for kong. Please execute following commands to install dependencies

sudo apt-get update 
sudo apt-get install -y openssl libpcre3 procps perl unzip

Now its time to download kong binary file. For downloading binary and installing the package please execute the following command

wget https://bintray.com/kong/kong-deb/download_file?file_path=kong-1.4.0.bionic.amd64.deb -O kong-1.4.0.bionic.amd64.deb
sudo dpkg -i kong-1.4.0.*.deb

Now we can test whether the Kong installation was successful by running following command

kong roar

If the installation was successful, it should print the following output

➜  ~ kong roar
Kong, Monolith destroyer.
/\ ____…

Source : https://www.userlike.com/en/blog/benefits-of-live-chat

There are a lot of chat applications are in the use. But only few of them standout because of the qualities they bear which attracts the users. Two of those best chat apps are considered to be Facebook Messenger and Whatsapp. Although these companies are discrete about the architecture of their applications, I managed to find bits and pieces of information from blog articles and forums. This is a composition of them and these facts can be outdated since all these applications are tend to be updated frequently.

1. Facebook Messenger

Facebook’s messenger is one of the most popular chat applications. Several years…


Originally published on portlandnativeamericanchurch.com

I had one of the most awesome summer experiences with GSoC 2017 as an intern with Eclipse Organization. So I wanted to apply for GSoC 2018 too. While going through the list of selected organizations, I found this amazing organization which suddenly caught my eye.


What is Docker Engine API ?

Docker has become one of the most popular technologies used all around the world today. Docker engine is the portion of a docker installation which takes care of the all the docker features. But when we are trying to automate the processes which uses the docker features such as “deploying an app via Jenkins” we need a way to access the docker engine via a scripts and run docker commands. Docker API helps the developers to access the docker engine through their scripts.

When the Docker Host is in a remote machine, we need a way to access the docker…


Overview

I contributed to Eclipse Che as my project in Google Summer of Code 2017 program. My target was to port a legacy data source plugin which was used in the earlier versions of Che to Che 5. This plugin was developed as several parts.

  1. Data source explorer
  2. SQL editor

Implementation

I found the earlier used plugin in a deprecated repository with the guidance of my mentor Sun Tan . My first task was to clone Che repository in my local environment , build it and run Che . After bit of a struggle i could make it…

Sudaraka Jayathilaka

Gopher 💻 Cloud ☁️ Distributed Computing 🖥

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store