Previously in my blog I have talked about microservices, and in a microservice architecture service teams think of their software as being a cog in a far larger machine. So suddenly for service team your customers or business people are not the only consumer of your […]
Category: Development
Reflecton on Building Microservices Designing Fine Grained Systems
Recently I have been reading “Building Microservices Designing Fine Grained Systems” by Sam Newman. Indeed it is a must read book if you are trying to move toward microservices. This book is going to influence and reflect a lot at my work, so I was thinking I […]
Simple trick that can can help us to achieve Zero Downtime when dealing with DB migration
Currently we are dealing with quite a few deployment processes. For a company that enables DevOps culture, deployment happens many many times a day. Tiny fraction of code change goes to deployment, and as the change size is so small it gets easier to spot […]
How to use angular service within another service
Actually it is easy! import { Injectable, Inject } from ‘@angular/core’; import { LoginService } from ‘../common/login.service’; @Injectable() export class PermissionService { constructor(@Inject(LoginService) private login_service: LoginService) { } hasCategoryDeletePerm(){ const u = this.login_service.getUser() return u.is_staff; } }
Configuring django for centralised log monitoring with ELK stack with custom logging option (eg. client ip, username, request & response data)
When you are lucky enough to have enough users that you decide to roll another cloud instance for your django app, logging becomes a little bit tough because in your architecture now you would be needing a load balancer which will be proxying request from […]
Dealing with mandatory ForiegnkeyField for fields that is not in django rest framework serializers
Although I am big fan of django rest framework but sometime i feel it is gruesome to deal with nested serializers (Maybe I am doing something wrong, feel free to suggest me your favourite trick.) Suppose we have two models, ASerializer is based on A […]
A Django Rest Framework Jwt middleware to support request.user
I am using following Django (2.0.1), djangorestframework (3.7.7), djangorestframework-jwt (1.11.0) on top of python 3.6.3. By default djangorestframework-jwt does not include users in django’s usual requst.user. If you are using code>djangorestframework, chances are you have a huge code base at API which is leveraging this, […]
Angular 5 image upload recipe
To prepare our html to upload images we would need to add input field to our html. <input type=”file” class=”form-control” name=”logo” required (change)=”handleFileInput($event.target.files)” > When file is changed it is going to call a function. We would need to define that function at our component. […]
Integrating amazon s3 with django using django-storage and boto3
If we are lucky enough to get high amount of traffic at our website, next thing we start to think about is performance. The throughput of a website loading depends on the speed we are being able to deliver the contents of the website, to […]
Crawling a website with python scrapy
Think of a website as a web, how do we crawl that web? Chances are you went to that navigation menu and found a link that you found interesting you clicked on that and you went to that page to find that important information that […]