Things that i'm looking to or in active backlog for background agents.
High performance distributed networking fabrics
All things LLM Inference
The goal was to achieve Speed-of-Light SW efficiency by building ultra low-latency primitives.
6 months of 14 hr work days with AI assisted R&D. 2 months of unsuccessful fundraising attempt. Attempted to build a venture scale company around these ideas. Work will be cleaned up and OSS'd:
| Latency Comparison Numbers (~2012) | |
| ---------------------------------- | |
| L1 cache reference 0.5 ns | |
| Branch mispredict 5 ns | |
| L2 cache reference 7 ns 14x L1 cache | |
| Mutex lock/unlock 25 ns | |
| Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
| Compress 1K bytes with Zippy 3,000 ns 3 us | |
| Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
| Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
Concurrency is a domain I have wanted to explore for a long time because the locks and the race conditions have always intimidated me. I recall somebody suggesting concurrency patterns in golang because they said "you share the data and not the variables".
Amused by that, I searched for "concurrency in golang" and bumped into this awesome slide by Rob Pike: https://talks.golang.org/2012/waza.slide#1 which does a great job of explaining channels, concurrency patterns and a mini-architecture of load-balancer (also explains the above one-liner).
Let's dig in:
| #!/bin/bash | |
| i="1" | |
| echo "Running Script to kill all $1 processes" | |
| while [[ $i -lt 100 ]]; do | |
| PID=`ps -ef | grep $1 | grep -v 'grep' | awk '{print $2}'` | |
| if [[ "" != "$PID" ]]; then | |
| echo "killing $PID" | |
| kill -9 $PID |
| # coding=utf-8 | |
| from StringIO import StringIO | |
| from datetime import timedelta | |
| from rx import Observer | |
| from rx.concurrency import TwistedScheduler | |
| from rx.disposables import Disposable | |
| from rx.subjects import Subject | |
| from twisted.internet.protocol import Factory, Protocol, connectionDone | |
| from twisted.internet.endpoints import TCP4ServerEndpoint |