Sunday, September 22, 2019

Tcp timeouts

https://blog.cloudflare.com/when-tcp-sockets-refuse-to-die/amp/

Tuesday, September 17, 2019

Thread local storage

This is a good pictorial representation of how linux stores thread local storage, and how it can be accessed using the key used in pthread_setspecific (each thread uses the key to find out its local thread local storage block) e.g. http://weng-blog.com/2016/07/Linux-tls/

how to become a good programmer

Embedded C++

RTTI, dynamic memory allocation and exceptions are among the most hotly debated subjects in embedded circles. (ref: http://forums.codeguru.com/showthread.php?539611-I-have-7-days-to-prepare-for-an-Embedded-C-Interview-Any-tips-and-good-links)

RTTI is used by dynamic_cast to figure out if a base ptr can be reinterpreted as a derived class ptr . look at https://blog.feabhas.com/2013/09/casting-what-could-possibly-go-wrong/

Also look at this https://cs.nyu.edu/courses/fall16/CSCI-UA.0470-001/slides/MemoryLayoutMultipleInheritance.pdf for description about virtual inheritance and memory layouts therein.

Saturday, September 14, 2019

ipfs

Aim is to replace HTTP
https://ipfs.io/

Further, when reading about IPFs i came across Merkle trees, which are incidentally also used in Git to reduce the time for finding out what has changed between 2 branches.

This further took me to this paper : https://people.csail.mit.edu/silvio/Selected%20Scientific%20Papers/Zero%20Knowledge/Zero-Knowledge_Sets.pdf

Sunday, September 8, 2019

Thrift

Containers from scratch

Things to explore further:https://ericchiang.github.io/post/containers-from-scratch/
(1) chroot, and it does not have private namespaces
(1) creating "namespaces" with unshare
(2) entering namspace with nsenter
(3) network namesapces can be shared e.g. across containers.
(4) cgroup directories can be created in /sys/fs/cgroups, and then appropriate values configured. cgroups is a way for the kernel to have "controlled isolation"

Saturday, September 7, 2019

Why BGP is a better iGP

https://archive.nanog.org/meetings/nanog55/presentations/Monday/Lapukhov.pdf and the RFC is https://tools.ietf.org/html/draft-ietf-rtgwg-bgp-routing-large-dc-01

Note that normally, when BGP RIBs are exchanged by two routers, if both sit in the same AS, then while their RIB will show the path, it will be marked with an "i", and that path will not be advertised to the outside world. If we instead give an AS to each rack and then use BGP it can be still made to work because each ASN is considered a private ASN. 

Distributed Systems: Compute Infra.

Tuesday, September 3, 2019

Compute Platform comparison

I liked this comparison of platforms of (a) Virutalized compute resources vs. CaaS (taken from https://thenewstack.io/container-orchestration-scheduling-herding-computational-cattle/). In general modern cloud can be divided into
 Infrastructure as a Service (IaaS), Containers as a Service (CaaS), and Platform as a Service (PaaS).