Python Logging Under The Hood

08/07/2018 by Abhijit Gadgil

Python Logging module is perhaps one of the most widely used and often not so well understood module. While most of the things are documented quite well, sometimes it's easy to miss out a few things. Here we take a look at Python's Logging module in a bit more details, trying to get under the hood to figure out what's really happening.

read more

Python Project Workflows - Part 3 (pylint)

16/05/2018 by Abhijit Gadgil

In the first part we looked at a few challenges involved when developing a Python project in a collaborative environment. In the second part we looked at how Pipenv addresses some of those issues. In this part of the series we are going to take a closer look at how one can use code linting tools. Specifically we are going to be looking in details at using pylint.

read more

Python Project Workflows - Part 2 (Pipenv)

14/05/2018 by Abhijit Gadgil

In the first post, we looked at what are typical issues in setting up Python project workflows and took an overview of the tools of the trade. In this post, we are going to be looking closely at pipenv a tool for managing Python project dependencies. In particular we are looking at how pipenv will help us solve the problems of reproducible builds and managing dev and production environments properly.

read more

Python Project Workflows - Part 1

08/05/2018 by Abhijit Gadgil

In a Python based development, tools like pylint, pipenv and virtualenv become important pieces of your development workflow. In the first part of the series of blog posts, we look at overview of the issues that become important as the scope of the project and size of the team working on project increases. In later posts in these series, we would try to address these issues one by one, we look at starting a project, identifying and resolving dependencies 'correctly', why reproducible builds matter, how to separate development and production environment and eventually how to containerize the application.

read more

OpenAirInterface with Linux Network Namespaces

15/03/2018 by Abhijit Gadgil

OpenAirInterface aims to develop open source software solutions for 4G and 5G cellular network, that would run on COTS hardware (typically x86/ARM based CPUs). The project provides an Air Interface Simulator (OAISIM) and implementations of eNodeB and the EPC. OAISIM allows one to test the software implementations of the Network components, without actually having access to the RF part. While there are many tutorials that allow you to connect OAISIM + eNodeB on one machine and connect it with EPC (MME/SGW and PGW) running on another machine, I was not able to find any good tutorial that allowed to connect these devices on the same machine. While, it's quite possible to do so by using two VMs on the same machine, two VMs still looked like sub-optimal as in theory it looked quite possible to do this using Network Namespaces to provide isolations for individual nodes. Further, using network namespaces would allow to containerize this quite easily. Since the development platform I am using is not exactly identical to the one for which documentation is available, I had to do some tweaking to build the components as well. This blog post discusses this in details.

read more

Linux VRF with MPLS for L3-VPN

27/02/2018 by Abhijit Gadgil

VRF support for Linux was added in kernel 4.5. In the Linux netdev 1.1 conference, there was a talk about this support, which showed one of the use-case as MPLS-VPN. This blog post tries to re-create the setup from demo on a kernel 4.15.

read more

Linux Virtual Interfaces

23/02/2018 by Abhijit Gadgil

Linux supports veth and tun/tap types of virtual interfaces, which are used by VMs, Containers for providing networking. This post summarizes certain findings as a result of experimenting these virtual interfaces along with Linux's Ethernet bridge.

read more

Using Python Context Manager for Profiling

24/08/2017 by Abhijit Gadgil

Profiling your code to identify hotspots or potential performance issues can prove quite useful. Python provides a cProfile package in the standard library provides this functionality for deterministic profiling. Usually, one might want to have an ability to turn profiling on and off at the run-time if possible. We explore a mechanism based on context managers in Python (Python with syntax) to be able to do so.

read more

So Vector Operations Are Fast, Right?

07/08/2017 by Abhijit Gadgil

Recently, for one of the projects we are working on, I was looking at processing data from Pandas panel. I wanted to find out certain items in a Panel based on certain criteria on the minor axis. I worked with two flavors and the findings for different data-sets are quite interesting. Something that would definitely qualify as an interesting learning. We discuss, how profiling can be successfully used to explain certain Performance behavior, that often looks counter-intuitive.

read more