SlideShare a Scribd company logo
Boosting Python Web
Apps with Protocol
Buffers & GRPC
Naren Arya @Citrix R&D
Whoami
● Software Engineer
2 working @
Citrix R&D
● Blogger
@IMpythonist &
Medium
● Pythonista,
Gopher and Open
Source Lover
A programmer with 4 eyes
since 4th class
Why JSON is good?
JSON is good because
● It is simple
● It is well accepted
● People cannot bear with XML
● REST popularity
Why JSON is dying ?
JSON is dying
because it is
not better
than Protocol Buffers!
What are protocol buffers?
Just a format which looks exactly like Go structs
Protobuf Go struct
syntax ‘proto3’;
message Person {
string name = 1;
int32 age = 2;
}
type Person struct {
Name string
Age int32
}
What are benefits I get with Protobuf?
● Binary encoding => Less Size
● HTTP/2 compliant => Many Goodies like
Header compression
● Strict typing for checking data format
● Platform independent(Hey! JSON does this
too)
Steps for using Protobuf with Python - 1
We need to do few things before playing with Protobuf
● Install protoc compiler on any machine
● Run this command
protoc -I=$SRC_DIR --python_out=$DST_DIR
$SRC_DIR/addressbook.proto
Steps for using Protobuf with Python - 2
● Use the class file that generated
● Import respected classes in main program
Important Methods
SerializeToString(): serializes the message and returns it as a string. Note that
the bytes are binary, not text; we only use the str type as a convenient
container.
ParseFromString(data): parses a message from the given string.
Nah nah, More things are kept for Final slide!
Sneak Peek of upcoming slides:
1.Working with a real world example
2.Introducing GRPC
3.Building GRPC Servers and Clients in Python
4.Using Protobufs with GRPC to scale microservices
5.Everything is demonstrated with code!
Wait and See until then! Bye
Ad

More Related Content

What's hot (20)

Go lang
Go langGo lang
Go lang
Suelen Carvalho
 
Growing up new PostgreSQL developers (pgcon.org 2018)
Growing up new PostgreSQL developers (pgcon.org 2018)Growing up new PostgreSQL developers (pgcon.org 2018)
Growing up new PostgreSQL developers (pgcon.org 2018)
Aleksander Alekseev
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробника
phpfriendsclub
 
Quality Assurance in PostgreSQL
Quality Assurance in PostgreSQLQuality Assurance in PostgreSQL
Quality Assurance in PostgreSQL
Aleksander Alekseev
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlin
phpfriendsclub
 
Python for web development
Python for web developmentPython for web development
Python for web development
Luis Borbon
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the Rings
Asheesh Mehdiratta
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
GenchiLu1
 
Slides kotlin yajug
Slides kotlin yajugSlides kotlin yajug
Slides kotlin yajug
Bastien Ladron
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
Technology Parser
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django Basics
RahilMemon5
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
paramisoft
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
Robot framework
Robot frameworkRobot framework
Robot framework
boriau
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
Uttam Gandhi
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
Zhe Li
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
ShubhamMishra485
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
Folio3 Software
 
Golang
GolangGolang
Golang
Michael Blake
 
Growing up new PostgreSQL developers (pgcon.org 2018)
Growing up new PostgreSQL developers (pgcon.org 2018)Growing up new PostgreSQL developers (pgcon.org 2018)
Growing up new PostgreSQL developers (pgcon.org 2018)
Aleksander Alekseev
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробника
phpfriendsclub
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlin
phpfriendsclub
 
Python for web development
Python for web developmentPython for web development
Python for web development
Luis Borbon
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the Rings
Asheesh Mehdiratta
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
GenchiLu1
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
Technology Parser
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django Basics
RahilMemon5
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
paramisoft
 
The Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventureThe Go programming language - Intro by MyLittleAdventure
The Go programming language - Intro by MyLittleAdventure
mylittleadventure
 
Robot framework
Robot frameworkRobot framework
Robot framework
boriau
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
Uttam Gandhi
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
Zhe Li
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
ShubhamMishra485
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
Aniruddha Chakrabarti
 

Similar to Boosting python web apps with protocol buffers & grpc (20)

conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Client
Thorsten Suckow-Homberg
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
BharathYusha1
 
Python for students step by step guidance
Python for students step by step guidancePython for students step by step guidance
Python for students step by step guidance
MantoshKumar79
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why Python
EvoletTechnologiesCo
 
Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on android
Richard Chang
 
Testing and Developing gRPC APIs
Testing and Developing gRPC APIsTesting and Developing gRPC APIs
Testing and Developing gRPC APIs
Postman
 
1-ppt-python.ppt
1-ppt-python.ppt1-ppt-python.ppt
1-ppt-python.ppt
ssusera99a83
 
Python For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionalsPython For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionals
Nilesh Sutar
 
Python for All
Python for All Python for All
Python for All
Pragya Goyal
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
Dhana malar
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
MohammadSamiuddin10
 
Python lecture 01
Python lecture 01Python lecture 01
Python lecture 01
Tanwir Zaman
 
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
Viach Kakovskyi
 
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp
 
python programming codes detailed slide.pptx
python programming codes detailed slide.pptxpython programming codes detailed slide.pptx
python programming codes detailed slide.pptx
AishaAnwar16
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
teachersduniya.com
 
Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3
Craig Rodrigues
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
NexSoftsys
 
Python_Programming_PPT Basics of python programming language
Python_Programming_PPT   Basics of python programming languagePython_Programming_PPT   Basics of python programming language
Python_Programming_PPT Basics of python programming language
earningmoney9595
 
conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Client
Thorsten Suckow-Homberg
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
BharathYusha1
 
Python for students step by step guidance
Python for students step by step guidancePython for students step by step guidance
Python for students step by step guidance
MantoshKumar79
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why Python
EvoletTechnologiesCo
 
Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on android
Richard Chang
 
Testing and Developing gRPC APIs
Testing and Developing gRPC APIsTesting and Developing gRPC APIs
Testing and Developing gRPC APIs
Postman
 
Python For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionalsPython For All | Software Professionals, QA & DevOps professionals
Python For All | Software Professionals, QA & DevOps professionals
Nilesh Sutar
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
Dhana malar
 
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end developmentWebCamp Ukraine 2016: Instant messenger with Python. Back-end development
WebCamp Ukraine 2016: Instant messenger with Python. Back-end development
Viach Kakovskyi
 
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp
 
python programming codes detailed slide.pptx
python programming codes detailed slide.pptxpython programming codes detailed slide.pptx
python programming codes detailed slide.pptx
AishaAnwar16
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
teachersduniya.com
 
Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3Migrating python.org to buildbot 9 and python 3
Migrating python.org to buildbot 9 and python 3
Craig Rodrigues
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
NexSoftsys
 
Python_Programming_PPT Basics of python programming language
Python_Programming_PPT   Basics of python programming languagePython_Programming_PPT   Basics of python programming language
Python_Programming_PPT Basics of python programming language
earningmoney9595
 
Ad

More from Naren Arya (6)

Intermediate college sanction Norms
Intermediate college sanction NormsIntermediate college sanction Norms
Intermediate college sanction Norms
Naren Arya
 
Go to gRPC
Go to gRPCGo to gRPC
Go to gRPC
Naren Arya
 
Building Next generation progressive web apps with Isomorphic JavaScript
Building Next generation progressive  web apps with Isomorphic JavaScriptBuilding Next generation progressive  web apps with Isomorphic JavaScript
Building Next generation progressive web apps with Isomorphic JavaScript
Naren Arya
 
Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the sky
Naren Arya
 
Python and riak a perfect couple for building
Python and riak   a perfect couple for buildingPython and riak   a perfect couple for building
Python and riak a perfect couple for building
Naren Arya
 
Julia for R programmers
Julia for R programmersJulia for R programmers
Julia for R programmers
Naren Arya
 
Intermediate college sanction Norms
Intermediate college sanction NormsIntermediate college sanction Norms
Intermediate college sanction Norms
Naren Arya
 
Building Next generation progressive web apps with Isomorphic JavaScript
Building Next generation progressive  web apps with Isomorphic JavaScriptBuilding Next generation progressive  web apps with Isomorphic JavaScript
Building Next generation progressive web apps with Isomorphic JavaScript
Naren Arya
 
Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the sky
Naren Arya
 
Python and riak a perfect couple for building
Python and riak   a perfect couple for buildingPython and riak   a perfect couple for building
Python and riak a perfect couple for building
Naren Arya
 
Julia for R programmers
Julia for R programmersJulia for R programmers
Julia for R programmers
Naren Arya
 
Ad

Recently uploaded (20)

F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Ai Development Company - Telepathy Infotech
Ai Development Company - Telepathy InfotechAi Development Company - Telepathy Infotech
Ai Development Company - Telepathy Infotech
Telepathy
 
Full Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest VersionFull Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest Version
jonesmichealj2
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Microsoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptxMicrosoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptx
Mekonnen
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
AI in Business Software: Smarter Systems or Hidden Risks?
AI in Business Software: Smarter Systems or Hidden Risks?AI in Business Software: Smarter Systems or Hidden Risks?
AI in Business Software: Smarter Systems or Hidden Risks?
Amara Nielson
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Download Canva Pro 2025 PC Crack Latest Version .
Download Canva Pro 2025 PC Crack Latest Version .Download Canva Pro 2025 PC Crack Latest Version .
Download Canva Pro 2025 PC Crack Latest Version .
sadiyabibi60507
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqwML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
YumnaShahzaad
 
Best Practices for Collaborating with 3D Artists in Mobile Game Development
Best Practices for Collaborating with 3D Artists in Mobile Game DevelopmentBest Practices for Collaborating with 3D Artists in Mobile Game Development
Best Practices for Collaborating with 3D Artists in Mobile Game Development
Juego Studios
 
Change Management Models and Tools for Organizational Transformation
Change Management Models and Tools for Organizational TransformationChange Management Models and Tools for Organizational Transformation
Change Management Models and Tools for Organizational Transformation
EHA Soft Solutions
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
A Deep Dive into Odoo CRM: Lead Management, Automation & More
A Deep Dive into Odoo CRM: Lead Management, Automation & MoreA Deep Dive into Odoo CRM: Lead Management, Automation & More
A Deep Dive into Odoo CRM: Lead Management, Automation & More
SatishKumar2651
 
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
F-Secure Freedome VPN 2025 Crack Plus Activation  New VersionF-Secure Freedome VPN 2025 Crack Plus Activation  New Version
F-Secure Freedome VPN 2025 Crack Plus Activation New Version
saimabibi60507
 
Ai Development Company - Telepathy Infotech
Ai Development Company - Telepathy InfotechAi Development Company - Telepathy Infotech
Ai Development Company - Telepathy Infotech
Telepathy
 
Full Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest VersionFull Cracked Resolume Arena Latest Version
Full Cracked Resolume Arena Latest Version
jonesmichealj2
 
Creating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdfCreating Automated Tests with AI - Cory House - Applitools.pdf
Creating Automated Tests with AI - Cory House - Applitools.pdf
Applitools
 
Tools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google CertificateTools of the Trade: Linux and SQL - Google Certificate
Tools of the Trade: Linux and SQL - Google Certificate
VICTOR MAESTRE RAMIREZ
 
Microsoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptxMicrosoft Excel Core Points Training.pptx
Microsoft Excel Core Points Training.pptx
Mekonnen
 
PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025PDF Reader Pro Crack Latest Version FREE Download 2025
PDF Reader Pro Crack Latest Version FREE Download 2025
mu394968
 
AI in Business Software: Smarter Systems or Hidden Risks?
AI in Business Software: Smarter Systems or Hidden Risks?AI in Business Software: Smarter Systems or Hidden Risks?
AI in Business Software: Smarter Systems or Hidden Risks?
Amara Nielson
 
Exploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the FutureExploring Wayland: A Modern Display Server for the Future
Exploring Wayland: A Modern Display Server for the Future
ICS
 
Download Canva Pro 2025 PC Crack Latest Version .
Download Canva Pro 2025 PC Crack Latest Version .Download Canva Pro 2025 PC Crack Latest Version .
Download Canva Pro 2025 PC Crack Latest Version .
sadiyabibi60507
 
WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)WinRAR Crack for Windows (100% Working 2025)
WinRAR Crack for Windows (100% Working 2025)
sh607827
 
Download YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full ActivatedDownload YouTube By Click 2025 Free Full Activated
Download YouTube By Click 2025 Free Full Activated
saniamalik72555
 
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqwML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
ML-Topic1A.ppteeweqeqeqeqeqeqwewqqwwqeeqeqw
YumnaShahzaad
 
Best Practices for Collaborating with 3D Artists in Mobile Game Development
Best Practices for Collaborating with 3D Artists in Mobile Game DevelopmentBest Practices for Collaborating with 3D Artists in Mobile Game Development
Best Practices for Collaborating with 3D Artists in Mobile Game Development
Juego Studios
 
Change Management Models and Tools for Organizational Transformation
Change Management Models and Tools for Organizational TransformationChange Management Models and Tools for Organizational Transformation
Change Management Models and Tools for Organizational Transformation
EHA Soft Solutions
 
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software DevelopmentSecure Test Infrastructure: The Backbone of Trustworthy Software Development
Secure Test Infrastructure: The Backbone of Trustworthy Software Development
Shubham Joshi
 
Landscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature ReviewLandscape of Requirements Engineering for/by AI through Literature Review
Landscape of Requirements Engineering for/by AI through Literature Review
Hironori Washizaki
 
Top 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdfTop 10 Data Cleansing Tools for 2025.pdf
Top 10 Data Cleansing Tools for 2025.pdf
AffinityCore
 
Not So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java WebinarNot So Common Memory Leaks in Java Webinar
Not So Common Memory Leaks in Java Webinar
Tier1 app
 
A Deep Dive into Odoo CRM: Lead Management, Automation & More
A Deep Dive into Odoo CRM: Lead Management, Automation & MoreA Deep Dive into Odoo CRM: Lead Management, Automation & More
A Deep Dive into Odoo CRM: Lead Management, Automation & More
SatishKumar2651
 

Boosting python web apps with protocol buffers & grpc

  • 1. Boosting Python Web Apps with Protocol Buffers & GRPC Naren Arya @Citrix R&D
  • 2. Whoami ● Software Engineer 2 working @ Citrix R&D ● Blogger @IMpythonist & Medium ● Pythonista, Gopher and Open Source Lover A programmer with 4 eyes since 4th class
  • 3. Why JSON is good? JSON is good because ● It is simple ● It is well accepted ● People cannot bear with XML ● REST popularity
  • 4. Why JSON is dying ? JSON is dying because it is not better than Protocol Buffers!
  • 5. What are protocol buffers? Just a format which looks exactly like Go structs Protobuf Go struct syntax ‘proto3’; message Person { string name = 1; int32 age = 2; } type Person struct { Name string Age int32 }
  • 6. What are benefits I get with Protobuf? ● Binary encoding => Less Size ● HTTP/2 compliant => Many Goodies like Header compression ● Strict typing for checking data format ● Platform independent(Hey! JSON does this too)
  • 7. Steps for using Protobuf with Python - 1 We need to do few things before playing with Protobuf ● Install protoc compiler on any machine ● Run this command protoc -I=$SRC_DIR --python_out=$DST_DIR $SRC_DIR/addressbook.proto
  • 8. Steps for using Protobuf with Python - 2 ● Use the class file that generated ● Import respected classes in main program Important Methods SerializeToString(): serializes the message and returns it as a string. Note that the bytes are binary, not text; we only use the str type as a convenient container. ParseFromString(data): parses a message from the given string.
  • 9. Nah nah, More things are kept for Final slide! Sneak Peek of upcoming slides: 1.Working with a real world example 2.Introducing GRPC 3.Building GRPC Servers and Clients in Python 4.Using Protobufs with GRPC to scale microservices 5.Everything is demonstrated with code! Wait and See until then! Bye