Using reusable objects/resources as a pool in Java is very common. In fact, the Java language itself comes with built-in thread-pool support. In this article, we will demonstrate how we can create a custom resource pool in Java. What is a Resource pool? A resource pool is a collection of reusable resources that can be shared among multiple clients or consumers in a … [Read more...] about Creating Custom Resource pool in Java
Building Auth With JWT – Part 2
This is the follow-up part to part 1 of Auth With JWT story. Highly recommended to go over that first if you haven't already. Challenges: JWT Payload Size: As you might have read in the first part, the business challenges we were trying to solve involved supporting different roles per context(e.g course). This means a user can be a student in one course and be a … [Read more...] about Building Auth With JWT – Part 2
Building Auth With JWT – Part 1
TLDR; JWT(JSON Web Token) can be a very easy yet effective way to build an auth platform(authentication and authorization). In one of my past employments, I was fortunate enough to be part of an interesting yet technically challenging project, that aimed to solve the auth problem(authentication+authorization) in a distributed service-oriented architecture(I am referring to … [Read more...] about Building Auth With JWT – Part 1
Document Your REST API Like A Pro
You are a web application developer and trying hard to build robust, scale-able RESTful API. However, you are not documenting your API structure/skeleton at all. Hello! you are doing it wrong! It also must be a lot painful if you are maintaining this project yourself over time. I have been through such a situation myself also. Luckily, there are a few REST API specification … [Read more...] about Document Your REST API Like A Pro
Understanding Golang Error Handling
As Golang is not the first language programmers usually learn, I assume you already have good knowledge in at least one other programming language and now expanding your knowledge to Golang. If you are just trying to find the error handling mechanism on the official API docs by looking for the try/catch mechanism, you probably got tired of finding that and may be thinking … [Read more...] about Understanding Golang Error Handling