Everyone want to keep Django timezone support but sometimes you need to keep your SQL queries a way from timezone conversion especially if by default your application timezone is UTC. Django will do something like this CONVERT_TZ(`app_incident`.`datetime`, 'UTC', 'UTC'))
and it will return Null
if the timezone table is empty. Even that conversion is not even needed.
Django Custom Lookups
By default Django has a date
lookup that support timezones. It actually will wrap your field with CONVERT_TZ
in case USE_TZ
is True
. This is pretty awesome unless you have timezones table empty because this call will return Null.
Building a Service Mesh with Consul
Load balancers aren’t efficient in a dynamic environment where we scale services up or down. Consul uses a registry to keep a real-time list of services, their location, and their health. Services query the registry to discover the location of upstream services and then connect directly. This allows services to scale up/down and gracefully handle failure
continue reading »Getting Started With Consul Service Discovery Tool
Consul is a tool for discovering and configuring services in your infrastructure. It provides several key features like service discovery, health checking, KV store and multi datacenter support.
How to Create a Facebook Messenger Bot With Java
Today I’ll show you how to build your own Facebook Messenger Chat Bot in Java. We’ll use Spark Web Framework, Racter Java Package, Gradle and Ngrok. So Let’s get started.
continue reading »
How To Set Up MySQL Master-Master Database Replication
One of the most difficult tasks for software engineers is scaling out the databases incase of large traffic applications. Today we will discuss one of the horizontal scaling techniques which is the Master-Master replication. Master-Master replication adds speed and redundancy and also distribute the writes load over many servers.
Build Realtime Apps With Redis PubSub
Last week I worked with Pusher. Pusher is really amazing product to build scalable realtime apps. Also there is slanger and Poxa, Both are open source implementation compatible with Pusher libraries. But today we will use PHP, NodeJs, SocketIO and Redis Pub/Sub To work with realtime messaging.
continue reading »