Hackpads are smart collaborative documents. .

jameslong

306 days ago
Elvis L JCConf 2016 Day2 (R1)
 
 
問題: 動態語言因為彈性的特性,所以單元測試比較麻煩
 
 
吳欣展 Slides Link:
 
Tsai M Joseph S. Kuo a.k.a. CyberJos
 
Agenda
  • Hazelcast
  • Briefing
  • Details
  • Spark
  • Inside: Why faster than MapReduce
  • Why use Spark to MapReduce
  • Hazelcast and Spark
  • Ignite
  • Compare with Hazelcast and Ignite
 
 Hazelcast
商用版
社群版
 
  • In memory data-grid
Among the Nodes 
Memory sharing
CPU Power sharing
Storage space sharing
Failure tolerance
 
  • Distributed Caching
胡菀庭 Distributed Compute:Entry Processor、Executor Service
Tsai M Distributed Query
Memory Sharing 後會轉換成 key-value 的 Database
 
  • Integrated Clustering: Hibernate
Standards;JCache, Apache jClouds
胡菀庭 Cloud and Virtualization Support: Docker、AWS、Azu
Tsai M Client-Server Protocol: Memcache, Open Binary Client Protocol, REST
  • 因為其本身是 Memory cache,可以用以上的服務來連
 
胡菀庭
  • In-Memory NoSQL
Tsai M
  • Scalability
  • 加入其他節點到 Cluster 後,會聚集包含心結結點的所有記憶體 
  • Volatility 
  • 資料會自動存成兩份放在各節點 
  • Rebalancing 
  • 會想辦法消除 Latency 
  • Going Native 
  • The High-Density Memory Store can avoid GC pause.
  • 使用 NIO DirectByteBuffers
  • 自動設一個備援 Memory 並切成多個 Chunk,並將資料分存在 Chunk 內
  • 資料移除時,Chunk 會再次利用
  • 避免掉破碎性問題,就是讓資料變成破碎
  • When Node crashing, no need to move data.
 
  • Messaging
結點可以自由訂閱 Cluster 的訊息頻道,各作「有興趣」的工作
 
  • Application Scaling
Elastic Scalablility: new Servers Join the Cluster
胡菀庭 Super Speeds
High Availablility
 
Tsai M
  • Clustering
在 node 與 load Balancing 可進行 Clustering
Cluster 內 session 共享
 
  • What is new in 3.4?
  • High-Density Memory Store ($$$)
  • Hazelcast Configuration Import
  • 分拆匯入
胡菀庭
  • Back Pressure
 
Tsai M
  • What is new in 3.5?
Async Back Pressure
Client Configuration Import
Cluster Quorum
胡菀庭 Hazelcast Client Protocol
Tsai M
  • 最小 Node 數需求:不夠不給用
胡菀庭 Listener for Lost Partitions
Tsai M
  • 判斷是否要寫入硬碟
胡菀庭 Increased Visibility of slow Operations
Sub-Listener Interfaces for Map Listener
 
Tsai M
  • What is new in 3.6?
High-Density Memory Store for Map ($$$)
胡菀庭 Discovery SPI
Tsai M Client Protocol & Version Compatiility
Hot Restart Persistance ($$$)
  • 重新 Restart Cluster,快速將 Disk 內的資料寫入 Memory
Lite Members
  • 不分享記憶體的 Node (觀察員),例如 Monitor 與任務指派,不影響主力記憶體
胡菀庭 Lots of Features for Hazelcast JCache
Hazelcast Docker image
...
307 days ago
 
 
 
IThrowableProxy
ILoggingEvent, 可獲取以下等資訊:
  • message
  • loggerName
  • level
  • threadName
  • timeStamp
ILoggingEvent, 
  • timeStamp
  • threadName
  • time
  • level
  •  
  • message
  • loggerName
  • message
ILoggingEvent
  • append() => 實作寫log
 
ILogging
Zen
  • append()
jameslong
  • only tag,no attribute
  • Joran
 
Zen 繼承AppenderBase 進行實作
  • start() => initialization 
Jian-De L
  • camelCase
  • follow the setter/getter JavaBeans conventions
  • only tag,no attribute
only tag,no attribute
follow the setter/getter JavaBeans conventions
only
follow
camelCase
Elvis L JCConf 2016 Day1 (R0)
  • Day1 R0
共筆位置:JCconf 2016 Day1 R0
  • Day1 R1
共筆位置:JCConf 2016 Day1 R1
  • Day1 R2
共筆位置:JCConf 2016 Day1 R2
  • Day2 R0
共筆位置:JCConf 2016 Day2 R0
  • Day2 R1
共筆位置:JCConf 2016 Day2 R1
 
 
Tsai M Alibaba -> MonkeyKing
UUber 
Tsai M
  • 先構建產品再快速迭代來維護
  • 去中心化(Decentralization) 分佈式環境下 由服務組件組成
jameslong
  • Infrasctructure automation 基礎設施維運自動化
  • Design for failure
  • Organized around biz capabilities
  • Products not projects
  • Evaluationary design
 
jameslong Design for failure
O
Infrastructure automation基礎設施
 
Design
Tsai M 基礎設施
 
jameslong ETTO: 資源有限,須放棄部分功能
Tsai M Hack Dictionary
 
jameslong 微服務架構特質
Tsai M 去中心化(Decentralization) 分佈式環境下 由服務組件組成
jameslong Infrastructure automation
Ian.wu
  • (设计系统的组织,其产生的设计和架构等价于组织间的沟通结构。 )
  • 組織結構決定資訊結構
Ching C JCConf 2016 Day1 10/14
 
Tsai M
  • 0950 東森開場議程
Data Management Platform(數據管理平台), 電商  in 2016
 
Ching C
  • Keynote 1: Java 在現今軟體開發的角色及競爭力
Tsai M 王建興(聖藍科技)
Java 已有 20 年歷史,面對新語言的挑戰要怎麼應對?
 
概要
  • 程式語言 20 年興衰起落
jameslong
  • Java 語言及發展
  • 各應用領域的語言生態
Tsai M
  • Java 語言改進的影響
  • Java 語言的角色與定位
 
jameslong 2016十大熱門語言(TIOBE)l
...
306 days ago
Elvis L JCConf 2016 Day2 (R0)
Hudson W
  • sulong: Sulong, a dynamic runtime for LLVM-based languages
Ian.wu (like 背)
(like 背)
Jim H
  • Deoptimization
Ian.wu (like 背下來)
Jim H
  • On-stack replacement (OSR)
Ian.wu (like 用梯形公式)
Elvis L JCConf 2016 Day2 (R0)
Ian.wu (like 用梯形公式)
Elvis L JCConf 2016 Day2 (R0)
共筆位置:JCConf 2016 Day2 R0
共筆位置:JCConf 2016 Day1 R2
共筆位置:JCConf 2016 Day2 R0
 
  • Renaissance of JUnit - Introduction to JUnit 5 
jameslong Jimmy Lu
 
 
Agenda
 
 
Why Rewrite JUnit
  • JUnit 4.0 was release a decade ago
  • at the time of Java 5 and now java 9 is almost out
  • Modularity-big ball of mud
  • Test discovery and execution-tightly coupled
  • Extensibility
  • Runner API
  • Entire testing lifecycle-haveyweight
  • Only one runner allowed
  • Rule API
  • limited to executing some code before, during, and after a test was run
JUnit 4 modularity
  • Single junit.jar rules them all
 
 
jameslong JUnit Lambda
  • Crowdfunding campaign
  • The code name of JUnit 5
  • milestone 2stone 2
  • Main contributor
JUnit5 Overview
Jian-De L
  • JUnit Platform + JUnit Jupiter + JUnit Vintage
  • JUnit Platform 
  • JUnit Jupiter:JUnit 5 Test Engine
  • JUnit Vintage:JUnit 3 and JUnite4 Test Engine
jameslong
  • Extensible
  • Modern
  • Backward compatible
Architecture
  • JUnit the tool 
  • APIs for writing test
  • JUnit Platform
 
 
jameslong Annotations
  • @Nested 
Meat-Annotations
@Tag("fast")
 
Assertions
  • assertEquals(),assertNotNull(),etc.
  • assertThrows() and expectThrows
  • assertAll()
  • Message is now the last parameter
張協和
  • Lambda syntax
jameslong Assumptions
  • Abort test if assumptions fail
Tagging and Filtering
  • Be used to filter test discovery and exection
Nested Tests
張協和
  • Express logical group
  • No @BeforeAll and @AfterAll in nested tests
jameslong
  • @Nested  
  •   class InnerTest{
  •     @BeforeEach
  •     void pushAnElement(){
  •     }
  •   }
Dependency Injection
  • No arguments are allowed in previous version of JUnit in test methods
  • ParameterResolver
朱宏文
  •  TestInfoParameterResolver
  •  TestReporterParameterResolver
jameslong
  • Applied to test constructor, @Test, @TestFacotry, @BeforeEach, @AfterEach, @BeforeAll,@TesetReporterParameterReSolver, @ExtendWith
Interface Default Methods
  • Enables multiple inheritance in tests
  • @Test, @TestFacotry,@BeforeEach,@FaterEach
Dynamic Tests
  • Test cases are generated at runtime
  • Via method annotated with @TestFactory
...
307 days ago
Unfiled. Edited by Elvis Lin , jameslong , Terence Liu 307 days ago
Elvis L JCConf 2016 Day1 (R1)
  • Day1 R0
共筆位置:JCconf 2016 Day1 R0
  • Day1 R1
共筆位置:JCConf 2016 Day1 R1
  • Day1 R2
共筆位置:JCConf 2016 Day1 R2
  • Day2 R0
共筆位置:JCConf 2016 Day2 R0
  • Day2 R1
共筆位置:JCConf 2016 Day2 R1
 
 
jameslong
  • [快講]Script your Java applications with Groovy
郝瑞尼 (Reinhard Pointner)
 
JAVA vs Groovy
github : 
how to define the groovy table like 
ExtensionModule
  • java api: groovy.toUpperCase
  • groovy api 
  • my Default Methods: 
Add Properties and Methods
  • -CustomExtensionMethods-可自行定義自己需要的方式進行
Variables and default values
-CustomScriptBaseClass
-Undefined variables now default to null
  • println asdf //null
Adding default imports
  • 1.GroovyScriptEngine<< GroovyClassLoader<< CompilerConfiguration
  • 2.Use imported classes and static methods
Dynamic Properties and Methods
  • 1.Overrid invokeMethod and getProperty
  • 2.Groovy
  •  x.y.z() //undefined: 
Getting to the Groovy Truth
  • 1.Groovy Truth
  • 2.Groovy Truth from Java
  • also useful for casting Groovy closures as Java
Using the groovy methods from Java
  • 1.groovy
  • 2.Java
Closure.rehydrate();
  • Invoking the Groovy Builder Pattern
  • marker builder in groovy then html will know them
 
 
Elvis L
  • 用 ZK shadow component 實現更彈性的頁面控制 
 
 
 
  • Microservice & Cloud Native
 
 
  • 利用 ZooKeeper 改造舊系統上分散式環境 
 
 
  • Redux for Android - using Kotlin 
 
 

Contact Support



Please check out our How-to Guide and FAQ first to see if your question is already answered! :)

If you have a feature request, please add it to this pad. Thanks!


Log in