SlideShare una empresa de Scribd logo
1 de 23
Simple Services
naive alternative to common patterns :


one language fits all (ok, two)


Front - Backend split, due to different skillsets
policy of maximising code reuse

=> frameworks, libraries, etc.

even when the problems are ill-fitting

over-engineering

design by comity
SSOA

Simple Service Oriented Architecture

We don’t like the name that much either, but
we got used to it.

It’s SOA, except simple... real simple...
Challenging the patterns

Not a full blown solution

Just enough rules to force a fresh look

Causing people to think before applying any
pattern

If the pattern survives the challenge, use it
Don’t build anything before you have a clearly
identified need

Applies to features, as well as complete services

While you’re not banging your keyboard, use
your brain.
Solve your problem, not what you think might
be someone else’s problem...

...or tomorrow’s problem

Solution is usually pretty lame, so temptation to
invent needs is low.
Don’t push for reuse by adding features

Wait for people to express what they’re
missing, and most often tell them to implement
themselves

But expect new needs, so don’t lock yourself in
closed quick fixes

Not obvious to find a balance, but aiming for
simplicity helps
No Side-Effects
Unless the goal is to explicitly change a state,
you’re not allowed to do it.

Treat calls to the service as algebraic functions

Allows chaining, parallelising, etc.

Keeps things dead simple
Side Effects
Sometimes you want side effects

Keep the rule in mind and feel dirty

Compensate that guilt with 2x as much
documentation

Document the obvious
No Versioning
As soon as you have a customer, you can’t
change the service

Any API change means a new service

With a negotiation from scratch

That rule is non-negotiable
HTTP is the framework
Good enough for 99% of the cases

Language agnostic

Plenty of deployment options

Real easy to debug

Easier to scale than the alternatives
Serialisation
Whatever makes sense :
XML
JSON
CSV
Text / Binary
Thrift / Protocol Buffers
Performance
Not an issue until it hurts so bad it’s the only
thing that matters
If you followed the rules, it won’t hurt
It should just be a matter of fine tuning
load balancing, keepalives, pipelining, etc.
specialised data stores, etc.
Human Aspects
We use “loaded words”
specifications form a “contract”
consumers are “clients”
the maintainer “provides a service”
the “contract” specifies a “Service Level
Agreement”, “negotiated” between “provider”
and “clients”
Human Aspects

Popular mostly with frontend people


allows them to solve their problems faster


in isolated silos
Producer often the 1st consumer

=> eat your own dog food

less bitching

better quality over time

quality meaning “fitting the requirements”
Disadvantages
Potentially mess...
Requires discipline
We encourage deploying over the load-
balancers.
Means talking to Sysadmins, who ask where the
documentation is...
And can make your life hell until you comply
Require documentation in the form of a wiki
page with
•   Description of the service
•   Named maintainer
•   Named consumers
•   LB Health Checks
•   Nagios Heatlh Checks
You build it, you own it
Being the owner of a service encourages
people to take pride

=> higher reliability
Conclusion
Naive by design
does not try to solve 100% of the problems
the 50% it does solve is solved with a 100%
match on the requirements
those 50% are solved in simple, maintainable
ways, by people taking pride in doing things
right
Frees up time / resources for the complicated
stuff

Makes developers more critical of complex
solutions
Q&A

Más contenido relacionado

Similar a Simple Services

Open Source adoption in a Mexicon Second tier Bank
Open Source adoption in a Mexicon Second tier BankOpen Source adoption in a Mexicon Second tier Bank
Open Source adoption in a Mexicon Second tier BankWSO2
 
When Things Go Bump in the Night
When Things Go Bump in the NightWhen Things Go Bump in the Night
When Things Go Bump in the Nightahamilton55
 
Boston Ruby Meetup: The promise and peril of Agile and Lean practices
Boston Ruby Meetup: The promise and peril of Agile and Lean practicesBoston Ruby Meetup: The promise and peril of Agile and Lean practices
Boston Ruby Meetup: The promise and peril of Agile and Lean practicesmtoppa
 
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesWordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesmtoppa
 
Patterns&Antipatternsof SOA
Patterns&Antipatternsof SOAPatterns&Antipatternsof SOA
Patterns&Antipatternsof SOAMohamed Samy
 
Technical Writing For Consultants
Technical Writing For ConsultantsTechnical Writing For Consultants
Technical Writing For Consultantsrlucera
 
The principles of agile development
The principles of agile developmentThe principles of agile development
The principles of agile developmentRajat Samal
 
RabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxRabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxShakuro
 
Consul: Service-oriented at Scale
Consul: Service-oriented at ScaleConsul: Service-oriented at Scale
Consul: Service-oriented at ScaleC4Media
 
SAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and DesignSAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and DesignMichael Heron
 
Basics of-software-development
Basics of-software-developmentBasics of-software-development
Basics of-software-developmentlukaramishvili
 
Identity management delegation and automation
Identity management delegation and automationIdentity management delegation and automation
Identity management delegation and automationBill Buchan
 
Rapid Product Development
Rapid Product DevelopmentRapid Product Development
Rapid Product DevelopmentZachary Beer
 
Persuasive Essay Topics Religion. Online assignment writing service.
Persuasive Essay Topics Religion. Online assignment writing service.Persuasive Essay Topics Religion. Online assignment writing service.
Persuasive Essay Topics Religion. Online assignment writing service.Nicole Barnes
 
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022Cogniter Technologies
 
The Next Five Years of Rails
The Next Five Years of RailsThe Next Five Years of Rails
The Next Five Years of RailsAlex Mercer
 
Is everything we used to do wrong?
Is everything we used to do wrong?Is everything we used to do wrong?
Is everything we used to do wrong?Russ Weakley
 
Grokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineersGrokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineers9diov
 

Similar a Simple Services (20)

Open Source adoption in a Mexicon Second tier Bank
Open Source adoption in a Mexicon Second tier BankOpen Source adoption in a Mexicon Second tier Bank
Open Source adoption in a Mexicon Second tier Bank
 
SOA Facts&Actions
SOA Facts&ActionsSOA Facts&Actions
SOA Facts&Actions
 
When Things Go Bump in the Night
When Things Go Bump in the NightWhen Things Go Bump in the Night
When Things Go Bump in the Night
 
Boston Ruby Meetup: The promise and peril of Agile and Lean practices
Boston Ruby Meetup: The promise and peril of Agile and Lean practicesBoston Ruby Meetup: The promise and peril of Agile and Lean practices
Boston Ruby Meetup: The promise and peril of Agile and Lean practices
 
SOA vs EDA
SOA vs EDASOA vs EDA
SOA vs EDA
 
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practicesWordCamp Nashville 2016: The promise and peril of Agile and Lean practices
WordCamp Nashville 2016: The promise and peril of Agile and Lean practices
 
Patterns&Antipatternsof SOA
Patterns&Antipatternsof SOAPatterns&Antipatternsof SOA
Patterns&Antipatternsof SOA
 
Technical Writing For Consultants
Technical Writing For ConsultantsTechnical Writing For Consultants
Technical Writing For Consultants
 
The principles of agile development
The principles of agile developmentThe principles of agile development
The principles of agile development
 
RabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docxRabbitMQ in Microservice Architecture.docx
RabbitMQ in Microservice Architecture.docx
 
Consul: Service-oriented at Scale
Consul: Service-oriented at ScaleConsul: Service-oriented at Scale
Consul: Service-oriented at Scale
 
SAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and DesignSAD01 - An Introduction to Systems Analysis and Design
SAD01 - An Introduction to Systems Analysis and Design
 
Basics of-software-development
Basics of-software-developmentBasics of-software-development
Basics of-software-development
 
Identity management delegation and automation
Identity management delegation and automationIdentity management delegation and automation
Identity management delegation and automation
 
Rapid Product Development
Rapid Product DevelopmentRapid Product Development
Rapid Product Development
 
Persuasive Essay Topics Religion. Online assignment writing service.
Persuasive Essay Topics Religion. Online assignment writing service.Persuasive Essay Topics Religion. Online assignment writing service.
Persuasive Essay Topics Religion. Online assignment writing service.
 
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022
Top 10 jakob nielsen’s phenomenal rules of uiux design for 2022
 
The Next Five Years of Rails
The Next Five Years of RailsThe Next Five Years of Rails
The Next Five Years of Rails
 
Is everything we used to do wrong?
Is everything we used to do wrong?Is everything we used to do wrong?
Is everything we used to do wrong?
 
Grokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineersGrokking Techtalk: Problem solving for sw engineers
Grokking Techtalk: Problem solving for sw engineers
 

Simple Services

  • 2. naive alternative to common patterns : one language fits all (ok, two) Front - Backend split, due to different skillsets
  • 3. policy of maximising code reuse => frameworks, libraries, etc. even when the problems are ill-fitting over-engineering design by comity
  • 4. SSOA Simple Service Oriented Architecture We don’t like the name that much either, but we got used to it. It’s SOA, except simple... real simple...
  • 5. Challenging the patterns Not a full blown solution Just enough rules to force a fresh look Causing people to think before applying any pattern If the pattern survives the challenge, use it
  • 6. Don’t build anything before you have a clearly identified need Applies to features, as well as complete services While you’re not banging your keyboard, use your brain.
  • 7. Solve your problem, not what you think might be someone else’s problem... ...or tomorrow’s problem Solution is usually pretty lame, so temptation to invent needs is low.
  • 8. Don’t push for reuse by adding features Wait for people to express what they’re missing, and most often tell them to implement themselves But expect new needs, so don’t lock yourself in closed quick fixes Not obvious to find a balance, but aiming for simplicity helps
  • 9. No Side-Effects Unless the goal is to explicitly change a state, you’re not allowed to do it. Treat calls to the service as algebraic functions Allows chaining, parallelising, etc. Keeps things dead simple
  • 10. Side Effects Sometimes you want side effects Keep the rule in mind and feel dirty Compensate that guilt with 2x as much documentation Document the obvious
  • 11. No Versioning As soon as you have a customer, you can’t change the service Any API change means a new service With a negotiation from scratch That rule is non-negotiable
  • 12. HTTP is the framework Good enough for 99% of the cases Language agnostic Plenty of deployment options Real easy to debug Easier to scale than the alternatives
  • 13. Serialisation Whatever makes sense : XML JSON CSV Text / Binary Thrift / Protocol Buffers
  • 14. Performance Not an issue until it hurts so bad it’s the only thing that matters If you followed the rules, it won’t hurt It should just be a matter of fine tuning load balancing, keepalives, pipelining, etc. specialised data stores, etc.
  • 15. Human Aspects We use “loaded words” specifications form a “contract” consumers are “clients” the maintainer “provides a service” the “contract” specifies a “Service Level Agreement”, “negotiated” between “provider” and “clients”
  • 16. Human Aspects Popular mostly with frontend people allows them to solve their problems faster in isolated silos
  • 17. Producer often the 1st consumer => eat your own dog food less bitching better quality over time quality meaning “fitting the requirements”
  • 18. Disadvantages Potentially mess... Requires discipline We encourage deploying over the load- balancers. Means talking to Sysadmins, who ask where the documentation is... And can make your life hell until you comply
  • 19. Require documentation in the form of a wiki page with • Description of the service • Named maintainer • Named consumers • LB Health Checks • Nagios Heatlh Checks You build it, you own it
  • 20. Being the owner of a service encourages people to take pride => higher reliability
  • 21. Conclusion Naive by design does not try to solve 100% of the problems the 50% it does solve is solved with a 100% match on the requirements those 50% are solved in simple, maintainable ways, by people taking pride in doing things right
  • 22. Frees up time / resources for the complicated stuff Makes developers more critical of complex solutions
  • 23. Q&A

Notas del editor