Category: programming

Untyped Constants in Golang

Golang is extremely explicit with types. It supports constants of a type. But how about a const 2 or hello. What type would they assume!? Go solved this problem with untyped constants. Untyped means: A constant’s type depends on the type of assignee variable. The assignee’s type must […]

Design Internals of UNIX Non Blocking Sockets

Fundamental of asynchronous programming: Non Blocking Sockets Why async socket programming An application can create thousands of sockets but creating a thread per socket becomes infeasible for a large number (e.g. 100k sockets) An async framework consists non-blocking sockets and an event loop * The kernel allows applications […]

Dissecting Python List allocator (CPython)

List is one of the most frequently used data structure in Python applications. The code for Python list object allocator is present in Python-2.7.5/Objects/listobject.c. Python allocates list objects in heap and uses underlying malloc based APIs. List is a container of Python object references. In plain C terminology. […]

Openstack swift: EADDRNOTAVAIL error

Problem swift-bench keeps EADDRNOTAVAIL error with a highly concurrency setting and multiple swift-bench clients. Setup Ubuntu 13, Swift single machine installation (refer SAIO), swift-client runs local with no-proxy mode. Solution EADDRNOTAVAIL stands for either unavailability of ephemeral ports and a known kernel bug. Check your range of ports: […]