SlideShare a Scribd company logo
1 of 46
Protobuff.js
Who am I!
I am Adrian Lemes
- Frontend architect at ilegra
- Graduated in Analysis and System
Development at FATEC Senai
- Started in 2012 on IT world
- Experience with Arch Front
(Angular, React, React Native,
Vue, NodeJS, Micro-fronts, SSR,
BFF, GraphQL, PWA and others)
You can find me at @username 2
@adrianlemess
Serialization and Deserialization
- Protocol buffers were initially developed at Google to
deal with an index server request/response protocol.
- Transfer structured data in a safe way between
servers
- New fields could be easily introduced, and
intermediate servers that didn't need to inspect the
data could simply parse it and pass through the data
without needing to know about all the fields
3
“
4
Protocol buffers are Google's language-neutral,
platform-neutral, extensible mechanism for
serializing structured data – think XML or
JSON, but smaller, faster, and simpler. —
Google
Protobuff
- A way of serialize and deserialize data
- Open source project
- Platform agnostic
- Serialization and deserialization in multiple API
languages
5
1. Define message types
2. Generate code
3. Serialize/Deserialize
1. Define message types
2. Generate code
3. Serialize/Deserialize
“
Messa types defines .proto
files with data structure
8
“
Message type have the key-
value pairs format
9
Person Type
10
1. Define message types
2. Generate code
3. Serialize/Deserialize
“
The .proto files are compiled
by protobuf into generated
code
12
Basic types
- double
- float
- int32
- int64
- uint32
- Dictionary
- Data
- Array
- bytes
13
- uint64
- sint32
- sint64
- fixed32
- fixed64
- sfixed32
- sfixed64
- bool
- string
What languages?
14
JavaScript generated code
15
1. Define message types
2. Generate code
3. Serialize/Deserialize
Why not XML?
- Are simpler
- Are 3 to 10 times smaller
- Are 20 to 100 times faster
- Are less ambiguous
- Generate data access classes that are easier to use
programmatically
17
Interfaces to serialization and deserialization
- byte[] toByteArray();: serializes the message and
returns a byte array containing its raw bytes.
- static Person parseFrom(byte[] data);: parses a
message from the given byte array.
- void writeTo(OutputStream output);: serializes the
message and writes it to an OutputStream.
- static Person parseFrom(InputStream input);: reads
and parses a message from an InputStream.
18
How does it work?
Protobuff model Person
20
The binary would probably be 28 bytes long and
take 100-200 nanoseconds to parse
XML model Person
21
The XML version is at least 69 bytes if you remove
whitespace, and would take around 5,000-10,000
nanoseconds to parse.
Do NOT use for:
- Data from service consumed by browser - browsers
use JSON very well and optmized
- JavaScript architecture - NodeJS, RN, React - JSON is
native in JavaScript
- Startup - JSON is faster to understand
- Large packet sizes - more than 1mb by packet
22
Worth to use:
- Native mobile apps getting data - Android and Swift
- Micro-services architecture with different languages -
type safe messages prevents dummy mistakes
- High data throughput - scale
23
24
Thanks!
Any questions?
This is a slide title
- Here you have a list of items
- And some text
- But remember not to overload your slides with
content
Your audience will listen to you or read the content, but
won’t do both.
25
Bring the attention of your audience over a
key concept using icons or illustrations
Big concept
26
White
Is the color of milk and fresh
snow, the color produced by the
combination of all the colors of
the visible spectrum.
You can also split your content
Black
Is the color of coal, ebony, and of
outer space. It is the darkest
color, the result of the absence of
or complete absorption of light.
27
In two or three columns
Yellow
Is the color of gold,
butter and ripe lemons.
In the spectrum of
visible light, yellow is
found between green
and orange.
Blue
Is the colour of the
clear sky and the deep
sea. It is located
between violet and
green on the optical
spectrum.
Red
Is the color of blood,
and because of this it
has historically been
associated with
sacrifice, danger and
courage.
28
A picture is worth a thousand words
A complex idea can be
conveyed with just a single
still image, namely making
it possible to absorb large
amounts of data quickly.
29
Want big impact?
Use big image.
30
Use diagrams to explain your ideas
31
Vestibulum congue
tempus
Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed
do eiusmod tempor.
Vestibulum congue
tempus
Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed
do eiusmod tempor.
Vestibulum congue
tempus
Lorem ipsum dolor sit amet,
consectetur adipiscing elit, sed
do eiusmod tempor.
Vestibulum congue tempus
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Ipsum dolor sit
amet elit, sed do eiusmod tempor.
And tables to compare data
A B C
Yellow 10 20 7
Blue 30 15 10
Orange 5 24 16
32
Maps
our office
33
89,526,124
Whoa! That’s a big number, aren’t you proud?
34
89,526,124$
That’s a lot of money
100%
Total success!
185,244 users
And a lot of users
35
Our process is easy
36
Vestibulum congue tempus
Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor. Donec
facilisis lacus eget mauris.
Vestibulum congue tempus
Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor. Donec
facilisis lacus eget mauris.
Vestibulum congue tempus
Lorem ipsum dolor sit amet, consectetur
adipiscing elit, sed do eiusmod tempor. Donec
facilisis lacus eget mauris.
03
01 02
Let’s review some concepts
Yellow
Is the color of gold, butter and ripe
lemons. In the spectrum of visible light,
yellow is found between green and
orange.
Blue
Is the colour of the clear sky and the
deep sea. It is located between violet
and green on the optical spectrum.
Red
Is the color of blood, and because of
this it has historically been associated
with sacrifice, danger and courage.
37
Yellow
Is the color of gold, butter and ripe
lemons. In the spectrum of visible light,
yellow is found between green and
orange.
Blue
Is the colour of the clear sky and the
deep sea. It is located between violet
and green on the optical spectrum.
Red
Is the color of blood, and because of
this it has historically been associated
with sacrifice, danger and courage.
You can insert graphs from Google Sheets
38
Mobile
project
Place your screenshot here
39
Show and explain your
web, app or software
projects using these
gadget templates.
Place your screenshot here
40
Tablet
project
Show and explain your
web, app or software
projects using these
gadget templates.
Place your screenshot here
41
Desktop
project
Show and explain your
web, app or software
projects using these
gadget templates.
Credits
Special thanks to all the people who made and released
these awesome resources for free:
- Presentation template by SlidesCarnival
- Photographs by Unsplash
42
Presentation design
This presentation uses the following typographies and colors:
- Titles: Roboto Slab
- Body copy: Abel
You can download the fonts on these pages:
https://www.fontsquirrel.com/fonts/roboto-slab
https://www.fontsquirrel.com/fonts/abel
Teal #2ac7d7 · Sky #0d7fd1 · Indigo #184de2
You don’t need to keep this slide in your presentation. It’s only here to serve you as a design guide if you
need to create new slides or download the fonts to edit the presentation in PowerPoint® 43
SlidesCarnival icons are editable shapes.
This means that you can:
● Resize them without losing
quality.
● Change line color, width and
style.
Isn’t that nice? :)
Examples:
44
Now you can use any emoji as an icon!
And of course it resizes without losing quality and you can change the color.
How? Follow Google instructions
https://twitter.com/googledocs/status/730087240156643328
✋👆👉👍👤👦👧👨👩👪💃🏃💑❤😂
😉😋😒😭👶😸🐟🍒🍔💣📌📖🔨🎃🎈
🎨🏈🏰🌏🔌🔑 and many more...
😉
45
Free templates for all your presentation needs
Ready to use,
professional and
customizable
100% free for personal
or commercial use
Blow your audience
away with attractive
visuals
For PowerPoint and
Google Slides

More Related Content

Similar to Protobuff

Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Herman Wu
 
The Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphThe Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphTrey Grainger
 
CIKB - Software Architecture Analysis Design
CIKB - Software Architecture Analysis DesignCIKB - Software Architecture Analysis Design
CIKB - Software Architecture Analysis DesignAntonio Castellon
 
eresau2015_submission_34
eresau2015_submission_34eresau2015_submission_34
eresau2015_submission_34brimstone4814
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezBig Data Spain
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsC4Media
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosaPharo
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...confluent
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...confluent
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for GraphsJean Ihm
 
Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist SoftServe
 
ppbench - A Visualizing Network Benchmark for Microservices
ppbench - A Visualizing Network Benchmark for Microservicesppbench - A Visualizing Network Benchmark for Microservices
ppbench - A Visualizing Network Benchmark for MicroservicesNane Kratzke
 
Presentation
PresentationPresentation
Presentationbutest
 
Unevenly Distributed
Unevenly DistributedUnevenly Distributed
Unevenly DistributedC4Media
 
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & AlluxioUltra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & AlluxioAlluxio, Inc.
 
The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfNeo4j
 

Similar to Protobuff (20)

Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習 Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
Azure 機器學習 - 使用Python, R, Spark, CNTK 深度學習
 
Quiz servlet
Quiz servletQuiz servlet
Quiz servlet
 
The Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge GraphThe Apache Solr Semantic Knowledge Graph
The Apache Solr Semantic Knowledge Graph
 
CIKB - Software Architecture Analysis Design
CIKB - Software Architecture Analysis DesignCIKB - Software Architecture Analysis Design
CIKB - Software Architecture Analysis Design
 
Types of computers
Types of computersTypes of computers
Types of computers
 
eresau2015_submission_34
eresau2015_submission_34eresau2015_submission_34
eresau2015_submission_34
 
HUG France - Apache Drill
HUG France - Apache DrillHUG France - Apache Drill
HUG France - Apache Drill
 
Multiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier DominguezMultiplatform Spark solution for Graph datasources by Javier Dominguez
Multiplatform Spark solution for Graph datasources by Javier Dominguez
 
ML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.jsML in the Browser: Interactive Experiences with Tensorflow.js
ML in the Browser: Interactive Experiences with Tensorflow.js
 
2014 01-ticosa
2014 01-ticosa2014 01-ticosa
2014 01-ticosa
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi and Eri...
 
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
How To Use Kafka and Druid to Tame Your Router Data (Rachel Pedreschi, Imply ...
 
PGQL: A Language for Graphs
PGQL: A Language for GraphsPGQL: A Language for Graphs
PGQL: A Language for Graphs
 
Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist Essential Data Engineering for Data Scientist
Essential Data Engineering for Data Scientist
 
NoSQL
NoSQLNoSQL
NoSQL
 
ppbench - A Visualizing Network Benchmark for Microservices
ppbench - A Visualizing Network Benchmark for Microservicesppbench - A Visualizing Network Benchmark for Microservices
ppbench - A Visualizing Network Benchmark for Microservices
 
Presentation
PresentationPresentation
Presentation
 
Unevenly Distributed
Unevenly DistributedUnevenly Distributed
Unevenly Distributed
 
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & AlluxioUltra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
Ultra Fast Deep Learning in Hybrid Cloud using Intel Analytics Zoo & Alluxio
 
The Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdfThe Neo4j Data Platform for Today & Tomorrow.pdf
The Neo4j Data Platform for Today & Tomorrow.pdf
 

More from Adrian Caetano (8)

Java script
Java scriptJava script
Java script
 
Typescript
TypescriptTypescript
Typescript
 
Web assembly
Web assemblyWeb assembly
Web assembly
 
Workers
WorkersWorkers
Workers
 
Frontend training
Frontend trainingFrontend training
Frontend training
 
Puppeteer
PuppeteerPuppeteer
Puppeteer
 
Bff and GraphQL
Bff and GraphQLBff and GraphQL
Bff and GraphQL
 
Treinamento frontend
Treinamento frontendTreinamento frontend
Treinamento frontend
 

Recently uploaded

A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Recently uploaded (20)

Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

Protobuff

  • 2. Who am I! I am Adrian Lemes - Frontend architect at ilegra - Graduated in Analysis and System Development at FATEC Senai - Started in 2012 on IT world - Experience with Arch Front (Angular, React, React Native, Vue, NodeJS, Micro-fronts, SSR, BFF, GraphQL, PWA and others) You can find me at @username 2 @adrianlemess
  • 3. Serialization and Deserialization - Protocol buffers were initially developed at Google to deal with an index server request/response protocol. - Transfer structured data in a safe way between servers - New fields could be easily introduced, and intermediate servers that didn't need to inspect the data could simply parse it and pass through the data without needing to know about all the fields 3
  • 4. “ 4 Protocol buffers are Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data – think XML or JSON, but smaller, faster, and simpler. — Google
  • 5. Protobuff - A way of serialize and deserialize data - Open source project - Platform agnostic - Serialization and deserialization in multiple API languages 5
  • 6. 1. Define message types 2. Generate code 3. Serialize/Deserialize
  • 7. 1. Define message types 2. Generate code 3. Serialize/Deserialize
  • 8. “ Messa types defines .proto files with data structure 8
  • 9. “ Message type have the key- value pairs format 9
  • 11. 1. Define message types 2. Generate code 3. Serialize/Deserialize
  • 12. “ The .proto files are compiled by protobuf into generated code 12
  • 13. Basic types - double - float - int32 - int64 - uint32 - Dictionary - Data - Array - bytes 13 - uint64 - sint32 - sint64 - fixed32 - fixed64 - sfixed32 - sfixed64 - bool - string
  • 16. 1. Define message types 2. Generate code 3. Serialize/Deserialize
  • 17. Why not XML? - Are simpler - Are 3 to 10 times smaller - Are 20 to 100 times faster - Are less ambiguous - Generate data access classes that are easier to use programmatically 17
  • 18. Interfaces to serialization and deserialization - byte[] toByteArray();: serializes the message and returns a byte array containing its raw bytes. - static Person parseFrom(byte[] data);: parses a message from the given byte array. - void writeTo(OutputStream output);: serializes the message and writes it to an OutputStream. - static Person parseFrom(InputStream input);: reads and parses a message from an InputStream. 18
  • 19. How does it work?
  • 20. Protobuff model Person 20 The binary would probably be 28 bytes long and take 100-200 nanoseconds to parse
  • 21. XML model Person 21 The XML version is at least 69 bytes if you remove whitespace, and would take around 5,000-10,000 nanoseconds to parse.
  • 22. Do NOT use for: - Data from service consumed by browser - browsers use JSON very well and optmized - JavaScript architecture - NodeJS, RN, React - JSON is native in JavaScript - Startup - JSON is faster to understand - Large packet sizes - more than 1mb by packet 22
  • 23. Worth to use: - Native mobile apps getting data - Android and Swift - Micro-services architecture with different languages - type safe messages prevents dummy mistakes - High data throughput - scale 23
  • 25. This is a slide title - Here you have a list of items - And some text - But remember not to overload your slides with content Your audience will listen to you or read the content, but won’t do both. 25
  • 26. Bring the attention of your audience over a key concept using icons or illustrations Big concept 26
  • 27. White Is the color of milk and fresh snow, the color produced by the combination of all the colors of the visible spectrum. You can also split your content Black Is the color of coal, ebony, and of outer space. It is the darkest color, the result of the absence of or complete absorption of light. 27
  • 28. In two or three columns Yellow Is the color of gold, butter and ripe lemons. In the spectrum of visible light, yellow is found between green and orange. Blue Is the colour of the clear sky and the deep sea. It is located between violet and green on the optical spectrum. Red Is the color of blood, and because of this it has historically been associated with sacrifice, danger and courage. 28
  • 29. A picture is worth a thousand words A complex idea can be conveyed with just a single still image, namely making it possible to absorb large amounts of data quickly. 29
  • 30. Want big impact? Use big image. 30
  • 31. Use diagrams to explain your ideas 31 Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Ipsum dolor sit amet elit, sed do eiusmod tempor.
  • 32. And tables to compare data A B C Yellow 10 20 7 Blue 30 15 10 Orange 5 24 16 32
  • 34. 89,526,124 Whoa! That’s a big number, aren’t you proud? 34
  • 35. 89,526,124$ That’s a lot of money 100% Total success! 185,244 users And a lot of users 35
  • 36. Our process is easy 36 Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Donec facilisis lacus eget mauris. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Donec facilisis lacus eget mauris. Vestibulum congue tempus Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor. Donec facilisis lacus eget mauris. 03 01 02
  • 37. Let’s review some concepts Yellow Is the color of gold, butter and ripe lemons. In the spectrum of visible light, yellow is found between green and orange. Blue Is the colour of the clear sky and the deep sea. It is located between violet and green on the optical spectrum. Red Is the color of blood, and because of this it has historically been associated with sacrifice, danger and courage. 37 Yellow Is the color of gold, butter and ripe lemons. In the spectrum of visible light, yellow is found between green and orange. Blue Is the colour of the clear sky and the deep sea. It is located between violet and green on the optical spectrum. Red Is the color of blood, and because of this it has historically been associated with sacrifice, danger and courage.
  • 38. You can insert graphs from Google Sheets 38
  • 39. Mobile project Place your screenshot here 39 Show and explain your web, app or software projects using these gadget templates.
  • 40. Place your screenshot here 40 Tablet project Show and explain your web, app or software projects using these gadget templates.
  • 41. Place your screenshot here 41 Desktop project Show and explain your web, app or software projects using these gadget templates.
  • 42. Credits Special thanks to all the people who made and released these awesome resources for free: - Presentation template by SlidesCarnival - Photographs by Unsplash 42
  • 43. Presentation design This presentation uses the following typographies and colors: - Titles: Roboto Slab - Body copy: Abel You can download the fonts on these pages: https://www.fontsquirrel.com/fonts/roboto-slab https://www.fontsquirrel.com/fonts/abel Teal #2ac7d7 · Sky #0d7fd1 · Indigo #184de2 You don’t need to keep this slide in your presentation. It’s only here to serve you as a design guide if you need to create new slides or download the fonts to edit the presentation in PowerPoint® 43
  • 44. SlidesCarnival icons are editable shapes. This means that you can: ● Resize them without losing quality. ● Change line color, width and style. Isn’t that nice? :) Examples: 44
  • 45. Now you can use any emoji as an icon! And of course it resizes without losing quality and you can change the color. How? Follow Google instructions https://twitter.com/googledocs/status/730087240156643328 ✋👆👉👍👤👦👧👨👩👪💃🏃💑❤😂 😉😋😒😭👶😸🐟🍒🍔💣📌📖🔨🎃🎈 🎨🏈🏰🌏🔌🔑 and many more... 😉 45
  • 46. Free templates for all your presentation needs Ready to use, professional and customizable 100% free for personal or commercial use Blow your audience away with attractive visuals For PowerPoint and Google Slides

Editor's Notes

  1. Os números no lado de cada key é um identificador único daquele chave e valor e é usado pra serializacao O repeated é pra dizer que ele valor pode ter N valores repetidos dentro do phone