05 Apr 2019
Let’s get right to it. Each of these services needs to be self manageable and not depended on the other services, meaning you could deploy it on its own, expand on it own ect. If I were to make a change in one API and that results in changes in all the rest APIs and the deployment procedure involves all of the APIs to get a new version than we are not really building services we are building APIs that are connected and very much depended on each other. It can work, but it will be hard to manage both team wise and development requirements wise. When this concept was introduced the idea was that a developer is able to solve a problem: divide and conquer. We would break things into smaller pieces so we can solve them better and reuse each of those small piece anywhere so we make a change in one would be auto-reflected anywhere. That’s like basic narrative and we all know that, but making things simple is very hard.
Continue reading...
18 Jan 2018
Following are some challenges I’ve faced with queues. I have multiple queues that have multiple processes each as I curl data from third party and trying to store it in database. There are queues running in parallel, but each queue might dispatch another job in synchronous way even though multiple processes are running on it. The idea is to maximize the time and get the job done quicker, if no need to wait for something to finish, it can go into another queue, but sometime as per business logic I need to wait from update from previous queue, but running in parallel for different entities that are not related. I am using supervisor for running the queues.
Continue reading...
20 May 2017
I wouldn’t go into installing and configuration of Arch Linux, the wiki is accurate, simple and details enough. After installing the main configuration I do is CPU frequency scaling, because after installation the kernel will be set to performance governor and as a result the fans will start running very often. What I want is a quite laptop, I appreciate the silence.
Continue reading...
20 May 2017
Couple of things about how I use controllers. I have seem many cases, many of them I’ve been part of where we extend the functionality of a controller beyond being that a REST endpoint with the usual CRUD operations and having more than that, which usually includes AJAX calls, some business logic, inclusion of third party libraries etc. So, how do we reuse them, well we don’t, we copy/paste the same if-else conditions and put that in another place/class/controller. And what do we do when we change something about it later down the road, well we find/replace that and we’re done, with that we might mess something up but the testers will find it and we will fix it. This has been done for too long and for too many times.
Continue reading...
16 Aug 2016
Having the code decoupled seems like the way to go for re-usability outside the scope of a framework. That’s the main reason I prefer Symfony, I think it has the best approach since you can easily use some of its components someplace else in some other framework or as is.
Continue reading...