ETCD Architecture study.
Some study note about survey how Raft work in ETCD. Something more about official architecture from digging code.
Data storage in etcd/storage/backend. The file structure as follow:
topic/sub_topic/data
Data Exchange type using protobuf with grpc
BTW: NSQ using http.handle. So, no RPC data exchange issue, no protobuf required.
NSQ about how to elimiate SPOF
Refer to slide.
Seems the SPOF means of client side failure handle, not server side. (TBC)
Every server response to dedicate topic (no redudent) (p.22)
Client use this to add more consumer and handle it as load balance. (Refer topology_pattern)
quote: Assuming you have some sort of load balancer in front of these two hosts you can now tolerate any single host failure.
Need more check about this gist about use NSQ on K8s
Golang
Program to prints out the visible surface of a go package?
Godex is the program to print APIs and package Info.
How to use godex
go get golang.org/x/tools/cmd/godex
How to use godex
godex math
godex github.com/kkdai/photomgr
VC(Visual Studido
How To Use RPC Callback Functions
IBM KM: RPC Callback Procedures Example
這是什麼? 程式週記主要內容如下: Gihub project 介紹: 主要會貼一些github,但是會盡量寫上一些有用的評語(或是我容易想到的關鍵詞)幫助以後查詢 網路文章心得: 會寫些心得,強迫自己閱讀. “程式週記”並且定期週期性更新. 大部分內容在我的twitter都會有,這邊只是將一些簡單的心得與感想註解一下. 本週摘要 最近有在歐萊禮買了一本電子書,也找了不少有趣的電子書要看.得花更多時間來看,也想花點時間來看Coursera,時間真的要好好想想. 本週專案部分,最近實在花太多時間在看NSQ的內部構造.反而比較少花時間去寫Code.這其中的取捨變得困難不少,可能也跟我了解得不夠紮實有關.這部分要努力學習. Go A complete, reliable, ircd written in Go. 用 go 寫的 ircd xo is a command line tool to generate Go code based on a PostgreSQL, MySQL, SQLite, or Oracle, or Microsoft SQL Server database 只要給SQL的Schema,就可以長出Golang的model Youtube: Comparing Erlang and Go Concurrency 可以參考看看一個session介紹關於Erlang跟Go的Concurrency. licenses lists Go packages dependencies licenses 可以列出所有用到的Go project的License,算是很有用的工具. [Go projects and the BSD license ](http://misfra.me/2016/02/28/go-projects-bsd-license/) 從來沒有仔細思考過Go project 的license,只是簡單的把自己的專案都用MIT.看完才知道其中的關連… One HTTP Request From Stardom: How Alan Shreve Built ngrok Using Go ngrok是一個可以讓你在防火牆內部的Server可以直接被存取的技術,這邊介紹如何透過Go來build ngrok. Python Android/JAVA/NODE.JS Pretty unicode tables for the CLI with Node.JS 可以畫出很漂亮的unicode table在console mode. Docker iOS/Swift 奇点机智,用深度链接让 app 不再孤单 Deep Link 在iOS9獲得了不少的加強功能,而在App的設計上其實Deep Link 已經佔有一定的地位.這邊有談到說一家公司奇点机智如何透過幫忙控制Deep Link來讓App更好而且更多人使用. Swift @ LinkedIn LinkedIn裡面透過Swift開發的經驗,巔峰的時候有50人工程師參與開發.透過Swift開發App最大的瓶頸還是開發機器的能力.灣區日報有很精彩的評論. 網站文章 學術論文解放!將近五萬篇論文可透過Sci-Hub免費下載 當初Aaron Swartz 因從JSTOR 的學術期刊下載約400萬篇文章被停的Sci-Hub復活了.超過五萬篇論文可以下載. Github: January 28th Incident Report 引用: IngramChen from kaif: Github 內部發生了類似 不小心踢掉電源線 這種意外,然後 25% 的 server reboot,reboot 過程中 redis cluster 爛掉,造成 application server 啟動失敗。他們無奈只好先救 redis cluster,直到 redis 救好後,才重啟...
Run Docker Postgres docker run --name some-postgres -p 5432:5432 -v $PWD/psql-data:/var/lib/postgresql/data -e POSTGRES_PASSWORD=mysecretpassword -d postgres Find docker IP docker inspect <CONTAINER_ID> | grep -w "IPAddress" | awk '{ print $2 }' | head -n 1 | cut -d "," -f1 PSQL commands Check here Useful commands here. \q quit psql \d list all instances \dt list all tables \connect Db_NAME \dl list all databases psql connect to DB psql -U postgres -h <IP> Dump MySQL to SQL first mysqldump --compatible=postgresql --default-character-set=utf8 -r DB.mysql -u root -p DB Migragte from sql -> psql by mysql-postgresql-converter git clone https://github.com/lanyrd/mysql-postgresql-converter cd mysql-postgresql-converter python db_converter.py databasename.mysql databasename.psql Create DB in psql first CREATE DATABASE DB; Refine PSQL remove all “COMMENT ‘KB’” in PSQL remove all default timestamp ‘“0000-00-00 00:00:00”’ modify “mediumint” to int4 About phpPgAdmin Check php path on config /etc/apache2/conf-enabled add one here refer phpmyadmin restart apache2 service apache2 restart However it still...