Thursday, May 03, 2018

k8s, k8s everywhere:

and google is slowly killing docker, by open sourcing new build image tool and container runtime:

a good article on unprivileged container: Towards unprivileged container builds

I think I'll just watch, tools are changing so fast in this area ...

right now I'm more interested in graalvm:

so, pandas for everyone?

I didn't pay much attention to it, until I watched this talk: Scaling Uber's Elasticsearch Clusters

they allows user input sql to query elasticsearch, a query proxy parses the query and transforms to elasticsearch syntax, (also routing, rate limiting, caching and workload management)

the query parser mentioned should be queryparser

Using SQL to query Kafka, MongoDB, MySQL, PostgreSQL and Redis with Presto

this is so cool, query all different data sources in one place

more on presto: Engineering Data Analytics with Presto and Parquet at Uber

finally some links

Sunday, May 06, 2018

reading few books at the same time (from local library):

tried few micro emacs editors:

also mcedit can switch to emacs keybindings:

$ cp /etc/mc/mc.emacs.keymap ~/.config/mc/mc.keymap

they work almost the same, I'll stick with mcedit

good introduction on gvisor: Sandboxing Docker with Google's gVisor

Importantly, gVisor does not simply redirect application system calls through to the host kernel. Instead, gVisor implements most kernel primitives (signals, file systems, futexes, pipes, mm, etc.) and has complete system call handlers built on top of these primitives.

and it shares same network stack with fuchsia: go/src/netstack

so it's an os written in go for desktop, container and protentially app?

here's a nice overview on chroot, cgroups and namespaces

clojure has more experiment works on the tools.deps: add-lib

Rich Hickey interviewed in a podcast

looks like he's working on a new version of Datomic/codeq: Creates Datomic dbs from git repos

I am always interested in writing a proxy:

Hosting multiple apps on the same server — Implement a reverse proxy with Node

I still don't have time to upgrade my lxd to 3.0 yet

here's a guide for the cluster mode: LXD Clusters: A Primer

Using Kubernetes for Local Development

it uses GoogleContainerTools/skaffold: Easy and Repeatable Kubernetes Development

Monday, May 07, 2018

use Paramiko to execute remote commands:

import paramiko
import os

client = paramiko.SSHClient()
client._policy = paramiko.WarningPolicy()


ssh_config = paramiko.SSHConfig()
with open(os.path.expanduser('~/.ssh/config')) as f:

host_data = ssh_config.lookup('stg-data')

cfg = {'hostname': host_data['hostname'],
       'username': host_data['user'],
       'pkey': paramiko.ed25519key.Ed25519Key(filename=host_data['identityfile'][0])}


stdin, stdout, stderr = client.exec_command('ls /tmp/')
for line in stdout:


above reads '~/.ssh/config for host ip and supports Ed25519` key

this hackernews thread brings me back to eshell:

  • c-u m-x eshell: open new eshell
  • alias iff ido-find-file
  • C-c M-b: Inserts the printed buffer name at point
  • C-c M-i: Inserts the printed process name at point
  • C-c M-v: Inserts an environment variable name at point

~/.eshell/profile for startup scripts and ~/.eshell/alias for alias

for loop examples:

for f in web1 web2 { scp info.php $f:/var/www/html/oscmax/catalog }
for f in {ls -1d *} {echo $f; svn up $f}
for f in {find . -name '*.java'} {mv $f (replace-regexp-in-string "\\.java$" ".scala" f)}
# Those parens may also be curly braces. Paren for lisp, curly for subshell.
# See how $f is used in curly brace but f is used in parens
for f in db1 db2 {mysqldump -d -uuser -ppwd (concat "prefix_" f "_suffix") >(concat "/tmp/backup_" f ".sql")}

this eshell prompt is very cool: Making eshell your own

Thursday, May 17, 2018

finished reading Think Data Structures: Algorithms and Information Retrieval in Java, it's good and I'm planning to implement examples in clojure

still reading Effective Java (3rd Edition), it's such a great book. I'm have to buy a copy.

borrowed another book from local library:

another book but not computer related: History of Pictures: From the Cave to the Computer Screen, about drawing, painting, lens and photography, great book.

Blog Archives

Search Blog: