Rust Lifetimes

Coming from a background in C/C++ and other programming languages doesn’t help with understanding this one fundamental concept in Rust. Here, I’ll try to break it down so it becomes a bit more palatable (and a reference to my future self.) A simple example: fn main() { let list = vec![100, 34, 72, 55]; // list is created let first_two = &list[0..2]; // reference is created (first_two) println!("first two are {:?}", first_two); // first_two is referred println!("list is {:?}", list); // list is referred println!("again, first two: {:?}", first_two); // first_two is referred } // first_two is dropped, then, list is dropped A complicated (yet valid) example: ...

April 15, 2020 · 2 min · 358 words

On WebAssembly

This blog is not going to define what WebAssembly is, how it interacts with JS or other languages; there are too many blogs and posts available on the internet already. If you’re not familiar with WebAssembly, I would suggest you start here: A cartoon intro to WebAssembly WebAssembly Concepts This blog post is about wondering what WebAssembly can look like for some usecases. Run Everywhere WebAssembly can run everywhere - atleast that’s the goal. It’s performant - as performant as C/C++ and it’s secure. ...

March 17, 2020 · 2 min · 294 words

My Python Environment

The most common way people go about setting up a Python environment is to do something like this: $ sudo apt install python3 python3-pip # installs pip3 $ sudo pip3 install --upgrade pip # upgrade pip to latest version Congrats, now you’re stuck with whatever version ships with the distro. I think we can do better! pyenv My recommendation now, is to use pyenv with which you can manage multiple versions, virtualenvs through a nice CLI ...

February 12, 2020 · 2 min · 256 words

New Year's Resolutions (2020 Edition)

Resolutions… Goals… things you write down to not follow! But you write them down anyways.. 2020 used to be hindsight but not any more. It’s here. I’ll write down my own resolutions for this year here… Technology Continue with my FP journey (Clojure and F#) Keep on learning Rust and Golang (Maybe) look into Ziglang DDD and Software Architecture. I have been reading a lot about it recently and will continue to try to do so. Especially Wlachsinn’s book! Health Start exercising regularly Eat healthy food normally (it’s fine to eat unhealthy sometimes) Swim! Misc Start a side-project in Rust (embedded??) Start a web Frontend (Clojurescript??) project Conclusion I’m sure I’ll miss out on some things and do some right… Fingers crossed.

January 7, 2020 · 1 min · 122 words

Answering Questions on SPS 2019 Demo

SPS Nuremberg is one of the largest gatherings of the Industry. This year was no different. I was part of a team that presented the concept of OT/IT consolidation. I got quite a few comments and questions about the demo video (in Urdu here). So here’s a shot at answering some of the questions I got forwarded: The demo was (in oversimplified terms) showing PLC compute moved to software which can be orchestrated using Kubernetes. ...

December 1, 2019 · 3 min · 625 words

Getting Started with Clojure[script] Behind Corporate Proxy

So on my Clojurescript journey, the first roadblock I hit was corporate proxy. I don’t know why Java, maven, clojure (everybody?) doesn’t respect the environment variables but this is a real pain. Getting started Clojurescript is written in Clojure which requires Java. So we need to get all three up and running. Java To get Java JDK and JRE, run: $ sudo apt install openjdk-11-jre $ sudo apt install openjdk-11-jdk For proxy settings, edit /etc/java-11-openjdk/net.properties. ...

October 14, 2019 · 2 min · 231 words

Evolutionary Architecture

Evolvability of Architectural Styles… Big ball of mud Monoliths Event-driven architectures Service-oriented architectures (SOA) Serverless

September 22, 2019 · 1 min · 15 words

Benchmarking DPDK

My reference: https://software.intel.com/en-us/articles/set-up-open-vswitch-with-dpdk-on-ubuntu-server So I got to play with the Data Plane Development Kit (DPDK) from Intel recently. I planned on replicating the PVP benchmark for my use-case. I set up the following environment: Ubuntu 18.04 (bionic) host with: KVM QEMU Debian 10 guest images downloaded from: https://cdimage.debian.org/cdimage/openstack/current/ A useful tool is numactl (use apt to install it). On my non-server system, I don’t have multiple socks and multiple cores per sock etc. ...

July 8, 2019 · 4 min · 674 words

Kata annotations

Annotations are a great feature in Kubernetes and a means for communicating to kata some options. They are being documented as of the time of this writing Using annotations, you can: Customize the Kernel that is used (see KernelPath example below) Change the guest image (ImagePath) Hypervisor (HypervisorPath) Firmware (FirmwarePath) etc. etc. (All of the annotations are listed in annotations.go) Using a Custom Kernel Here is the yaml file I used to apply a custom kernel: ...

June 11, 2019 · 1 min · 114 words

Kata and Kubernetes

Setting up Kata using Docker This is documented here: https://github.com/kata-containers/packaging/blob/master/kata-deploy/README.md#docker-quick-start Using Minikube and Kata This PR is adding the documentation to get started with minikube: https://github.com/kata-containers/documentation/pull/445# Using kubeadm First, set up a Kubernetes cluster using kubeadm: https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/ then, https://github.com/kata-containers/packaging/blob/master/kata-deploy/README.md#kubernetes-quick-start Conclusion Using the new kata-deploy method, it is very easy to set up a Kubernetes cluster that uses Kata Containers.

May 19, 2019 · 1 min · 59 words