Meet Navin Kumar: Cooperative Context Switching in the Cloud

Ben Hancock
PyBay
Published in
3 min readAug 9, 2018

This post is part of a series introducing the speakers at the PyBay2018 conference in San Francisco later this month. It’s a great chance to learn and connect with an engaged and diverse community of Python developers. We hope you’ll join us!

Navin Kumar

What are you going to be speaking about at PyBay2018, and why are you excited to give this talk?

The title of my talk is “Cooperative context switching in the cloud, or how to make a multi-tenant microservice.“ Basically, I am speaking about the process of transforming from an on-premise Python library for natural language to a fully multi-tenant version hosted in the cloud and accessed by an API. We’re trying to demystify coroutine libraries as an approach for this task (in particular gevent). Eventually, we knew that we would be faced with moving our product to a cloud service, but you have to start somewhere! Hopefully, we can make this process easier to understand for others who might face the same challenge.

How did you get into programming and Python?

I started programming when I was around 11 years old (that would be around 1993) with BASIC and then Visual Basic. I discovered Linux about 3 years later, and got into scripting around then. I started playing around with Python a few years later (at this point, I was in college), and it was some of the early 2.0 versions of the language. I was on and off for a while with smaller projects in various work environments. One of them was a chat server using Python Twisted in about 2008. Now with my current company, I have been writing Python full-time since 2013.

What’s one of the features about Python you like the best?

It bridges the gap between different paradigms of programming so well. It has aspects of object-oriented, functional, and procedural and meta-programming all in the same language system. The grammar stays clean while all these aspects of the language can be used. Python enforces code cleanliness through whitespace usage, which helps make it easier to pass code around between members of [an] agile team.

What’s your favorite Python library (core or third-party), and why?

gevent (the library we’re using in the talk :) ). Cooperative multi-threading/tasking has always been an interest of mine since my college days. It gets down to the basics of multitasking before the ideas of pre-emption kind of took over. I always had an interest in operating systems and how they worked. However, before learning about threading and pre-emption (the basics of multitasking), we first learn about cooperative multitasking (a concept from the late 1950s to early 1960s!). As it turns out, there is still a modern use for the concept now. Python now has several coroutine libraries (including asyncio which is now included in Python 3), and each one of them has interesting programming constructs and approaches.

What can you be found doing when you’re not writing code?

I’m a bit an amateur photographer and like to hike a bit. You’ll probably find me on the weekends around the Bay Area on various trails with camera in hand trying to get the best shot.

Subscribe to catch more interviews with the PyBay2018 speakers! If you haven’t already, make sure to get your pass and sign up for some workshops, too.

--

--

Ben Hancock
PyBay
Editor for

Data journalist and Python programmer. Linux enthusiast. SF Python volunteer.