Building Generic Service Container in Go [PART 1]

Walking through the new world of generics in Go.

Finally, Generics are in the house of Go, or are they? Today I’ll be building a very simple service container using Go’s 1.18 generics as an example What are service containers anyway? Service container is a container which stores instances (implementations) of your services (interfaces) so you can retreive/bootstrap them any time you need to. For this post the said definition is enough, but later on next posts I’ll be extending the service container to full fledged dependency injection solution. [Read More]

Making Timed Maps in Go

Making an efficient, concurrency-safe maps with TTL in Golang

Many of today’s web apps requires some sort of a super fast data storage mechanisms for achieveing various types of features regarding Authentication, Authorization, Rate-limitting and Caching, just to name a few. Solutions such as Redis, Aerospike …etc are great, but these solutions may come with an overhead in case that your usecase doesn’t really requires that much of the features they introduce when you really just want something that is simple and gets the job done. [Read More]
go  temap  backend