SlideShare a Scribd company logo
1 of 9
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

More Related Content

What's hot

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
Як РНР розробник пише код на Kotlinphpfriendsclub
 
Python for web development
Python for web developmentPython for web development
Python for web developmentLuis Borbon
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the RingsAsheesh Mehdiratta
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in osGenchiLu1
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming languageTechnology Parser
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django BasicsRahilMemon5
 
Go language presentation
Go language presentationGo language presentation
Go language presentationparamisoft
 
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 MyLittleAdventuremylittleadventure
 
Robot framework
Robot frameworkRobot framework
Robot frameworkboriau
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by GoogleUttam 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) LanguageAniruddha Chakrabarti
 

What's hot (20)

Go lang
Go langGo lang
Go lang
 
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)
 
Dev + DevOps для PHP розробника
Dev + DevOps для PHP розробникаDev + DevOps для PHP розробника
Dev + DevOps для PHP розробника
 
Quality Assurance in PostgreSQL
Quality Assurance in PostgreSQLQuality Assurance in PostgreSQL
Quality Assurance in PostgreSQL
 
Як РНР розробник пише код на Kotlin
Як РНР розробник пише код на KotlinЯк РНР розробник пише код на Kotlin
Як РНР розробник пише код на Kotlin
 
Python for web development
Python for web developmentPython for web development
Python for web development
 
Robot framework - Lord of the Rings
Robot framework - Lord of the RingsRobot framework - Lord of the Rings
Robot framework - Lord of the Rings
 
Understanding how concurrency work in os
Understanding how concurrency work in osUnderstanding how concurrency work in os
Understanding how concurrency work in os
 
Slides kotlin yajug
Slides kotlin yajugSlides kotlin yajug
Slides kotlin yajug
 
An introduction to go programming language
An introduction to go programming languageAn introduction to go programming language
An introduction to go programming language
 
Python Django Basics
Python Django BasicsPython Django Basics
Python Django Basics
 
Go language presentation
Go language presentationGo language presentation
Go language presentation
 
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
 
Robot framework
Robot frameworkRobot framework
Robot framework
 
Go Programming Language by Google
Go Programming Language by GoogleGo Programming Language by Google
Go Programming Language by Google
 
Introduction to Robot Framework (external)
Introduction to Robot Framework (external)Introduction to Robot Framework (external)
Introduction to Robot Framework (external)
 
Golang (Go Programming Language)
Golang (Go Programming Language)Golang (Go Programming Language)
Golang (Go Programming Language)
 
Golang - Overview of Go (golang) Language
Golang - Overview of Go (golang) LanguageGolang - Overview of Go (golang) Language
Golang - Overview of Go (golang) Language
 
Introduction to Go-Lang
Introduction to Go-LangIntroduction to Go-Lang
Introduction to Go-Lang
 
Golang
GolangGolang
Golang
 

Similar to Boosting python web apps with protocol buffers & grpc

conjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail Clientconjoon - The Open Source Webmail Client
conjoon - The Open Source Webmail ClientThorsten Suckow-Homberg
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptxBharathYusha1
 
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 guidanceMantoshKumar79
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonEvoletTechnologiesCo
 
Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on androidRichard Chang
 
Testing and Developing gRPC APIs
Testing and Developing gRPC APIsTesting and Developing gRPC APIs
Testing and Developing gRPC APIsPostman
 
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 professionalsNilesh Sutar
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming BasicsDhana 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 developmentViach 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
 
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 3Craig Rodrigues
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web developmentNexSoftsys
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu SharmaMayank Sharma
 

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
 
Introduction to Python Programming language.pptx
Introduction to Python Programming language.pptxIntroduction to Python Programming language.pptx
Introduction to Python Programming language.pptx
 
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
 
Advantages of Python Learning | Why Python
Advantages of Python Learning | Why PythonAdvantages of Python Learning | Why Python
Advantages of Python Learning | Why Python
 
Experience protocol buffer on android
Experience protocol buffer on androidExperience protocol buffer on android
Experience protocol buffer on android
 
Testing and Developing gRPC APIs
Testing and Developing gRPC APIsTesting and Developing gRPC APIs
Testing and Developing gRPC APIs
 
1-ppt-python.ppt
1-ppt-python.ppt1-ppt-python.ppt
1-ppt-python.ppt
 
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
 
Python for All
Python for All Python for All
Python for All
 
Introduction to Python Programming Basics
Introduction  to  Python  Programming BasicsIntroduction  to  Python  Programming Basics
Introduction to Python Programming Basics
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
python-ppt.ppt
python-ppt.pptpython-ppt.ppt
python-ppt.ppt
 
Python lecture 01
Python lecture 01Python lecture 01
Python lecture 01
 
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
 
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
WebCamp 2016: Python. Вячеслав Каковский: Real-time мессенджер на Python. Осо...
 
POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE POWER OF PYTHON PROGRAMMING LANGUAGE
POWER OF PYTHON PROGRAMMING LANGUAGE
 
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
 
Basic concepts for python web development
Basic concepts for python web developmentBasic concepts for python web development
Basic concepts for python web development
 
Python presentation by Monu Sharma
Python presentation by Monu SharmaPython presentation by Monu Sharma
Python presentation by Monu Sharma
 
Why learn python in 2017?
Why learn python in 2017?Why learn python in 2017?
Why learn python in 2017?
 

More from Naren Arya

Intermediate college sanction Norms
Intermediate college sanction NormsIntermediate college sanction Norms
Intermediate college sanction NormsNaren 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 JavaScriptNaren Arya
 
Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the skyNaren 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 buildingNaren Arya
 
Julia for R programmers
Julia for R programmersJulia for R programmers
Julia for R programmersNaren Arya
 

More from Naren Arya (6)

Intermediate college sanction Norms
Intermediate college sanction NormsIntermediate college sanction Norms
Intermediate college sanction Norms
 
Go to gRPC
Go to gRPCGo to gRPC
Go to gRPC
 
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
 
Scaling Django to the sky
Scaling Django to the skyScaling Django to the sky
Scaling Django to the sky
 
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
 
Julia for R programmers
Julia for R programmersJulia for R programmers
Julia for R programmers
 

Recently uploaded

The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsMehedi Hasan Shohan
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
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
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 

Recently uploaded (20)

The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
XpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software SolutionsXpertSolvers: Your Partner in Building Innovative Software Solutions
XpertSolvers: Your Partner in Building Innovative Software Solutions
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
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
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 

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