Author: Trần Huy

Trần Huy

Posts by Trần Huy:

Use Design Patterns in developing an ios application or any system

There are around 21 design patterns and categorize in 3 categories that we will mention here First, just have a look at the list and categorize it Creational patterns: Creational patterns support the creation of objects Singleton pattern Builder pattern Factory pattern Abstract Factory Pattern Prototype Pattern Structural patterns: Structural patterns concern class and object […]

Background Thread and Main Thread in iOS

Reference https://www.raywenderlich.com/5370-grand-central-dispatch-tutorial-for-swift-4-part-1-2#toc-anchor-006

Grand Central Dispatch in iOS

Reference https://www.raywenderlich.com/5370-grand-central-dispatch-tutorial-for-swift-4-part-1-2#toc-anchor-006

Build a system for global scale: basic theory

If you are trying to build a system and try to scale it globally, sell your product all over the world, you will need a collection of rules that are implemented in design and code. In this article, we will make clear some basic knowledge on how to build an system able to scale globally […]

Improve performance x times with concurrency / synchronization

The theory Job A: 5 sec Job B: 6 sec Job C: 7 sec So, to handle job A,B,C we need 5 + 6 + 7 = 18 sec How to improve it ? You can do all job asynchronous So, all to job will be executed at the same time How to do it […]

HAPROXY IN USE

What is this article about ? What is HAProxy ? Install HAProxy Configure the load balancer Use HAProxy to balance Websocket traffic Use HAProxy to configue backup server HAProxy algo Use HAProxy to Observe all requests for errors Use HAProxy to Monitor for server downtime Use HAProxy to send logs to syslog Separating errors into […]

Use VIM for coding

What is in this article about vim? Some Basic knowledge and keyword to use VIM Basic search in document with VIM Basic select text and block with VIM Basic copy and paste with VIM Basic moving in VIM Copy and paste in vim over ssh with X11 forwarding Replace content with VIM Replace content with […]

Docker on Centos

Using Docker Machine, we can set up Docker hosts on local systems, on cloud providers, and other environments very easily. We’ll cover that in a different recipe. How to To Install Docker on centos $ yum -y install docker How it works… The preceding command will install Docker and all the packages required by it. […]

API Gateway with Go and Node.js

## Ref Building an API Gateway using Node.js https://github.com/motiv-labs/janus https://dev.to/alombarte/an-api-gateway-is-not-the-new-unicorn-2kk2

Golang in use

What is this article about? Import Debug Variables and Declarations Function Declarations Data Type Structure, enum, class Maps, Arrays and Slices Interfaces Concurrency Pointer How to create a routes ( Storing routes, static routes, dynamic routes, Forwarding routes… ) Working with web handlers, requests, and ResponseWriter instances: parse request data, response JSON Making a middleware […]