Shift
was used to shift the key to type uppercase or lowercase.Esc
was escape char- Crockford Keyboard
- Programma font
- Monolithic Apps
- Microservices
- Shared Machines
- Virtual Machines
- Why we use container?
- Fast, Portable, Efficiency
- Large-scale cluster management at Google with Borg
- Kurbernetes
- Container orchestractor
- Runs containers
- Support multiple cloud and bare-metal environments
- k8s services define access policy - load balance or headless
- k8s services gets a stable virtual IP and port
- virtual IP is managed by kube-proxy
- k8s schedules workloads to resources and helps manage them
- react-native-web
- generator-react-native-web
React Native for Web
is not officially in FB now- react-web, another react native for web
- Compare to
weex
weex
is more light-way- gc of
react native
might be better thantweex
- 系統設計目標
- 低消耗 - 可控性、服務性能
- 低侵入性 - 對開發人員透明、減少開發人員負擔以及進入門檻
- 時效性 - 數據的收集、計算及處理
- 海量數據 - 海量數據存取速度
- 設計理念
- 調用鍊 - Trace tree、multi span
- 埋點時間 - Client Send/Receive、Server Send/Receive
- 埋點類型 - 單向、雙向
- 數據存取
- 數據存取特點
- 寫多讀少
- 低延遲查詢
- 複雜條件查詢
- HBase
- rowkey 設計,無熱點存儲
- rowkey 由 trace id + span id 拼接而成
- Phoenix
- 增加索引
- 每個 span 一個紀錄
- 馭風系統價值
- 可視性
- 快速故障定位
- 服務關鍵路徑
- 調用鍊路拓墣系統
- 趨勢預測與擴容
- 未來展望: 智能化、提高資源利用率
-
servo, written in Rust
-
Why a new browser engine?
- Performance
- Parallelism
- GPU (WebRender)
- Memory safety
- Embedding
- Modularity
- Performance
-
Performance: Parallelism
- (CSS) Style calculation in parallel
-
Performance: GPU
- 60 fps full screen animation
- No WebGL, Canvas etc.
- How does
WebRender
work?- On GPU instead of CPU
- immediate mode vs retianed mode
- servo demo
-
Security
- Rust's Lifetime Check
-
What Rust can offer?
- Ownership & move
- Guaranteed memory safety
- Threads without data races
- Pattern matching
- Type inference
- C/C++ bindings
- and more!
- : Micro-Services glued with managed services
- Serverless Architectures
- AWS Lambda
- Managed Function as a Service
- Pull and push model
- Concurrency cap
- No shared memory
- Potentially shared /tmp
- Burstable / Throttled CPU
- 每個帳號每次只能跑100個process (在panel看不到)
- Lambda Frameworks
- Apex, created by TJ and written in Go
- 講者認為較偏 CD tool
- Claudia, written in Node.js
- 相較 Apex 較完整
- Serverless Framework (formerly JAWS), written in Node.js
- Manual 不友善
- Apex, created by TJ and written in Go
- 淺析 serverless 架構與實作 (in serverless v0.5)
- Serverless Framework: Migrating to @1.0.0-beta
- Manage IAM Role, API Gateway, Lambda with CFN
- Abstract away API Gateway templates
- Move metadata to S3
- Functions can share the same folder
- Plugin API changed..
- Guanyu
- 掃描信件等是否有毒再傳送給客戶
- AWS Elastic Container Service
- Support Application Load Balancing
- GA August '16, extends ELB
- Content-based routing
- HTTP/2 and WebSocket support
- Dynamic port
- Prepare EC2 for ECS
- Lacks transparent inter-container traffic
- AWS is hard to communicate between containers
- Support Application Load Balancing
- Guanyu in AWS
- ECS on top of AutoScaling Group
- Supports external cache w/ Redis & DynamoDB
- Dynamic port behind ALB
- Track logs in CloudWatch Logs
- Periodic health check with ALB
- Demo project in modern web 2016
-
Event-based system
-
Architecture approach
- Design for scaling
- Segment microservices out
- Monolithic application
- Separate from main application
- Use caching and microcaching
- memcache
-
Inside NGINX
-
OS Tuning
-
Overcoming ephemeral port exhaustion
- Increase local port range
- Split traffic across multiple IPs - split server traffic through separate those IPs
- NGINX since 1.11.2 uses
IP_BIND_ADDRESS_NO_PORT
socket option when available - If use this option, server will not reuse the same resource - Overcoming Ephemeral Port Exhaustion in NGINX and NGINX Plus
-
Minimal NGINX configuration
events {} http { server { listen 80; location / { proxy_pass http://backend; } } upstream backend { server backend1.example.com:8080; server backend2.example.com:8080; } }
-
NGINX core features
- Use correct number of worker_processes
- auto
- Increase worker_connections - Setup different connectivity for corresponding usage, e.g. proxy, mobile device
- Increase worker_rlimit_nofile
- Turn off accept_mutex: accept_mutex off;
- Turn on Sendfile: sendfile on;
- Use thread pools if I/O needs offloading: aio threads;
- Use correct number of worker_processes
-
HTTP Keep alive benchmark
- HTTPS with NO keepalive (worst setup)
- Plain HTTP
- HTTP/2 with SSL
-
HTTP Keep alive
- Keepalive on the Frontend
- keepalive_requests 100;
- keepalive_timeout 75s;
-
server { location / { proxy_pass http://backend; proxy_http_version 1.1; proxy_set_header Connection ""; } upstream backend { server backend1.example.com:8080; server backend2.example.com:8080; keepalive 32; } }
- Keepalive on the Frontend
-
HTTP Caching
- Microcaching with NGINX
- Cache placement strategies
-
HTTP/2
- Major changes compared to HTTP/1
- Binary headers with HPACK
- Multiple streams
- Prioritization
- Server Push
- Major changes compared to HTTP/1
-
Measure your results
-
extensive logs with custom variables
-
Configure log_format with:
$upstream_response_time $request_time $upstream_ # <- 沒記完
-
-
simple set of metrics with stub_status module
-
- 技術leader職責 = 工程體系建構 + 團隊成長 + 業務支撐
- 舊的library
- 沒人敢改
- 難 debug
- 太雜
- Library 原則
- 必要性
- Reusability
- Atomic
- 工具演進 (狹義:命令行、廣義:流程)
- 創建 - 開發 - 調試 - 測試 - 發布
- 工具 => 工具鍊
- 為什麼要建設基礎架構
- 夯實基礎,事半功倍
- 隔離業務代碼與框架、平台
- 提高系統可控性
- 降低技術債,提高管理效率
- 緩存集群管理
- 系統監控: Nagios vs ZABBIX
- 自動化 deploy 平台 - 批輛發佈、自動、備份
- 應用監控
- 服務監控 - SLA
- 組件 => 框架 => 平台
- DubboX
- elastic-job
- Sharding-JDBC
- Conclusion
- 自動替代人工 (規範化、標準化後再自動化)
- 小系統驅動大團隊 (ex. 各種監控系統)
- 基礎平台支撐上層應用
-
使用 React Native 的效果
- 節約成本
- 平台復用
- 性能體驗
- 快速迭代
-
JavaScript 與 Native 通信機制, ex. 華盛頓與乾隆
-
組件化思路
- 基礎組件 (ex. UIExplorer)
- 工具組件封裝
- 業務組件封裝
- 原生組建封裝
- 開源社區 (JSCoach)
-
RN 不追求完全抹平差異
-
Profile issue
Q: Network 無法查看 Fetch 請求,其實 Fetch 是 polyfill 實現
A:
- 恢復瀏覽器實現,關閉Chrome安全設置
- 使用Fiddler做代理
Q: 調適深層次頁面,總是從啟動更新
A:
- Reload
- Hot Reload
- Live Reload
Q: 真機調試時頻繁修改Host
A:
- Android Dev Setting
- iOS: react-native-debug-server-host
Q: 第三方庫,Debug OK, real device crash, due to window.atob
A:
- JS lib 無環境依賴
- 封裝Native lib
Q: 前後單分離,開發 mock server
A:
- http-server
- mockjs
-
移動項目技術選型
- Native 遊戲,炫酷交互
- Hybrid 複雜業務應用
- HTML5 展示型、分享型
- React Native 體驗和效率平衡、創新型產品
-
Tools
- Go Vet
- Go Lint
-
GoRoutine and Channel: Multiple Thread in C
-
Golang has built-in
- Test with
Test
prefix - Benchmark with
Benchmark
prefix
- Test with
-
JSON with
json tag
in structtype Response1 struct { Page int Fruits []string } type Response2 struct { Page int json:page Fruits []string json:fruits }
-
LineBot Example: PetNeedMe
-
Use LUIS to build smart Bot
- Just Say No to More End-to-End Tests
- webdriver.io created by SauceLabs != WebdriverJS
- Nightwatch.js
- Chimp, support
hot-reload
- Page Object Pattern
- testingbot
- PGC 轉向 UGC
- 深入理解極限優化
- 明確方案適用場景
- 對優化方案深入論證
- 避免過度優化 (找到需優化的地方)
- 加載監控體系 - 快速高效的 發現、定位、解決 問題
- 速度監測
- 版本覆蓋
- 成功率
- 性能監測
- 錯誤日誌
- 視頻流監控系統
- 視訊加載過程監控
- 視頻卡頓監控
- 視頻播放異常監控
- 單位播放異常監控
- 機器性能指標監控體系
- 低端機對性能的要求更高
- 計算local FPS給機器評分
- 不同動畫需要的 FPS 進行歸類
- 低端機對性能的要求更高
- 基於監控體系的自動化平台
- 測速自動
- 實時告警
- 前端染色
- 移動端優化 - 網絡優化、文件優化、渲染優化
- 優化HTML5互動延時
- 3個HLS分片才能支持播放
- 優化關鍵幀GOP間隔減少互動延時
- 支持動態配置上行流關鍵幀間格
- 圖片資源優化 - 減少請求、壓縮大小
- 支持與Native結合體驗,採取RTMP播放
- 3個HLS分片才能支持播放
- 減少直播加載時間延遲
- 遵循15秒原則
- 主動推HLS流到CDN並緩存3個分片
- 預加載HLS視頻資源