---
title: SITCON 2019 R3 共筆
tags: SITCON 2019 共筆, SITCON 2019, R3, 2019, 共筆
GA: UA-34467841-15
---
# SITCON 2019 R3 共筆
:::info
- SITCON 2019 議程表:https://sitcon.org/2019/agenda
- 其他演講廳共筆:
- R0: https://hackmd.io/FOG2p2x1RIiZTr_Bpb_RYQ
- R1: https://hackmd.io/P-oMfddFSuWbEeFX1WfIVg
- R2: https://hackmd.io/q87nbwSETcO821ql_RivKQ
:::
## Rex 算法初探
[Slide](https://docs.google.com/presentation/d/1_5Ufvi3IPeYBAeDHFDMr2dyqqRsTsTmRaFf2NAMHlAY/edit?usp=sharing)
Outline
- Rex Background
- Self Introduction, really brief
- Algorithm in Blockchain
- Some good stuff about EOS, if you know well about Ethereum
- Those scarce resources in EOS, not only gas
- Resource Exchange before Rex
- Rex algorithm in their source code
- Conclution and fact check about Rex
- Fun part, optional
Algorithm in Blockchain
- Cryotography algo, e.g., sha-256, scrypt, etc.
- Consensus algo, e.g., PoW, PoS, DPos, etc.
- EOS使用DPOS(委託權益制度)
- Liquidity algo, e.g., Bancor, Uniswap, Rex, etc.
- Incentive algo, a.k.a, Mechanism Design
- Auction: Blind Auction
- Game: Hot Potato, POWH, Fomo(ERC 1843), etc.
- Voting && Allocation:
Democracy is expensive.(民主是非常貴的)
EOS相信用戶應該是可以免費使用區塊鏈的
- 在EOS DPOS algo裡面,stake might be the most important contribution for the whole service
Allocation Algo
## 工業物聯網(Industrial IoT)平台的技術、應用,與未來發展
- Iaas
- Infrastructure as a service
- 你不用太擔心硬體放置的位置或資料分割或擴容
- A hypervisor or VM monitor is computer software
- PaaS
- Platform as a service
- O/S Middleware(JAVA virtual machine), and Runtime
- How IoT Work
- Data collection
- connectivity
- data sent to cloud
- 頻寬很重要(data huge)
- Data processing
- checking or computer vision
- Ex. 判斷溫度 or 家裡是否有人入侵
-
- WISE
- Infrastructure
- ML Analytics
- ?
- ?
- interface
- 為了讓人看到資料
- 讓使用者輸入下一個指令//看見資料後做出決定
- 可能是自動的feedback
- **可視化界面**
- WISE PaaS 3.0
- 端點收到資料後要做處理歸類在edge intelligence
- PaaS主體基於AWS 阿里雲
- 開源的雲端平台架的
- cloudbXXge(?)
- 最上層針對domain focus
- What is MQTT
- MQ refers to MQ Series
- MQTT is not a tradition message queuing solution
- MQTT3.1 is open source
- MQ series是IBM的一個產品
- MQTT 不是你查到的涵義message queuing 只是一個名詞 這樣會比較好理解
- 2010釋出3.0版讓大家可以開源使用
- MQTT & Message Broker
- message (payload)
- topic
- QoS
- Message Broker(Centrol Control) have all ClientID, and know Clinet Sub What topic,and trace Client Connection
- 有每個用戶的ID
- 可追蹤狀態(每隔一段時間送KEEPALIVE MESSAGE)
- Topic
- home is the top topic
- separated by "/"
- 訊息種類
- windowStatus/livingroom
- windowStatus/bedroom
- 如果你訂閱windowStatus則可以接收到下層個訊息
- 在一個專案中最好只用一種命名模式
- publish subscribe pattern
- 由一個電腦 一個手機 溫度組成
- MQTT 擔任訊息傳輸的工作
- 有人訂閱了temperature/一有數值變動就會送到用戶手機
- QoS
- 0:Fire and Forget
- 消息丟出去不care用戶是否收到
- 1:At least once
- 至少有一個用戶要收到
- 但可能因為接收端沒收到用戶回傳的資訊所以造成重送
- DEMO
- 先連到MQTT
- 聽一個事件
- ㄜ反正就是在講解接收端&傳送端的code
- 實際的樣子:
- (這個需要連上網路QQ)
- 可是化界面看起來已經優化過很多次了(?
- 所以你可以得到的資訊非常多
- 甚至可以看到3D視圖的角度
- code pipline也接受
- 工商時間
[研華科技](https://wise-paas.advantech.com/zh-tw/)
## 安全.合約.函數式 - 與智慧合約纏鬥的 101 天
- OOP
- object = data+method
- data -> state
- method -> operation
- OOP
- design pattern
- usually not only 1 pattern
- thinking much as you can
- Ex. 兩輪腳踏車公車是否可能變成四輪汽車公司
- spend a lot of time in buliding patterns
- Design pattern brings good stuffs
- Why Function
- no side-effects
- Function is pure Function(Referential transparency)
- Type system
- 強型態
- type inference
- Math
- the way of thinking is closed to human
- DSL in Haskell
- describe the problem domain
- define data structure as syntax
- define function to eval the result
- Correctness
- To write Correctly
- How to be Correct
- unit Test
- Formal method
- Formal program construction
- Reference transparency: F(x) = y
- well-defined
- formal
- Formal verification
- Describe the problem: Using mathematic to proof
-Mindset and Programming Model
- program VM
- more interact with outside
- 只有本地端看得到(OS)
- read various data via OS
- non atomic execution
- rollback stat by yourself
- BlockChain
- 要存在BlockChain上
- 大家都看得到,如有隱私資料,先加密在上鏈
- token and storage
- Ex.tezos : TXZ
- atomic execution
- all or none
#### Contract Correctness
formal method
- Formal verfaction
- check BlockChain,VM,Object
## 空間設計 與 不想停的算計
## 用虛擬化技術來玩遊戲?能動嗎?
### About
* 亂花錢
* 亂玩壞東西
### 虛擬化技術
* 常見種類
* Virtual Machine
* 將底層完整模擬
* Container
* 共用底層,以達到輕量化快速的目標

||VM|Container|
|-:|:-:|:-:|
|資源浪費量|大|小|
|模擬完整性|高|低|
|資源利用率|低|高|
|開機速度|慢(min)|快(ms)|
|安全性 |高| 低|
* 常見商業架構
* VMware vSphere
* 貴
* Proxmox VE
* Open Source
* Support LXC Container
* Windows Hyper-V
* VM
* Windows Container
### 硬體
* HP DL580 Gen7
* Intel Xeon E7-8850 @ 2.4G * 4
* DDR3 ECC 128G
* RAID controller
* 不發光
* 6C 6T @ 2.8G
* DDR4 16G
* No Raid
* Yes RGB
* 40500 TWD
### 玩遊戲
* 全虛擬化專用顯卡
* AMD: MxGPU
* Nvidia: VGPU
* 貴
* 可多 VM 共用
* 資源利用率相對高
* PCI Passthrough
* 直接把顯示卡轉送給 VM 使用
* 成本相對低
* 不可多 VM 共用
* 資源利用率低
### 應用
* Nintendo Switch
* Resident Evil 7
* Parsec
* Game Streaming Service
* Nvidia Geforce Now
* Still in beta
* PlayStation Now
* Play on PC, PS4
* Shadow
* Steam Home Streaming / Steam Link
* Nvidia GameStream
### 私有雲串流服務建制
* Pros
* 效能比家用電腦高一個等級
* 快速部署遊戲
* Cons
* 虛擬化技術需要高速穩定的網路
* 畫質降低且性能變差
* Host OS
* Debian
* Hypervisor
* Proxmox VE
* Networking
* Unifi VPN
* [Proxmox VE](https://www.proxmox.com)
* Technology
* QEMU
* KVM
* LXC
* Linux Container
* PCI Passthrough
* Enable IOMMU (VT-d)
* VFIO
* Framework
* Manage IOMMU, DMA, Interrupt in Userspace
* 假顯示器
* 發揮顯示卡完整效能
* 網路串流
* ZeroTier
* 不夠穩定
* L2TP Tunnel
* Nvidia GameStream
* Enabled from GeForce Experience
* Third-party Client
* Moonlight
* Bottleneck
* 網路延遲
* Solution
* Storage Pool
* Fiber Network
* 網路頻寬
* 虛擬化效能
* PCI 穿透設定麻煩
## Windows Filter Driver開發入門
Slide: [PPT檔案](https://speakerdeck.com/notsurprised/sitcon2019-windows-driver)
- WHY
- 鍵盤側錄
- 及時備分
- 剔除非認證USB
- 自製資料夾保護
- WHO I AM
- NOT SURPRISE
- 你他媽太快了
- Windows Driver
- key logger
- kernel mode 不支援浮點數運算,需要由 user mode
- SSDT HOOK
- win64無法使用
- Assembly
- 先 cli (interrupt)
- 需使用 unicode 長字元進行開發
- develope environment
- vs 2017 不用額外安裝WDK
- 勿用本機測試
- driver signature
- disable
- hold the 'shift' when you are booting
- test mode
- data structure
- IRP(I/O Request package)
- debug
- dump
- WINDBG dump
- memory dump
- copy *.pdb -> WINDBG
- conclusion
:::danger
#共同開發相同專案——>最好用相同版本,而且它不能向下支援——>舊版的必須更新
:::