SlideShare une entreprise Scribd logo
1  sur  52
Serialization and
performance
Сергей Моренец
23 мая 2014 г.
About author
Works in IT since 2000
10 year of Java SE/EE experience
Occupied senior Java developer/Team
Lead positions
Winner of 2013 JBoss Community
Recognition Award.
https://www.jboss.org/jbcra
Agenda
• Purpose of serialization
• Frameworks overview
• Performance testing
• Q & A
Serialization
File storages
Database
Network communication
Web usage
Serialization
Simple
Flexible
Compact
Versioning
Fast Scalable
Data formats
Binary
XML
JSON
YAML
Performance
• Native memory copying using C operations
• “Unsafe” operations
• Ignore object introspection
• Direct object-object copying
Java serialization
• The easiest programming effort
• Out-of-the-box functionality
Java serialization
• Serializable interface
• Decreases the flexibility to change a class’s
implementation once it has been released
• Doesn’t allow to exchange data with
C++/Python applications
• Due to default constructors hole for invariant
corruption and illegal access
• No customization
• You should have access to the source code
No customization
You should have access to the source code
Java externalization
• Serialization but by implementing
Externalizable interface to persist and
restore the object
• Responsibility of the class to save and
restore the contents of its instances
• Requires modifications in
marshalling/unmarshalling code if the class
contents changed
No customization
You should have access to the source code
Java externalization
Avro
• Schema evolution
• Binary and JSON encoding
• Dynamic typing
• Support of Java, C, C++, C# and Python
• Apache Hadoop integration
Avro
Avro
XML
• Interchangeable format
• Supported schemas
• Space intensive and huge performance loss
• Complex navigating
Simple
• High performance XML serialization and
configuration framework for Java.
• Requires absolutely no configuration
• Can handle cycles in the object graph
Simple
Javolution
• Fast real-time library for safety-critical
applications
• Based on OSGi context
• Parallel computing support
Javolution
Json-io
• Doesn’t require custom interfaces/attributes
usage/source code
• Handles cyclic references
• Reader/writer customization
• Does not depend on any native or 3rd party
libraries.
Google gson
• Java library to convert JSON to Java objects and
vice-versa
• Doesn’t require source code of serialized objects
• Allow custom representatives
Google gson
Jackson
• High-performance, ergonomic JSON processor
Java library
• Extensive customization tools
• Mix-in annotations
• Materialized interfaces
• Multiple data formats
Jackson
• JSON
• CSV
• Smile(binary JSON)
• XML
• YAML(similar to JSON)
BSON for Jackson
• Binary encoded JSON
• Main data exchange format for MongoDB
• Allows writing custom extensions
Protocol buffers
• Way of encoding structured data in an efficient
yet extensible format.
• Google uses Protocol Buffers for almost all of
its internal RPC protocols and file formats.
• Supported in Java, C++, Python
Protocol buffers
message User {
required string login = 1;
repeated Order orders = 2;
}
message Order {
required int32 id = 1;
optional string date = 2;
}
Protocol buffers
FST
• Java-to-java library
• No support for versioning
• Use case is high performance message oriented
software
• Drop-in replacement
• Custom optimization using annotations, custom
serializers
FST
GridGain
• Part of distributed computing system
• Don’t require any custom interfaces or API
• Direct memory copying by invoking native
"unsafe" operations
• Predefined fields introspection
GridGain
Kryo
• Fast and efficient object graph serialization
framework for Java
• Open source project on Google code
• Automatic deep and shallow copying/cloning
• Doesn’t put requirements on the source classes
(in most cases)
Kryo
• Twitter
• Apache Hive
• Akka
• Storm
• S4
Kryo
Kryo
Benchmark
• JDK 1.8.0.5
• Apache Avro 1.7.6
• Simple 2.7.1
• Json-io 2.5.2
• Google GSON 2.2.4
• Jackson 2.3.2
• BSON for Jackson 2.3.1
• Protocol buffers 2.5
• Kryo 2.23
• FST 1.54
• GridGain 6.0.2
Benchmark
• Speed(serialization and deserialization)
• Size(complex and ordinary objects)
• Flexibility
Benchmark
Benchmark
Issues
Library Description
Gson, Jackson Crashed when serializing cyclic
dependency
Simple Crashed for very big XML file
Avro Bug during deserialization
Serialization (complex)
# Library Time(ms)
1 Kryo(optimized) 134
2 Protocol buffers 165
3 GridGain 196
4 FST 207
5 Kryo 209
6 Jackson(smile) 275
7 Kryo(unsafe) 306
8 Jackson 491
9 Java serialization 605
10 Javolution 1043
Serialization (simple)
# Library Time(ms)
1 Protocol buffers <1
2 Google GSON 5
3 Java serialization 10
4 BSON for Jackson 10
5 Jackson(smile) 11
6 Kryo(optimized) 17
7 Kryo 18
8 Jackson 18
9 Kryo(unsafe) 20
10 Javolution 21
Deserialization (complex)
# Library Time(ms)
1 Kryo(optimized) 113
2 Protocol buffers 165
3 GridGain 196
4 FST 207
5 Kryo 209
6 Jackson(smile) 275
7 Kryo(unsafe) 306
8 Jackson 491
9 Java serialization 605
10 BSON for Jackson 930
Deserialization (simple)
# Library Time(ms)
1 Protocol buffers 1
2 GridGain 3
3 Google GSON 6
4 Jackson(smile) 9
5 BSON for Jackson 9
6 Kryo(optimized) 18
7 Kryo 18
8 Jackson 18
9 Kryo(unsafe) 20
10 FST 42
Size (complex)
# Library Size(bytes)
1 Kryo(optimized) 33904
2 FST 34069
3 Kryo 35674
4 Protocol buffers 39517
5 Kryo(unsafe) 40554
6 Jackson(smile) 44840
7 Java serialization 49757
8 GridGain 58288
9 Jackson 67858
10 Google GSON 68338
Size (simple)
# Library Size(bytes)
1 Kryo(optimized) 18
2 Kryo 18
3 Protocol buffers 20
4 Kryo(unsafe) 21
5 GridGain 33
6 Jackson(smile) 40
7 Jackson 41
8 Google GSON 41
9 Jackson(YAML) 41
10 BSON for Jackson 46
Usability
# Library
1 Google GSON
2 Kryo
2 Kryo(unsafe)
3 Jackson
3 Jackson(XML, Smile, YAML)
3 BSON for Jackson
4 Json-io
5 FST
6 Java serialization
7 Kryo(optimized)
Overall rating (2014)
# Library Rating
1 Kryo(optimized) 67
2 Protocol buffers 65
3 Kryo 58
4 Jackson(smile) 55
5 Kryo(unsafe) 46
6 GridGain 44
7 Google GSON 43
8 FST 43
9 Jackson 40
10 BSON for Jackson 33
11 Java serialization 32
Overall rating (2013)
# Library Rating
1 Kryo(optimized) 67
2 Kryo(unsafe) 65
3 Protocol buffers 63
4 Kryo 59
5 Jackson(smile) 51
6 Google GSON 45
7 FST 42
8 GridGain 34
9 Jackson 32
10 Java serialization 30
11 BSON for Jackson 24
Advices
Library Usage
Kryo Fast and compact serializer for complex
objects over network
Protocol buffers Fast serializer for simple objects
Jackson(smile) Jackson-based serializer for Web usage
Google JSON Dirty solution to quickly serialize/deserialize
objects
Apache Avro Serialize objects into files with possible
schema changes
Java Out-of-the-box trusted solution without
additional libraries
Сергей Моренец
morenets@mail.ru
Q&A

Contenu connexe

Tendances

スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)NTT DATA Technology & Innovation
 
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]オラクルエンジニア通信
 
StackStormを活用した運用自動化の実践
StackStormを活用した運用自動化の実践StackStormを活用した運用自動化の実践
StackStormを活用した運用自動化の実践Shu Sugimoto
 
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2AbemaTV, Inc.
 
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~infinite_loop
 
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsiderMoq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider貴志 上坂
 
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)Yoshiro Tokumasu
 
Javaのログ出力: 道具と考え方
Javaのログ出力: 道具と考え方Javaのログ出力: 道具と考え方
Javaのログ出力: 道具と考え方Taku Miyakawa
 
クラウドでも非機能要求グレードは必要だよね
クラウドでも非機能要求グレードは必要だよねクラウドでも非機能要求グレードは必要だよね
クラウドでも非機能要求グレードは必要だよねYoshioSawada
 
シンプルに考えよう Zero Trust Network
シンプルに考えよう Zero Trust Networkシンプルに考えよう Zero Trust Network
シンプルに考えよう Zero Trust NetworkRyuki Yoshimatsu
 
テスト分析についての説明資料公開用
テスト分析についての説明資料公開用テスト分析についての説明資料公開用
テスト分析についての説明資料公開用Tsuyoshi Yumoto
 
ドメイン駆動設計 ( DDD ) をやってみよう
ドメイン駆動設計 ( DDD ) をやってみようドメイン駆動設計 ( DDD ) をやってみよう
ドメイン駆動設計 ( DDD ) をやってみよう増田 亨
 
ミクシィ 21卒向け Android研修
ミクシィ 21卒向け Android研修ミクシィ 21卒向け Android研修
ミクシィ 21卒向け Android研修akkuma
 
テストマネジメントツールSquash TMを利用した継続的テスト改善
テストマネジメントツールSquash TMを利用した継続的テスト改善テストマネジメントツールSquash TMを利用した継続的テスト改善
テストマネジメントツールSquash TMを利用した継続的テスト改善Mizuho Wakai
 
MySQLとPostgreSQLの基本的なバックアップ比較
MySQLとPostgreSQLの基本的なバックアップ比較MySQLとPostgreSQLの基本的なバックアップ比較
MySQLとPostgreSQLの基本的なバックアップ比較Shinya Sugiyama
 
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)NTT DATA Technology & Innovation
 
Agileツール適合化分科会(テスト自動化ツール)
Agileツール適合化分科会(テスト自動化ツール)Agileツール適合化分科会(テスト自動化ツール)
Agileツール適合化分科会(テスト自動化ツール)masanori kataoka
 
そんなトランザクションマネージャで大丈夫か?
そんなトランザクションマネージャで大丈夫か?そんなトランザクションマネージャで大丈夫か?
そんなトランザクションマネージャで大丈夫か?takezoe
 
Fitnesse を用いたテストの効率化について
Fitnesse を用いたテストの効率化についてFitnesse を用いたテストの効率化について
Fitnesse を用いたテストの効率化についてtecopark
 
いまさら聞けないselectあれこれ
いまさら聞けないselectあれこれいまさら聞けないselectあれこれ
いまさら聞けないselectあれこれlestrrat
 

Tendances (20)

スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
スケールアウトするPostgreSQLを目指して!その第一歩!(NTTデータ テクノロジーカンファレンス 2020 発表資料)
 
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]
【旧版】Oracle Exadata Cloud Service:サービス概要のご紹介 [2021年7月版]
 
StackStormを活用した運用自動化の実践
StackStormを活用した運用自動化の実践StackStormを活用した運用自動化の実践
StackStormを活用した運用自動化の実践
 
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2
AbemaTVのアーキテクチャの変遷 / AbemaTV DevCon 2018 TrackA Session A2
 
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
大規模ソーシャルゲームを支える技術~PHP+MySQLを使った高負荷対策~
 
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsiderMoq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
Moq & Fakes Framework を使った実践的ユニットテスト - BuildInsider
 
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)
JDK 16 で導入された JEP 396 にご注意!! (JJUG CCC 2021 Spring)
 
Javaのログ出力: 道具と考え方
Javaのログ出力: 道具と考え方Javaのログ出力: 道具と考え方
Javaのログ出力: 道具と考え方
 
クラウドでも非機能要求グレードは必要だよね
クラウドでも非機能要求グレードは必要だよねクラウドでも非機能要求グレードは必要だよね
クラウドでも非機能要求グレードは必要だよね
 
シンプルに考えよう Zero Trust Network
シンプルに考えよう Zero Trust Networkシンプルに考えよう Zero Trust Network
シンプルに考えよう Zero Trust Network
 
テスト分析についての説明資料公開用
テスト分析についての説明資料公開用テスト分析についての説明資料公開用
テスト分析についての説明資料公開用
 
ドメイン駆動設計 ( DDD ) をやってみよう
ドメイン駆動設計 ( DDD ) をやってみようドメイン駆動設計 ( DDD ) をやってみよう
ドメイン駆動設計 ( DDD ) をやってみよう
 
ミクシィ 21卒向け Android研修
ミクシィ 21卒向け Android研修ミクシィ 21卒向け Android研修
ミクシィ 21卒向け Android研修
 
テストマネジメントツールSquash TMを利用した継続的テスト改善
テストマネジメントツールSquash TMを利用した継続的テスト改善テストマネジメントツールSquash TMを利用した継続的テスト改善
テストマネジメントツールSquash TMを利用した継続的テスト改善
 
MySQLとPostgreSQLの基本的なバックアップ比較
MySQLとPostgreSQLの基本的なバックアップ比較MySQLとPostgreSQLの基本的なバックアップ比較
MySQLとPostgreSQLの基本的なバックアップ比較
 
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
より速く より運用しやすく 進化し続けるJVM(Java Developers Summit Online 2023 発表資料)
 
Agileツール適合化分科会(テスト自動化ツール)
Agileツール適合化分科会(テスト自動化ツール)Agileツール適合化分科会(テスト自動化ツール)
Agileツール適合化分科会(テスト自動化ツール)
 
そんなトランザクションマネージャで大丈夫か?
そんなトランザクションマネージャで大丈夫か?そんなトランザクションマネージャで大丈夫か?
そんなトランザクションマネージャで大丈夫か?
 
Fitnesse を用いたテストの効率化について
Fitnesse を用いたテストの効率化についてFitnesse を用いたテストの効率化について
Fitnesse を用いたテストの効率化について
 
いまさら聞けないselectあれこれ
いまさら聞けないselectあれこれいまさら聞けないselectあれこれ
いまさら聞けないselectあれこれ
 

En vedette

Practical Machine Learning
Practical Machine LearningPractical Machine Learning
Practical Machine LearningDavid Jones
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견NAVER D2
 
20150526 오픈업 mcn의 미래_명승은
20150526 오픈업 mcn의 미래_명승은20150526 오픈업 mcn의 미래_명승은
20150526 오픈업 mcn의 미래_명승은VentureSquare
 
Advanced nGrinder 2nd Edition
Advanced nGrinder 2nd EditionAdvanced nGrinder 2nd Edition
Advanced nGrinder 2nd EditionJunHo Yoon
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance TuningJi-Woong Choi
 
Micro Service Architecture 탐방기
Micro Service Architecture 탐방기Micro Service Architecture 탐방기
Micro Service Architecture 탐방기jbugkorea
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Giorgio Cefaro
 
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)Sangkyu Rho
 
왜 레진코믹스는 구글앱엔진을 선택했나
왜 레진코믹스는 구글앱엔진을 선택했나왜 레진코믹스는 구글앱엔진을 선택했나
왜 레진코믹스는 구글앱엔진을 선택했나소리 강
 
Programming skills 1부
Programming skills 1부Programming skills 1부
Programming skills 1부JiHyung Lee
 
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영XpressEngine
 
Front end 웹사이트 성능 측정 및 개선
Front end 웹사이트 성능 측정 및 개선Front end 웹사이트 성능 측정 및 개선
Front end 웹사이트 성능 측정 및 개선기동 이
 
객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)Seung-June Lee
 
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA)
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA) 오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA)
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA) Yongho Ha
 

En vedette (14)

Practical Machine Learning
Practical Machine LearningPractical Machine Learning
Practical Machine Learning
 
[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견[D2]java 성능에 대한 오해와 편견
[D2]java 성능에 대한 오해와 편견
 
20150526 오픈업 mcn의 미래_명승은
20150526 오픈업 mcn의 미래_명승은20150526 오픈업 mcn의 미래_명승은
20150526 오픈업 mcn의 미래_명승은
 
Advanced nGrinder 2nd Edition
Advanced nGrinder 2nd EditionAdvanced nGrinder 2nd Edition
Advanced nGrinder 2nd Edition
 
[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning[오픈소스컨설팅]Java Performance Tuning
[오픈소스컨설팅]Java Performance Tuning
 
Micro Service Architecture 탐방기
Micro Service Architecture 탐방기Micro Service Architecture 탐방기
Micro Service Architecture 탐방기
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)
공짜 경제에서 어떻게 돈을 버는가?(How to Make Money in Free Economy)
 
왜 레진코믹스는 구글앱엔진을 선택했나
왜 레진코믹스는 구글앱엔진을 선택했나왜 레진코믹스는 구글앱엔진을 선택했나
왜 레진코믹스는 구글앱엔진을 선택했나
 
Programming skills 1부
Programming skills 1부Programming skills 1부
Programming skills 1부
 
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영
XECon+PHPFest2014 발표자료 - 효율적인 css 개발방법 - 최대영
 
Front end 웹사이트 성능 측정 및 개선
Front end 웹사이트 성능 측정 및 개선Front end 웹사이트 성능 측정 및 개선
Front end 웹사이트 성능 측정 및 개선
 
객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)객체지향 개념 (쫌 아는체 하기)
객체지향 개념 (쫌 아는체 하기)
 
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA)
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA) 오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA)
오늘 밤부터 쓰는 google analytics (구글 애널리틱스, GA)
 

Similaire à Serialization and performance in Java

Сергей Моренец. Serialization and performance in Java
Сергей Моренец. Serialization and performance in JavaСергей Моренец. Serialization and performance in Java
Сергей Моренец. Serialization and performance in JavaVolha Banadyseva
 
Serialization and performance by Sergey Morenets
Serialization and performance by Sergey MorenetsSerialization and performance by Sergey Morenets
Serialization and performance by Sergey MorenetsAlex Tumanoff
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiSoftware Guru
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6glassfish
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersMarkus Eisele
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang YoonJesang Yoon
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Arun Gupta
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Previewgraemerocher
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Fwdays
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road mapESUG
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMorgan Tocker
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at TwitterAlex Payne
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesMarco Gralike
 
Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Rory Preddy
 
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChangerZero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChangerMongoDB
 

Similaire à Serialization and performance in Java (20)

Сергей Моренец. Serialization and performance in Java
Сергей Моренец. Serialization and performance in JavaСергей Моренец. Serialization and performance in Java
Сергей Моренец. Serialization and performance in Java
 
Serialization and performance by Sergey Morenets
Serialization and performance by Sergey MorenetsSerialization and performance by Sergey Morenets
Serialization and performance by Sergey Morenets
 
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para TiGustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
Gustavo Garnica: Evolución de la Plataforma Java y lo que Significa para Ti
 
JavaOne_2010
JavaOne_2010JavaOne_2010
JavaOne_2010
 
OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6OTN Developer Days - Java EE 6
OTN Developer Days - Java EE 6
 
De Java 8 ate Java 14
De Java 8 ate Java 14De Java 8 ate Java 14
De Java 8 ate Java 14
 
CQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java DevelopersCQRS and Event Sourcing for Java Developers
CQRS and Event Sourcing for Java Developers
 
De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14De Java 8 a Java 11 y 14
De Java 8 a Java 11 y 14
 
node.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoonnode.js 실무 - node js in practice by Jesang Yoon
node.js 실무 - node js in practice by Jesang Yoon
 
Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014Java EE 7 Soup to Nuts at JavaOne 2014
Java EE 7 Soup to Nuts at JavaOne 2014
 
Grails 3.0 Preview
Grails 3.0 PreviewGrails 3.0 Preview
Grails 3.0 Preview
 
Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"Алексей Швайка "Bundling: you are doing it wrong"
Алексей Швайка "Bundling: you are doing it wrong"
 
GemStone/64 product update and road map
GemStone/64 product update and road mapGemStone/64 product update and road map
GemStone/64 product update and road map
 
DOTNET8.pptx
DOTNET8.pptxDOTNET8.pptx
DOTNET8.pptx
 
Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17Jakarta EE 8 on JDK17
Jakarta EE 8 on JDK17
 
MySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics ImprovementsMySQL 5.6 - Operations and Diagnostics Improvements
MySQL 5.6 - Operations and Diagnostics Improvements
 
The Why and How of Scala at Twitter
The Why and How of Scala at TwitterThe Why and How of Scala at Twitter
The Why and How of Scala at Twitter
 
Expertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use CasesExpertezed 2012 Webcast - XML DB Use Cases
Expertezed 2012 Webcast - XML DB Use Cases
 
Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12Whats new in Java 9,10,11,12
Whats new in Java 9,10,11,12
 
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChangerZero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
Zero to 1 Billion+ Records: A True Story of Learning & Scaling GameChanger
 

Plus de Strannik_2013

Junior,middle,senior?
Junior,middle,senior?Junior,middle,senior?
Junior,middle,senior?Strannik_2013
 
JEEConf 2016. Effectiveness and code optimization in Java applications
JEEConf 2016. Effectiveness and code optimization in  Java applicationsJEEConf 2016. Effectiveness and code optimization in  Java applications
JEEConf 2016. Effectiveness and code optimization in Java applicationsStrannik_2013
 
Effectiveness and code optimization in Java
Effectiveness and code optimization in JavaEffectiveness and code optimization in Java
Effectiveness and code optimization in JavaStrannik_2013
 
Effective Java applications
Effective Java applicationsEffective Java applications
Effective Java applicationsStrannik_2013
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleStrannik_2013
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesStrannik_2013
 
Spring Boot. Boot up your development. JEEConf 2015
Spring Boot. Boot up your development. JEEConf 2015Spring Boot. Boot up your development. JEEConf 2015
Spring Boot. Boot up your development. JEEConf 2015Strannik_2013
 
Gradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereGradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereStrannik_2013
 
Java 8 in action.Jinq
Java 8 in action.JinqJava 8 in action.Jinq
Java 8 in action.JinqStrannik_2013
 
Spring Boot. Boot up your development
Spring Boot. Boot up your developmentSpring Boot. Boot up your development
Spring Boot. Boot up your developmentStrannik_2013
 
Spring.Boot up your development
Spring.Boot up your developmentSpring.Boot up your development
Spring.Boot up your developmentStrannik_2013
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gatesStrannik_2013
 
Getting ready to java 8
Getting ready to java 8Getting ready to java 8
Getting ready to java 8Strannik_2013
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesStrannik_2013
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the starsStrannik_2013
 
Spring Web flow. A little flow of happiness
Spring Web flow. A little flow of happinessSpring Web flow. A little flow of happiness
Spring Web flow. A little flow of happinessStrannik_2013
 

Plus de Strannik_2013 (16)

Junior,middle,senior?
Junior,middle,senior?Junior,middle,senior?
Junior,middle,senior?
 
JEEConf 2016. Effectiveness and code optimization in Java applications
JEEConf 2016. Effectiveness and code optimization in  Java applicationsJEEConf 2016. Effectiveness and code optimization in  Java applications
JEEConf 2016. Effectiveness and code optimization in Java applications
 
Effectiveness and code optimization in Java
Effectiveness and code optimization in JavaEffectiveness and code optimization in Java
Effectiveness and code optimization in Java
 
Effective Java applications
Effective Java applicationsEffective Java applications
Effective Java applications
 
Top 10 reasons to migrate to Gradle
Top 10 reasons to migrate to GradleTop 10 reasons to migrate to Gradle
Top 10 reasons to migrate to Gradle
 
Gradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypesGradle 2.Breaking stereotypes
Gradle 2.Breaking stereotypes
 
Spring Boot. Boot up your development. JEEConf 2015
Spring Boot. Boot up your development. JEEConf 2015Spring Boot. Boot up your development. JEEConf 2015
Spring Boot. Boot up your development. JEEConf 2015
 
Gradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhereGradle 2.Write once, builde everywhere
Gradle 2.Write once, builde everywhere
 
Java 8 in action.Jinq
Java 8 in action.JinqJava 8 in action.Jinq
Java 8 in action.Jinq
 
Spring Boot. Boot up your development
Spring Boot. Boot up your developmentSpring Boot. Boot up your development
Spring Boot. Boot up your development
 
Spring.Boot up your development
Spring.Boot up your developmentSpring.Boot up your development
Spring.Boot up your development
 
Gradle.Enemy at the gates
Gradle.Enemy at the gatesGradle.Enemy at the gates
Gradle.Enemy at the gates
 
Getting ready to java 8
Getting ready to java 8Getting ready to java 8
Getting ready to java 8
 
JSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfacesJSF 2: Myth of panacea? Magic world of user interfaces
JSF 2: Myth of panacea? Magic world of user interfaces
 
Git.From thorns to the stars
Git.From thorns to the starsGit.From thorns to the stars
Git.From thorns to the stars
 
Spring Web flow. A little flow of happiness
Spring Web flow. A little flow of happinessSpring Web flow. A little flow of happiness
Spring Web flow. A little flow of happiness
 

Dernier

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Dernier (20)

Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 

Serialization and performance in Java

  • 2. About author Works in IT since 2000 10 year of Java SE/EE experience Occupied senior Java developer/Team Lead positions Winner of 2013 JBoss Community Recognition Award. https://www.jboss.org/jbcra
  • 3. Agenda • Purpose of serialization • Frameworks overview • Performance testing • Q & A
  • 7. Performance • Native memory copying using C operations • “Unsafe” operations • Ignore object introspection • Direct object-object copying
  • 8. Java serialization • The easiest programming effort • Out-of-the-box functionality
  • 9. Java serialization • Serializable interface • Decreases the flexibility to change a class’s implementation once it has been released • Doesn’t allow to exchange data with C++/Python applications • Due to default constructors hole for invariant corruption and illegal access • No customization • You should have access to the source code No customization You should have access to the source code
  • 10. Java externalization • Serialization but by implementing Externalizable interface to persist and restore the object • Responsibility of the class to save and restore the contents of its instances • Requires modifications in marshalling/unmarshalling code if the class contents changed No customization You should have access to the source code
  • 12. Avro • Schema evolution • Binary and JSON encoding • Dynamic typing • Support of Java, C, C++, C# and Python • Apache Hadoop integration
  • 13. Avro
  • 14. Avro
  • 15. XML • Interchangeable format • Supported schemas • Space intensive and huge performance loss • Complex navigating
  • 16. Simple • High performance XML serialization and configuration framework for Java. • Requires absolutely no configuration • Can handle cycles in the object graph
  • 18. Javolution • Fast real-time library for safety-critical applications • Based on OSGi context • Parallel computing support
  • 20. Json-io • Doesn’t require custom interfaces/attributes usage/source code • Handles cyclic references • Reader/writer customization • Does not depend on any native or 3rd party libraries.
  • 21. Google gson • Java library to convert JSON to Java objects and vice-versa • Doesn’t require source code of serialized objects • Allow custom representatives
  • 23. Jackson • High-performance, ergonomic JSON processor Java library • Extensive customization tools • Mix-in annotations • Materialized interfaces • Multiple data formats
  • 24. Jackson • JSON • CSV • Smile(binary JSON) • XML • YAML(similar to JSON)
  • 25. BSON for Jackson • Binary encoded JSON • Main data exchange format for MongoDB • Allows writing custom extensions
  • 26. Protocol buffers • Way of encoding structured data in an efficient yet extensible format. • Google uses Protocol Buffers for almost all of its internal RPC protocols and file formats. • Supported in Java, C++, Python
  • 27. Protocol buffers message User { required string login = 1; repeated Order orders = 2; } message Order { required int32 id = 1; optional string date = 2; }
  • 29. FST • Java-to-java library • No support for versioning • Use case is high performance message oriented software • Drop-in replacement • Custom optimization using annotations, custom serializers
  • 30. FST
  • 31. GridGain • Part of distributed computing system • Don’t require any custom interfaces or API • Direct memory copying by invoking native "unsafe" operations • Predefined fields introspection
  • 33. Kryo • Fast and efficient object graph serialization framework for Java • Open source project on Google code • Automatic deep and shallow copying/cloning • Doesn’t put requirements on the source classes (in most cases)
  • 34. Kryo • Twitter • Apache Hive • Akka • Storm • S4
  • 35. Kryo
  • 36. Kryo
  • 37. Benchmark • JDK 1.8.0.5 • Apache Avro 1.7.6 • Simple 2.7.1 • Json-io 2.5.2 • Google GSON 2.2.4 • Jackson 2.3.2 • BSON for Jackson 2.3.1 • Protocol buffers 2.5 • Kryo 2.23 • FST 1.54 • GridGain 6.0.2
  • 38. Benchmark • Speed(serialization and deserialization) • Size(complex and ordinary objects) • Flexibility
  • 41. Issues Library Description Gson, Jackson Crashed when serializing cyclic dependency Simple Crashed for very big XML file Avro Bug during deserialization
  • 42. Serialization (complex) # Library Time(ms) 1 Kryo(optimized) 134 2 Protocol buffers 165 3 GridGain 196 4 FST 207 5 Kryo 209 6 Jackson(smile) 275 7 Kryo(unsafe) 306 8 Jackson 491 9 Java serialization 605 10 Javolution 1043
  • 43. Serialization (simple) # Library Time(ms) 1 Protocol buffers <1 2 Google GSON 5 3 Java serialization 10 4 BSON for Jackson 10 5 Jackson(smile) 11 6 Kryo(optimized) 17 7 Kryo 18 8 Jackson 18 9 Kryo(unsafe) 20 10 Javolution 21
  • 44. Deserialization (complex) # Library Time(ms) 1 Kryo(optimized) 113 2 Protocol buffers 165 3 GridGain 196 4 FST 207 5 Kryo 209 6 Jackson(smile) 275 7 Kryo(unsafe) 306 8 Jackson 491 9 Java serialization 605 10 BSON for Jackson 930
  • 45. Deserialization (simple) # Library Time(ms) 1 Protocol buffers 1 2 GridGain 3 3 Google GSON 6 4 Jackson(smile) 9 5 BSON for Jackson 9 6 Kryo(optimized) 18 7 Kryo 18 8 Jackson 18 9 Kryo(unsafe) 20 10 FST 42
  • 46. Size (complex) # Library Size(bytes) 1 Kryo(optimized) 33904 2 FST 34069 3 Kryo 35674 4 Protocol buffers 39517 5 Kryo(unsafe) 40554 6 Jackson(smile) 44840 7 Java serialization 49757 8 GridGain 58288 9 Jackson 67858 10 Google GSON 68338
  • 47. Size (simple) # Library Size(bytes) 1 Kryo(optimized) 18 2 Kryo 18 3 Protocol buffers 20 4 Kryo(unsafe) 21 5 GridGain 33 6 Jackson(smile) 40 7 Jackson 41 8 Google GSON 41 9 Jackson(YAML) 41 10 BSON for Jackson 46
  • 48. Usability # Library 1 Google GSON 2 Kryo 2 Kryo(unsafe) 3 Jackson 3 Jackson(XML, Smile, YAML) 3 BSON for Jackson 4 Json-io 5 FST 6 Java serialization 7 Kryo(optimized)
  • 49. Overall rating (2014) # Library Rating 1 Kryo(optimized) 67 2 Protocol buffers 65 3 Kryo 58 4 Jackson(smile) 55 5 Kryo(unsafe) 46 6 GridGain 44 7 Google GSON 43 8 FST 43 9 Jackson 40 10 BSON for Jackson 33 11 Java serialization 32
  • 50. Overall rating (2013) # Library Rating 1 Kryo(optimized) 67 2 Kryo(unsafe) 65 3 Protocol buffers 63 4 Kryo 59 5 Jackson(smile) 51 6 Google GSON 45 7 FST 42 8 GridGain 34 9 Jackson 32 10 Java serialization 30 11 BSON for Jackson 24
  • 51. Advices Library Usage Kryo Fast and compact serializer for complex objects over network Protocol buffers Fast serializer for simple objects Jackson(smile) Jackson-based serializer for Web usage Google JSON Dirty solution to quickly serialize/deserialize objects Apache Avro Serialize objects into files with possible schema changes Java Out-of-the-box trusted solution without additional libraries