Today's Question:  What does your personal desk look like?        GIVE A SHOUT

 ALL


  Connect to SQLite using Go on Windows

In software development, it's often necessary to test and validate logic using a lightweight and easily manageable database system. SQLite, with its minimal setup and zero configuration requirements, is an excellent choice for such scenarios. Leveraging the simplicity and efficiency of SQLite for testing purposes can significantly streamline the development process. In this guide, we'll explore how to seamlessly connect to SQLite using Go on Windows, empowering developers to efficiently test their code with a reliable and straightforward database solution.Install SQLIte3 PackagesGo has built-i...

341 0       WINDOWS TUTORIAL GOLANG SQLITE3


  Singleton Pattern in Golang

Singleton pattern is the simplest design pattern in software design. It ensures that only one instance of an object exists globally, regardless of how many times the object is instantiated. Based on the characteristics of the singleton pattern, it can be applied to scenarios such as global unique configuration, database connection objects, file access objects, etc. In Go language, there are multiple ways to implement the singleton pattern. Today, let's learn together about some of these approaches.Eager InitializationImplementing the singleton pattern using eager initialization is very simple....

1,653 0       TUTORIAL GOLANG SINGLETON PATTERN


  What can select do in GoLang

In Go language, select is a keyword used to listen to and perform IO operations related to channels.With the select statement, we can simultaneously listen to multiple channels and perform corresponding operations when any of the channels are ready.This article will summarize the common uses of the select statement and provide some considerations when using it.Basic syntaxThe basic syntax of the select statement is as follows:select {case <-channel1: // when channel1 has data to processcase data := <-channel2: // when channel2 has data to processdefault: // if no channel has dat...

998 0       GOLANG SELECT USAGE SYNTAX TUTORIAL


  A simple tutorial on GoLang connecting to Clickhouse

Go, also known as Golang, is a statically-typed, concurrent programming language created by Google. ClickHouse is a high-performance, column-oriented database management system that can be used for real-time data analysis.This tutorial will provide a deep dive into how to connect to ClickHouse from a Go program, including how to perform common database operations such as SELECT and INSERT statements.Before proceeding, it is assumed that you already have Go and ClickHouse installed on your machine. If not, you can download the latest version of Go from the official website and install it by fol...

3,928 0       TUTORIAL GOLANG CLICKHOUSE


  Service discovery with etcd

In previous post, we have talked about etcd and its usage. This post we will cover how to implement server discovery with etcd.Service discovery is to solve one of the most commonly seen scenarios in distributed system where how to find the corresponding target service to talk to. In short, it is to find some server which one can talk to based on some service name.A complete service discovery system include below three key functions:Service registration: A service must register itself to some common place so that others can discover itHealth check: An instance must report its health status to ...

4,307 0       SERVICE DISCOVERY ETCD DEMO TUTORIAL


  etcd installation and usage

etcd is an open source and highly available distributed key-value storage system and is commonly used in critical data storage and service discovery and registration use cases. It is focusing on:Simple: well-defined, user-facing API (gRPC)Secure: automatic TLS with optional client cert authenticationFast: benchmarked 10,000 writes/secReliable: properly distributed using Raftetcd and Redis both support key-value storage and can be set up in distributed systems. Also Redis supporst more key value types. But they are used in different use cases and have different focus areas given below differenc...

2,972 0       DISTRIBUTED SYSTEM RAFT TUTORIAL ETCD


  Encrypting and decrypting PGP file or text on MacOS

When doing data exchange among different parties, there is a frequent need of encrypting data or file and sending it to partner and asking partner to use corresponding key to decrypt the data or file. A famous way of exchanging data is using asymmetric keys where no secret key needs to be shared. One party can just use the public key shared by partner to encrypt the data and the other party uses the private key to decrypt the data.Today, we will introduce how to use PGP to encrypt and decrypt data on MacOS. Pretty Good Privacy (PGP) is an encryption system used for both sending encrypted ...

30,700 1       TUTORIAL DECRYPTION ENCRYPTION GPG PGP


  WireGuard VPN: Setup WG_VPN client App on Android phone and connect to local WG_VPN server on VM

We will show the detail steps about how to setup the WireGuard VPN client on an Android phone/pad and configure the VPN client to connect a WG_VPN server in local network. The setup process contents three main steps:Install WireGuard and create a key-pair in WireGuard client.Add the Android client peer information in the WireGuard server’s config file.Config the Android WireGuard client to connect to the server.The test environment network configuration: Step 1. Install WireGuard App and create a key-pair in WireGuard client.Open the Android phone/pad Google App Play Store and searc...

3,685 0       TUTORIAL VPN WIREGUARD