SlideShare a Scribd company logo
eleks.comeleks.com
RPC. part 2. My Project.
Using some patterns
Improve proto types for using them in
collections
- Add Empty message type for void input or output
parameters.
- Add some repeatable types for data collections.
- Improve Client and server to use those types
- Don’t forget to add “Google.Protobuf.Custom v3.0.0-beta”
reference to Client and Server
// The request message containing the user's name.
message stringRequest {
string str = 1;
}
// The response message containing User
message User {
int32 id = 1;
string name = 2;
string surname = 3;
}
// The response message containing the USERS
message UsersCollection {
repeated User users = 1;
}
message Empty {
}
Server side code sample
//private server field
Google.Protobuf.Collections.RepeatedField<User> users;
public Task<UsersCollection> GetUserByName(stringRequest request, ServerCallContext context)
{
var reply = new UsersCollection();
var enumerator = users.GetEnumerator();
do
{
if (enumerator.Current != null)
{
if (enumerator.Current.Name == request.Str)
{
reply.Users.Add(enumerator.Current);
}
}
} while (enumerator.MoveNext());
return Task.FromResult(reply);
}
Client side code sample
var users = client.GetUserByName(new stringRequest { Str = user }).Users;
var enumerator = users.GetEnumerator();
do
{
if (enumerator.Current != null)
{
//do smth with user element
}
}
while (enumerator.MoveNext());
Online Shop sample
Interfaces
Client:
- Order a good (returns order id, or 0)
- Cancel order (by order id)
- Get my orders
Server:
- Buy, Cancel handling
- Some internal logic
Lets CODE IT!
Server Internal Logic. How to
implement?
What is Template Method?
Can we use it here?
What to do, if need to switch between
RPC and non-RPC Server ?
Need to Adapt!
Real-Time Switching (Strategy)
To Learn From:
I Strongly Recommend this book for Patterns explanation:
“Freeman Er, Freeman El - design patterns”
(clear explanation, funny)
eleks.com
Thanks!
eleks.com
Inspired by Technology.
Driven by Value.
Ad

More Related Content

What's hot (20)

Monitoring the Hashistack with Prometheus
Monitoring the Hashistack with PrometheusMonitoring the Hashistack with Prometheus
Monitoring the Hashistack with Prometheus
Grafana Labs
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATS
wallyqs
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
Codemotion
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
Vladimir Sedach
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Sneha Inguva
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
N Masahiro
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,
AAlha PaiKra
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
Zauber
 
Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12
N Masahiro
 
Subversion To Mercurial
Subversion To MercurialSubversion To Mercurial
Subversion To Mercurial
Ladislav Prskavec
 
Middleware webnextconf - 20152609
Middleware   webnextconf - 20152609Middleware   webnextconf - 20152609
Middleware webnextconf - 20152609
Christian Horsdal
 
Learn ELK in docker
Learn ELK in dockerLearn ELK in docker
Learn ELK in docker
Larry Cai
 
The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
Treasure Data, Inc.
 
Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?
inovex GmbH
 
Fluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API Details
SATOSHI TAGOMORI
 
Customising Your Own Web Framework In Go
Customising Your Own Web Framework In GoCustomising Your Own Web Framework In Go
Customising Your Own Web Framework In Go
Jonathan Gomez
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
Vladimir Sedach
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)
Marco Pas
 
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Zabbix
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
fukamachi
 
Monitoring the Hashistack with Prometheus
Monitoring the Hashistack with PrometheusMonitoring the Hashistack with Prometheus
Monitoring the Hashistack with Prometheus
Grafana Labs
 
GopherFest 2017 - Adding Context to NATS
GopherFest 2017 -  Adding Context to NATSGopherFest 2017 -  Adding Context to NATS
GopherFest 2017 - Adding Context to NATS
wallyqs
 
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
ClojureScript - Making Front-End development Fun again - John Stevenson - Cod...
Codemotion
 
The Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compilerThe Parenscript Common Lisp to JavaScript compiler
The Parenscript Common Lisp to JavaScript compiler
Vladimir Sedach
 
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)Networking and Go: An Engineer's Journey (Strangeloop 2019)
Networking and Go: An Engineer's Journey (Strangeloop 2019)
Sneha Inguva
 
Fluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshellFluentd v1.0 in a nutshell
Fluentd v1.0 in a nutshell
N Masahiro
 
network programing lab file ,
network programing lab file ,network programing lab file ,
network programing lab file ,
AAlha PaiKra
 
Non blocking io with netty
Non blocking io with nettyNon blocking io with netty
Non blocking io with netty
Zauber
 
Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12Dive into Fluentd plugin v0.12
Dive into Fluentd plugin v0.12
N Masahiro
 
Middleware webnextconf - 20152609
Middleware   webnextconf - 20152609Middleware   webnextconf - 20152609
Middleware webnextconf - 20152609
Christian Horsdal
 
Learn ELK in docker
Learn ELK in dockerLearn ELK in docker
Learn ELK in docker
Larry Cai
 
Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?Monitoring with Graylog - a modern approach to monitoring?
Monitoring with Graylog - a modern approach to monitoring?
inovex GmbH
 
Fluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API DetailsFluentd v0.14 Plugin API Details
Fluentd v0.14 Plugin API Details
SATOSHI TAGOMORI
 
Customising Your Own Web Framework In Go
Customising Your Own Web Framework In GoCustomising Your Own Web Framework In Go
Customising Your Own Web Framework In Go
Jonathan Gomez
 
Developing high-performance network servers in Lisp
Developing high-performance network servers in LispDeveloping high-performance network servers in Lisp
Developing high-performance network servers in Lisp
Vladimir Sedach
 
Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)Collect distributed application logging using fluentd (EFK stack)
Collect distributed application logging using fluentd (EFK stack)
Marco Pas
 
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Rihards Olups - Encrypting Daemon Traffic With Zabbix 3.0
Zabbix
 
Building GUI App with Electron and Lisp
Building GUI App with Electron and LispBuilding GUI App with Electron and Lisp
Building GUI App with Electron and Lisp
fukamachi
 

Viewers also liked (9)

Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
eleksdev
 
Android
AndroidAndroid
Android
donotbeevil
 
DAL
DALDAL
DAL
eleksdev
 
SDLC. QA Role
SDLC. QA RoleSDLC. QA Role
SDLC. QA Role
eleksdev
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
eleksdev
 
Adv android 1-0-cc
Adv android 1-0-ccAdv android 1-0-cc
Adv android 1-0-cc
Tiểu Khê
 
Css animation, html5 api
Css animation, html5 apiCss animation, html5 api
Css animation, html5 api
eleksdev
 
Advanced styles
Advanced stylesAdvanced styles
Advanced styles
eleksdev
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
eleksdev
 
Lecture java basics
Lecture   java basicsLecture   java basics
Lecture java basics
eleksdev
 
SDLC. QA Role
SDLC. QA RoleSDLC. QA Role
SDLC. QA Role
eleksdev
 
Lecture android best practices
Lecture   android best practicesLecture   android best practices
Lecture android best practices
eleksdev
 
Adv android 1-0-cc
Adv android 1-0-ccAdv android 1-0-cc
Adv android 1-0-cc
Tiểu Khê
 
Css animation, html5 api
Css animation, html5 apiCss animation, html5 api
Css animation, html5 api
eleksdev
 
Advanced styles
Advanced stylesAdvanced styles
Advanced styles
eleksdev
 
Android location and sensors API
Android location and sensors APIAndroid location and sensors API
Android location and sensors API
eleksdev
 
Ad

Similar to Improving rpc bkp (20)

DS-lect3.data structure in c ++ engineering
DS-lect3.data structure in c ++ engineeringDS-lect3.data structure in c ++ engineering
DS-lect3.data structure in c ++ engineering
abdopro512
 
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptxFAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
bestmoviestrailerbes
 
03-inheritance.ppt
03-inheritance.ppt03-inheritance.ppt
03-inheritance.ppt
SaiM947604
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materials
gayaramesh
 
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPETAPI en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
La Cuisine du Web
 
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
Dataconomy Media
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 Oct
Sriram Raj
 
EMC Documentum - xCP.x Updating Endpoint
EMC Documentum - xCP.x Updating EndpointEMC Documentum - xCP.x Updating Endpoint
EMC Documentum - xCP.x Updating Endpoint
Haytham Ghandour
 
Rockin' Protobuf in Ruby
Rockin' Protobuf in RubyRockin' Protobuf in Ruby
Rockin' Protobuf in Ruby
BJ Neilsen
 
xml rpc
xml rpcxml rpc
xml rpc
Varun Garg
 
Chapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part IIChapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part II
Eduardo Bergavera
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
Dhaval Jalalpara
 
Salesforce, APEX Concepts
Salesforce, APEX ConceptsSalesforce, APEX Concepts
Salesforce, APEX Concepts
Gaurish Goel
 
Java căn bản - Chapter7
Java căn bản - Chapter7Java căn bản - Chapter7
Java căn bản - Chapter7
Vince Vo
 
Functions
FunctionsFunctions
Functions
Golda Margret Sheeba J
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
ssuser562afc1
 
ExamRevision_FinalSession_C++ notes.pptx
ExamRevision_FinalSession_C++ notes.pptxExamRevision_FinalSession_C++ notes.pptx
ExamRevision_FinalSession_C++ notes.pptx
nglory326
 
Workshop1
Workshop1Workshop1
Workshop1
temkin abdlkader
 
C# p8
C# p8C# p8
C# p8
Renas Rekany
 
DS-lect3.data structure in c ++ engineering
DS-lect3.data structure in c ++ engineeringDS-lect3.data structure in c ++ engineering
DS-lect3.data structure in c ++ engineering
abdopro512
 
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptxFAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
FAIZAN JAVED BUTT_845544_assignsubmission_file_ppt VP.pptx
bestmoviestrailerbes
 
03-inheritance.ppt
03-inheritance.ppt03-inheritance.ppt
03-inheritance.ppt
SaiM947604
 
Unit iii vb_study_materials
Unit iii vb_study_materialsUnit iii vb_study_materials
Unit iii vb_study_materials
gayaramesh
 
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPETAPI en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
API en Protobuf : 3 fois mieux que le JSON par Pascal CORPET
La Cuisine du Web
 
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
DN 2017 | Big Data / Microservice Versioning | Thomas Pötter | Compris Techno...
Dataconomy Media
 
Java servlet life cycle - methods ppt
Java servlet life cycle - methods pptJava servlet life cycle - methods ppt
Java servlet life cycle - methods ppt
kamal kotecha
 
Assignment Examples Final 07 Oct
Assignment Examples Final 07 OctAssignment Examples Final 07 Oct
Assignment Examples Final 07 Oct
Sriram Raj
 
EMC Documentum - xCP.x Updating Endpoint
EMC Documentum - xCP.x Updating EndpointEMC Documentum - xCP.x Updating Endpoint
EMC Documentum - xCP.x Updating Endpoint
Haytham Ghandour
 
Rockin' Protobuf in Ruby
Rockin' Protobuf in RubyRockin' Protobuf in Ruby
Rockin' Protobuf in Ruby
BJ Neilsen
 
Chapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part IIChapter 7 - Defining Your Own Classes - Part II
Chapter 7 - Defining Your Own Classes - Part II
Eduardo Bergavera
 
Basic information of function in cpu
Basic information of function in cpuBasic information of function in cpu
Basic information of function in cpu
Dhaval Jalalpara
 
Salesforce, APEX Concepts
Salesforce, APEX ConceptsSalesforce, APEX Concepts
Salesforce, APEX Concepts
Gaurish Goel
 
Java căn bản - Chapter7
Java căn bản - Chapter7Java căn bản - Chapter7
Java căn bản - Chapter7
Vince Vo
 
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docxAssignmentACSC_424_midterm_fall_2012.pdf1  ACSC42.docx
AssignmentACSC_424_midterm_fall_2012.pdf1 ACSC42.docx
ssuser562afc1
 
ExamRevision_FinalSession_C++ notes.pptx
ExamRevision_FinalSession_C++ notes.pptxExamRevision_FinalSession_C++ notes.pptx
ExamRevision_FinalSession_C++ notes.pptx
nglory326
 
Ad

More from eleksdev (20)

Communication in android
Communication in androidCommunication in android
Communication in android
eleksdev
 
Hello android world
Hello android worldHello android world
Hello android world
eleksdev
 
Angular. presentation
Angular. presentationAngular. presentation
Angular. presentation
eleksdev
 
Frontend basics
Frontend basicsFrontend basics
Frontend basics
eleksdev
 
G rpc lection1_theory_bkp2
G rpc lection1_theory_bkp2G rpc lection1_theory_bkp2
G rpc lection1_theory_bkp2
eleksdev
 
G rpc lection1
G rpc lection1G rpc lection1
G rpc lection1
eleksdev
 
Windows service
Windows serviceWindows service
Windows service
eleksdev
 
Rpc
RpcRpc
Rpc
eleksdev
 
Aspnet core
Aspnet coreAspnet core
Aspnet core
eleksdev
 
Web service lecture
Web service lectureWeb service lecture
Web service lecture
eleksdev
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
SDLC. UX Role
SDLC. UX RoleSDLC. UX Role
SDLC. UX Role
eleksdev
 
SDLC. PM Role
SDLC. PM RoleSDLC. PM Role
SDLC. PM Role
eleksdev
 
SDLC. BA Role
SDLC. BA RoleSDLC. BA Role
SDLC. BA Role
eleksdev
 
Version control
Version controlVersion control
Version control
eleksdev
 
NoSQL basics
NoSQL basicsNoSQL basics
NoSQL basics
eleksdev
 
tsql
tsqltsql
tsql
eleksdev
 
Sql 04n edited
Sql 04n editedSql 04n edited
Sql 04n edited
eleksdev
 
SQL Grouping, Joins
SQL Grouping, JoinsSQL Grouping, Joins
SQL Grouping, Joins
eleksdev
 
SQL: Indexes, Select operator
SQL: Indexes, Select operatorSQL: Indexes, Select operator
SQL: Indexes, Select operator
eleksdev
 
Communication in android
Communication in androidCommunication in android
Communication in android
eleksdev
 
Hello android world
Hello android worldHello android world
Hello android world
eleksdev
 
Angular. presentation
Angular. presentationAngular. presentation
Angular. presentation
eleksdev
 
Frontend basics
Frontend basicsFrontend basics
Frontend basics
eleksdev
 
G rpc lection1_theory_bkp2
G rpc lection1_theory_bkp2G rpc lection1_theory_bkp2
G rpc lection1_theory_bkp2
eleksdev
 
G rpc lection1
G rpc lection1G rpc lection1
G rpc lection1
eleksdev
 
Windows service
Windows serviceWindows service
Windows service
eleksdev
 
Aspnet core
Aspnet coreAspnet core
Aspnet core
eleksdev
 
Web service lecture
Web service lectureWeb service lecture
Web service lecture
eleksdev
 
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
Continuous Delivery concept overview. Continuous Integration Systems. DevOps ...
eleksdev
 
SDLC. UX Role
SDLC. UX RoleSDLC. UX Role
SDLC. UX Role
eleksdev
 
SDLC. PM Role
SDLC. PM RoleSDLC. PM Role
SDLC. PM Role
eleksdev
 
SDLC. BA Role
SDLC. BA RoleSDLC. BA Role
SDLC. BA Role
eleksdev
 
Version control
Version controlVersion control
Version control
eleksdev
 
NoSQL basics
NoSQL basicsNoSQL basics
NoSQL basics
eleksdev
 
Sql 04n edited
Sql 04n editedSql 04n edited
Sql 04n edited
eleksdev
 
SQL Grouping, Joins
SQL Grouping, JoinsSQL Grouping, Joins
SQL Grouping, Joins
eleksdev
 
SQL: Indexes, Select operator
SQL: Indexes, Select operatorSQL: Indexes, Select operator
SQL: Indexes, Select operator
eleksdev
 

Recently uploaded (20)

Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven InsightsAndrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell: Transforming Business Strategy Through Data-Driven Insights
Andrew Marnell
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Rusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond SparkRusty Waters: Elevating Lakehouses Beyond Spark
Rusty Waters: Elevating Lakehouses Beyond Spark
carlyakerly1
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
How analogue intelligence complements AI
How analogue intelligence complements AIHow analogue intelligence complements AI
How analogue intelligence complements AI
Paul Rowe
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptxDevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
DevOpsDays Atlanta 2025 - Building 10x Development Organizations.pptx
Justin Reock
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 

Improving rpc bkp

  • 1. eleks.comeleks.com RPC. part 2. My Project. Using some patterns
  • 2. Improve proto types for using them in collections - Add Empty message type for void input or output parameters. - Add some repeatable types for data collections. - Improve Client and server to use those types - Don’t forget to add “Google.Protobuf.Custom v3.0.0-beta” reference to Client and Server
  • 3. // The request message containing the user's name. message stringRequest { string str = 1; } // The response message containing User message User { int32 id = 1; string name = 2; string surname = 3; } // The response message containing the USERS message UsersCollection { repeated User users = 1; } message Empty { }
  • 4. Server side code sample //private server field Google.Protobuf.Collections.RepeatedField<User> users; public Task<UsersCollection> GetUserByName(stringRequest request, ServerCallContext context) { var reply = new UsersCollection(); var enumerator = users.GetEnumerator(); do { if (enumerator.Current != null) { if (enumerator.Current.Name == request.Str) { reply.Users.Add(enumerator.Current); } } } while (enumerator.MoveNext()); return Task.FromResult(reply); }
  • 5. Client side code sample var users = client.GetUserByName(new stringRequest { Str = user }).Users; var enumerator = users.GetEnumerator(); do { if (enumerator.Current != null) { //do smth with user element } } while (enumerator.MoveNext());
  • 7. Interfaces Client: - Order a good (returns order id, or 0) - Cancel order (by order id) - Get my orders Server: - Buy, Cancel handling - Some internal logic
  • 9. Server Internal Logic. How to implement? What is Template Method? Can we use it here?
  • 10. What to do, if need to switch between RPC and non-RPC Server ? Need to Adapt! Real-Time Switching (Strategy)
  • 11. To Learn From: I Strongly Recommend this book for Patterns explanation: “Freeman Er, Freeman El - design patterns” (clear explanation, funny)