SlideShare a Scribd company logo
MAXIM ZAKS
Freelance Software Developer
Deep dive into data
serialisation
Persisting State / User generated Content
Machine to Machine Communication
Representation of Configuration / Read only data
Why do we need data serialisation?
Custom binary representation
Language provided binary serialisation
Text based representation (CSV, XML, JSON, YAML)
Embedded SQL or NoSQL DB
Binary cross platform serialisation library (FlatBuffers, FlexBuffers
Protocol Buffers, Cap’n Proto, SBE, Apache Thrift etc…)
How can we persist data on mobile?
Size “on disk”
Speed of read & write / partial read / memory consumption
Human readable and writable
Support of OO language type system
Data versioning / evolution / migration
Important criteria for persisting data
JSON vs.
Protocol Buffers vs.
FlatBuffers
Text based
Self describing
Weakly typed: Object, Array, String, Number, Bool, Null
JSON
Binary
IDL (interface definition language) based Schema
Strongly typed: Message, fix length Numbers, variable length
numbers, String, Bool, Enum, Bytes, Repeated values, Maps,
Oneof, Any
Evolution Strategy
Protocol Buffers
Binary
IDL (interface definition language) based Schema
Strongly typed: Table, Struct, fix length Numbers, String, Bool,
Enum, Bytes, typed Vector, Union
Value / Reference type semantics
Random Value access
Evolution Strategy
Flat Buffers
Size “on disk”
Speed of read & write / partial read / memory consumption
Human readable and writable
Support of OO language type system
Data versioning / evolution / migration
Important criteria for persisting data
👎 JSON, bad for representing numbers, lots of repetition,
needs to be at least minified
👍 Protocol Buffers, stores only values and a bit of meta data,
thanks to VLQ very efficient for storing numbers
🤔 Flat Buffers, has some overhead compared to Protocol
Buffers because of Ref semantics and random value access
Important criteria for persisting data:
Size
👎 JSON, text need to be parsed and translated to
intermediate data representation
🤔 Protocol Buffers, no partial read, VLQ means you need to do
some operations before value is available
👍 Flat Buffers, support partial reading thanks to Ref semantics
and random value access mechanism
Important criteria for persisting data:
Speed of read & write / partial read / memory consumption
👍 JSON, text based and can be nicely formatted
🤔 Protocol Buffers, provides tools for binary to JSON
conversion and vice versa
🤔 Flat Buffers, provides tools for binary to JSON conversion
and vice versa
Important criteria for persisting data:
Human readable and writable
🤔 JSON, is generally weakly typed, there are ways to
transform/validate against OO types
👍 Protocol Buffers, code generator creates Accessor classes
which can be comfortably used for encoding and decoding
👍 Flat Buffers, code generator creates Accessor classes which
can be comfortably used for decoding, performant encoding can
be a bit painful
Important criteria for persisting data:
Support of OO language type system
🤔 JSON, is implicit because of self describing nature
👍 Protocol Buffers, provides a set of rule how a schema can be
evolved
👍 Flat Buffers, provides a set of rule how a schema can be
evolved
Important criteria for persisting data:
Data versioning / evolution / migration
Size Efficiency
Human
Readable
Types Evolution
JSON 👎 👎 👍 🤔 🤔
Proto
Buffers
👍 🤔 🤔 👍 👍
Flat
Buffers
🤔 👍 🤔 👍 👍
Mobile Warsaw 2016: https://www.youtube.com/watch?
v=OUNpNo-oyQY
MobileTechCon 2016: https://medium.com/@icex33/beyond-
json-introduction-to-flatbuffers-fba1dfd0dcfe
AppBuilders 2017: https://www.youtube.com/watch?
v=Ve9POqZJymw
BerlinBuzzWords 2017: https://www.youtube.com/watch?
v=qF44UetsLsQ
Previous Talks
Protocol Buffers Encoding: https://developers.google.com/
protocol-buffers/docs/encoding
FlatBuffers: https://google.github.io/flatbuffers/
FlatBuffersSwift: https://github.com/mzaks/FlatBuffersSwift
FlexBuffersSwift: https://github.com/mzaks/FlexBuffersSwift
Data Serialisation formats: https://en.wikipedia.org/wiki/
Comparison_of_data_serialization_formats
JVM Serialisers: https://github.com/eishay/jvm-serializers
More Links
WWW.MDEVTALK.CZ
mdevtalk

More Related Content

What's hot

1 introductin to HTML
1 introductin to HTML1 introductin to HTML
1 introductin to HTML
Javed Khan
 
XML | Computer Science
XML | Computer ScienceXML | Computer Science
XML | Computer Science
Transweb Global Inc
 
What is xml
What is xmlWhat is xml
What is xml
Aneesa Rahman
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
Kumar
 
Html and dhtml
Html and dhtmlHtml and dhtml
Html and dhtml
Laxmihhar Basti
 
What is html
What is html What is html
What is html
Thotapallisanjana
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
Himanshu Soni
 
What is html and how it uses/
What is html and how it uses/What is html and how it uses/
What is html and how it uses/
abhishek9260
 
Xhtml
XhtmlXhtml
XML
XMLXML
Protocol Buffers
Protocol BuffersProtocol Buffers
Protocol Buffers
Knoldus Inc.
 

What's hot (11)

1 introductin to HTML
1 introductin to HTML1 introductin to HTML
1 introductin to HTML
 
XML | Computer Science
XML | Computer ScienceXML | Computer Science
XML | Computer Science
 
What is xml
What is xmlWhat is xml
What is xml
 
Introduction to XML
Introduction to XMLIntroduction to XML
Introduction to XML
 
Html and dhtml
Html and dhtmlHtml and dhtml
Html and dhtml
 
What is html
What is html What is html
What is html
 
Xml and xml processor
Xml and xml processorXml and xml processor
Xml and xml processor
 
What is html and how it uses/
What is html and how it uses/What is html and how it uses/
What is html and how it uses/
 
Xhtml
XhtmlXhtml
Xhtml
 
XML
XMLXML
XML
 
Protocol Buffers
Protocol BuffersProtocol Buffers
Protocol Buffers
 

Similar to Maxim Zaks: Deep dive into data serialisation

Beyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffersBeyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffers
Maxim Zaks
 
Chambwe bosc2010
Chambwe bosc2010Chambwe bosc2010
Chambwe bosc2010
BOSC 2010
 
Json
JsonJson
Functional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text EditorFunctional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text Editor
Baden Hughes
 
Data Formats
Data FormatsData Formats
Data Formats
Subhash Chandran
 
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
Jitendra Bafna
 
Avro
AvroAvro
Php packages
Php packagesPhp packages
Php packages
abdelrahman samy
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
mikaelbarbero
 
Json
JsonJson
Json
Uma mohan
 
Corpus annotation for corpus linguistics (nov2009)
Corpus annotation for corpus linguistics (nov2009)Corpus annotation for corpus linguistics (nov2009)
Corpus annotation for corpus linguistics (nov2009)
Jorge Baptista
 
Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)
Wajahat Shahid
 
Apache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big DataApache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big Data
techmaddy
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
Sven Efftinge
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
IndicThreads
 
Understanding Character Encodings
Understanding Character EncodingsUnderstanding Character Encodings
Understanding Character Encodings
Mobisoft Infotech
 
Internationalisation And Globalisation
Internationalisation And GlobalisationInternationalisation And Globalisation
Internationalisation And Globalisation
Alan Dean
 
Mongo db workshop # 01
Mongo db workshop # 01Mongo db workshop # 01
Mongo db workshop # 01
FarhatParveen10
 
JSON PRETTIFY.pdf
JSON PRETTIFY.pdfJSON PRETTIFY.pdf
JSON PRETTIFY.pdf
json beautifier
 
Ppt programming by alyssa marie paral
Ppt programming by alyssa marie paralPpt programming by alyssa marie paral
Ppt programming by alyssa marie paral
alyssamarieparal
 

Similar to Maxim Zaks: Deep dive into data serialisation (20)

Beyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffersBeyond JSON - An Introduction to FlatBuffers
Beyond JSON - An Introduction to FlatBuffers
 
Chambwe bosc2010
Chambwe bosc2010Chambwe bosc2010
Chambwe bosc2010
 
Json
JsonJson
Json
 
Functional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text EditorFunctional Requirements for an Interlinear Text Editor
Functional Requirements for an Interlinear Text Editor
 
Data Formats
Data FormatsData Formats
Data Formats
 
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
MuleSoft Surat Virtual Meetup#30 - Flat File Schemas Transformation With Mule...
 
Avro
AvroAvro
Avro
 
Php packages
Php packagesPhp packages
Php packages
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
Json
JsonJson
Json
 
Corpus annotation for corpus linguistics (nov2009)
Corpus annotation for corpus linguistics (nov2009)Corpus annotation for corpus linguistics (nov2009)
Corpus annotation for corpus linguistics (nov2009)
 
Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)Data exchange over internet (XML vs JSON)
Data exchange over internet (XML vs JSON)
 
Apache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big DataApache big data 2016 - Speaking the language of Big Data
Apache big data 2016 - Speaking the language of Big Data
 
Language Engineering With Xtext
Language Engineering With XtextLanguage Engineering With Xtext
Language Engineering With Xtext
 
Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...Building scalable and language-independent Java services using Apache Thrift ...
Building scalable and language-independent Java services using Apache Thrift ...
 
Understanding Character Encodings
Understanding Character EncodingsUnderstanding Character Encodings
Understanding Character Encodings
 
Internationalisation And Globalisation
Internationalisation And GlobalisationInternationalisation And Globalisation
Internationalisation And Globalisation
 
Mongo db workshop # 01
Mongo db workshop # 01Mongo db workshop # 01
Mongo db workshop # 01
 
JSON PRETTIFY.pdf
JSON PRETTIFY.pdfJSON PRETTIFY.pdf
JSON PRETTIFY.pdf
 
Ppt programming by alyssa marie paral
Ppt programming by alyssa marie paralPpt programming by alyssa marie paral
Ppt programming by alyssa marie paral
 

More from mdevtalk

Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve SwiftuJan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
mdevtalk
 
Jarda Machaň: Proč je dobré míti Developer Evangelistu
Jarda Machaň: Proč je dobré míti Developer EvangelistuJarda Machaň: Proč je dobré míti Developer Evangelistu
Jarda Machaň: Proč je dobré míti Developer Evangelistu
mdevtalk
 
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOSPavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
mdevtalk
 
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
mdevtalk
 
Michal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle BuildsMichal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle Builds
mdevtalk
 
Vladislav Iliushin: Dark side of IoT
Vladislav Iliushin: Dark side of IoTVladislav Iliushin: Dark side of IoT
Vladislav Iliushin: Dark side of IoT
mdevtalk
 
Georgiy Shur: Bring onboarding to life
Georgiy Shur: Bring onboarding to lifeGeorgiy Shur: Bring onboarding to life
Georgiy Shur: Bring onboarding to life
mdevtalk
 
David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?
mdevtalk
 
Nikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutionsNikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutions
mdevtalk
 
Milan Oulehla: Bezpečnost mobilních aplikací na Androidu
Milan Oulehla: Bezpečnost mobilních aplikací na AndroiduMilan Oulehla: Bezpečnost mobilních aplikací na Androidu
Milan Oulehla: Bezpečnost mobilních aplikací na Androidu
mdevtalk
 
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundůTomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
mdevtalk
 
David Vávra: Firebase + Kotlin + RX + MVP
David Vávra: Firebase + Kotlin + RX + MVPDavid Vávra: Firebase + Kotlin + RX + MVP
David Vávra: Firebase + Kotlin + RX + MVP
mdevtalk
 
Adam Šimek: Optimalizace skrolování, RecyclerView
Adam Šimek: Optimalizace skrolování, RecyclerViewAdam Šimek: Optimalizace skrolování, RecyclerView
Adam Šimek: Optimalizace skrolování, RecyclerView
mdevtalk
 
Paul Lammertsma: Account manager & sync
Paul Lammertsma: Account manager & syncPaul Lammertsma: Account manager & sync
Paul Lammertsma: Account manager & sync
mdevtalk
 
Charles Du: Introduction to Mobile UX Design
Charles Du: Introduction to Mobile UX DesignCharles Du: Introduction to Mobile UX Design
Charles Du: Introduction to Mobile UX Design
mdevtalk
 
Honza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package ManagerHonza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package Manager
mdevtalk
 
David Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a AzureDavid Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a Azure
mdevtalk
 
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptatDominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
mdevtalk
 
Jiří Dutkevič: Ochrana citlivých dat v iOS
Jiří Dutkevič: Ochrana citlivých dat v iOSJiří Dutkevič: Ochrana citlivých dat v iOS
Jiří Dutkevič: Ochrana citlivých dat v iOS
mdevtalk
 
Petr Dvořák: Push notifikace ve velkém
Petr Dvořák: Push notifikace ve velkémPetr Dvořák: Push notifikace ve velkém
Petr Dvořák: Push notifikace ve velkém
mdevtalk
 

More from mdevtalk (20)

Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve SwiftuJan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
Jan Čislinský: Seznámení se Sourcery aneb Základy metaprogramování ve Swiftu
 
Jarda Machaň: Proč je dobré míti Developer Evangelistu
Jarda Machaň: Proč je dobré míti Developer EvangelistuJarda Machaň: Proč je dobré míti Developer Evangelistu
Jarda Machaň: Proč je dobré míti Developer Evangelistu
 
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOSPavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
Pavel Cvetler: Jeden kód, co vládne všem? Žádný problém pro Android i iOS
 
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
Anastasiia Vixentael: 10 things you need to know before implementing cryptogr...
 
Michal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle BuildsMichal Havryluk: How To Speed Up Android Gradle Builds
Michal Havryluk: How To Speed Up Android Gradle Builds
 
Vladislav Iliushin: Dark side of IoT
Vladislav Iliushin: Dark side of IoTVladislav Iliushin: Dark side of IoT
Vladislav Iliushin: Dark side of IoT
 
Georgiy Shur: Bring onboarding to life
Georgiy Shur: Bring onboarding to lifeGeorgiy Shur: Bring onboarding to life
Georgiy Shur: Bring onboarding to life
 
David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?David Bilík: Anko – modern way to build your layouts?
David Bilík: Anko – modern way to build your layouts?
 
Nikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutionsNikita Tuk: Handling background processes in iOS: problems & solutions
Nikita Tuk: Handling background processes in iOS: problems & solutions
 
Milan Oulehla: Bezpečnost mobilních aplikací na Androidu
Milan Oulehla: Bezpečnost mobilních aplikací na AndroiduMilan Oulehla: Bezpečnost mobilních aplikací na Androidu
Milan Oulehla: Bezpečnost mobilních aplikací na Androidu
 
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundůTomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
Tomáš Kohout: Jak zrychlit iOS vývoj pomocí Swift playgoundů
 
David Vávra: Firebase + Kotlin + RX + MVP
David Vávra: Firebase + Kotlin + RX + MVPDavid Vávra: Firebase + Kotlin + RX + MVP
David Vávra: Firebase + Kotlin + RX + MVP
 
Adam Šimek: Optimalizace skrolování, RecyclerView
Adam Šimek: Optimalizace skrolování, RecyclerViewAdam Šimek: Optimalizace skrolování, RecyclerView
Adam Šimek: Optimalizace skrolování, RecyclerView
 
Paul Lammertsma: Account manager & sync
Paul Lammertsma: Account manager & syncPaul Lammertsma: Account manager & sync
Paul Lammertsma: Account manager & sync
 
Charles Du: Introduction to Mobile UX Design
Charles Du: Introduction to Mobile UX DesignCharles Du: Introduction to Mobile UX Design
Charles Du: Introduction to Mobile UX Design
 
Honza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package ManagerHonza Dvorský: Swift Package Manager
Honza Dvorský: Swift Package Manager
 
David Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a AzureDavid Bureš - Xamarin, IoT a Azure
David Bureš - Xamarin, IoT a Azure
 
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptatDominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
Dominik Veselý - Vše co jste kdy chtěli vědět o CI a báli jste se zeptat
 
Jiří Dutkevič: Ochrana citlivých dat v iOS
Jiří Dutkevič: Ochrana citlivých dat v iOSJiří Dutkevič: Ochrana citlivých dat v iOS
Jiří Dutkevič: Ochrana citlivých dat v iOS
 
Petr Dvořák: Push notifikace ve velkém
Petr Dvořák: Push notifikace ve velkémPetr Dvořák: Push notifikace ve velkém
Petr Dvořák: Push notifikace ve velkém
 

Recently uploaded

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
Hironori Washizaki
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
rodomar2
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Łukasz Chruściel
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
pavan998932
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
lorraineandreiamcidl
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
Ayan Halder
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
Hornet Dynamics
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
mz5nrf0n
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
Octavian Nadolu
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
Green Software Development
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
Google
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Envertis Software Solutions
 

Recently uploaded (20)

2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket ManagementUtilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
Utilocate provides Smarter, Better, Faster, Safer Locate Ticket Management
 
SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024SWEBOK and Education at FUSE Okinawa 2024
SWEBOK and Education at FUSE Okinawa 2024
 
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CDKuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
KuberTENes Birthday Bash Guadalajara - Introducción a Argo CD
 
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Need for Speed: Removing speed bumps from your Symfony projects ⚡️
Need for Speed: Removing speed bumps from your Symfony projects ⚡️
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
What is Augmented Reality Image Tracking
What is Augmented Reality Image TrackingWhat is Augmented Reality Image Tracking
What is Augmented Reality Image Tracking
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptxLORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
LORRAINE ANDREI_LEQUIGAN_HOW TO USE WHATSAPP.pptx
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
Using Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional SafetyUsing Xen Hypervisor for Functional Safety
Using Xen Hypervisor for Functional Safety
 
Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
E-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet DynamicsE-commerce Development Services- Hornet Dynamics
E-commerce Development Services- Hornet Dynamics
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
原版定制美国纽约州立大学奥尔巴尼分校毕业证学位证书原版一模一样
 
Artificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension FunctionsArtificia Intellicence and XPath Extension Functions
Artificia Intellicence and XPath Extension Functions
 
GreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-JurisicGreenCode-A-VSCode-Plugin--Dario-Jurisic
GreenCode-A-VSCode-Plugin--Dario-Jurisic
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppAI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
 
APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise EditionWhy Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
Why Choose Odoo 17 Community & How it differs from Odoo 17 Enterprise Edition
 

Maxim Zaks: Deep dive into data serialisation

  • 1.
  • 3. Deep dive into data serialisation
  • 4. Persisting State / User generated Content Machine to Machine Communication Representation of Configuration / Read only data Why do we need data serialisation?
  • 5. Custom binary representation Language provided binary serialisation Text based representation (CSV, XML, JSON, YAML) Embedded SQL or NoSQL DB Binary cross platform serialisation library (FlatBuffers, FlexBuffers Protocol Buffers, Cap’n Proto, SBE, Apache Thrift etc…) How can we persist data on mobile?
  • 6. Size “on disk” Speed of read & write / partial read / memory consumption Human readable and writable Support of OO language type system Data versioning / evolution / migration Important criteria for persisting data
  • 7. JSON vs. Protocol Buffers vs. FlatBuffers
  • 8. Text based Self describing Weakly typed: Object, Array, String, Number, Bool, Null JSON
  • 9. Binary IDL (interface definition language) based Schema Strongly typed: Message, fix length Numbers, variable length numbers, String, Bool, Enum, Bytes, Repeated values, Maps, Oneof, Any Evolution Strategy Protocol Buffers
  • 10. Binary IDL (interface definition language) based Schema Strongly typed: Table, Struct, fix length Numbers, String, Bool, Enum, Bytes, typed Vector, Union Value / Reference type semantics Random Value access Evolution Strategy Flat Buffers
  • 11. Size “on disk” Speed of read & write / partial read / memory consumption Human readable and writable Support of OO language type system Data versioning / evolution / migration Important criteria for persisting data
  • 12. 👎 JSON, bad for representing numbers, lots of repetition, needs to be at least minified 👍 Protocol Buffers, stores only values and a bit of meta data, thanks to VLQ very efficient for storing numbers 🤔 Flat Buffers, has some overhead compared to Protocol Buffers because of Ref semantics and random value access Important criteria for persisting data: Size
  • 13. 👎 JSON, text need to be parsed and translated to intermediate data representation 🤔 Protocol Buffers, no partial read, VLQ means you need to do some operations before value is available 👍 Flat Buffers, support partial reading thanks to Ref semantics and random value access mechanism Important criteria for persisting data: Speed of read & write / partial read / memory consumption
  • 14. 👍 JSON, text based and can be nicely formatted 🤔 Protocol Buffers, provides tools for binary to JSON conversion and vice versa 🤔 Flat Buffers, provides tools for binary to JSON conversion and vice versa Important criteria for persisting data: Human readable and writable
  • 15. 🤔 JSON, is generally weakly typed, there are ways to transform/validate against OO types 👍 Protocol Buffers, code generator creates Accessor classes which can be comfortably used for encoding and decoding 👍 Flat Buffers, code generator creates Accessor classes which can be comfortably used for decoding, performant encoding can be a bit painful Important criteria for persisting data: Support of OO language type system
  • 16. 🤔 JSON, is implicit because of self describing nature 👍 Protocol Buffers, provides a set of rule how a schema can be evolved 👍 Flat Buffers, provides a set of rule how a schema can be evolved Important criteria for persisting data: Data versioning / evolution / migration
  • 17. Size Efficiency Human Readable Types Evolution JSON 👎 👎 👍 🤔 🤔 Proto Buffers 👍 🤔 🤔 👍 👍 Flat Buffers 🤔 👍 🤔 👍 👍
  • 18. Mobile Warsaw 2016: https://www.youtube.com/watch? v=OUNpNo-oyQY MobileTechCon 2016: https://medium.com/@icex33/beyond- json-introduction-to-flatbuffers-fba1dfd0dcfe AppBuilders 2017: https://www.youtube.com/watch? v=Ve9POqZJymw BerlinBuzzWords 2017: https://www.youtube.com/watch? v=qF44UetsLsQ Previous Talks
  • 19. Protocol Buffers Encoding: https://developers.google.com/ protocol-buffers/docs/encoding FlatBuffers: https://google.github.io/flatbuffers/ FlatBuffersSwift: https://github.com/mzaks/FlatBuffersSwift FlexBuffersSwift: https://github.com/mzaks/FlexBuffersSwift Data Serialisation formats: https://en.wikipedia.org/wiki/ Comparison_of_data_serialization_formats JVM Serialisers: https://github.com/eishay/jvm-serializers More Links