Fiber popularity rank is on the rise. Based on the latest benchmark it’s way faster than Echo. The biggest difference with Echo, that it uses fasthttp router instead of net/http.
The benchmark graph above means the higher the value the better. It means that our HTTP router can process more request per seconds. Fiber is basically much faster compares to Echo.
Writing a specification is a meticulous process in Software Engineering. Regardless, it’s necessary if we want our API being used by others. It helps others to integrate without API with more ease. The better the documentation the easier others…
Gin is one of the most popular frameworks for Go. It’s simple to use.
Writing a specification is a meticulous process in Software Engineering. Regardless, it’s necessary if we want our API being used by others. It helps others to integrate without API with more ease. The better the documentation the easier others will integrate it into their system. In order to tackle this problem, we should follow a standardized way to create API documentation in the industry, the OpenAPI Specification or formerly known as the Swagger Specification.
The OpenAPI Specification, formerly known as the Swagger Specification, is the world’s…
Moving on from serial id when inserting a new database record.
In any database, we always need an identifier to differentiate one record from one another, commonly known as Primary Key. Now let’s say we want to create a table to record user information. It’s very common for us the create a table like:
create table user(
id serial primary key,
full_name varchar
);
Most of us used to create the primary key serial. Rememberserial
is implemented through a sequence
, which acts a bit like a counter. Each time we insert new data to the current table, the next sequence…
Beginner guide on how to calculate maximum requests per second that a server can handle.
One of the important part before creating a new service is called capacity planning. In this process, we calculate how many resources are we are required for the service to able to handle the projected traffic.
In Layman’s terms, this planning will be like planning for a trip for a bunch of people, knowing how many people that will go, can help you determine how many cars are required for the trip. …
Introduction to N+1 Problem and how to avoid a common performance pitfall.
The N+1 query problem is a common performance antipattern which occurs when the code needs to load a bunch of children from a parent data in the one-to-many relation. Queries are executed for the parent record, then one query for each child records. End up doing N+1 queries to the database to get each child belonging to the parent record.
Let's assume you have a table, calls “category” to record the list of categories that available in your shop. Each category may have one or more products that…
Previously, Go didn’t have built-in dependency package management. That’s why package management like Dep or Glide is very popular and use widely. However, starting at Go 1.11, Go provides a dependency package management that makes dependency version information explicit.
Previously, I also used Dep intensively for my Go development. But since last year, I have been using Go Mod as the new standard with Go v1.14. While working Go Mod, I somehow ended up wasting time opening a bunch of Stackoverflow or other people article just to do something. …
Echo is one of the most popular frameworks for Go. Echo positions itself as a high performance and minimalist web framework. It’s simple to use.
Writing a specification is a meticulous process in Software Engineering. Regardless, it’s necessary if we want our API being used by others. It helps others to integrate without API with more ease. The better the documentation the easier others will integrate it into their system. In order to tackle this problem, we should follow a standardized way to create API documentation in the industry, the OpenAPI Specification or formerly known as the Swagger Specification.
The…
Software Engineer | INTJ | Choleric | The Questioner (CD) | Creator & Advisor