Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices in Gett

Microservices in Gett

A talk given at RailsClub'15 by Andrey Deryabin from Evil Martians

Andrey Deryabin

September 26, 2015
Tweet

More Decks by Andrey Deryabin

Other Decks in Programming

Transcript

  1. — James Hughes “Microservice Architecture is an architectural concept that

    aims to decouple a solution by decomposing functionality into discrete services”
  2. Two phase commit 1. Voting Phase • Coordinator sends a

    can_commit? request to all participants • Each participant votes YES/NO to coordinator 2. Completion Phase • Coordinator collects votes and makes the decision • YES Participants wait for a commit! or abort! request.
  3. — Mia Hamm “Failure happens all the time. It happens

    every day in practice. What makes you better is how you react to it”
  4. Circuit Breaker require 'stoplight' stoplight = Stoplight('ping') { ping 'railsclub.ru'

    } stoplight.run # => true stoplight.color # => “green" ############## stoplight.run # => false stoplight.color # => "red"
  5. // lurker/api/v1/users-GET.json.yml --- description: user listing prefix: users management requestParameters:

    description: '' type: object responseCodes: - status: 200 successful: true description: '' responseParameters: type: array items: description: '' type: object additionalProperties: false required: [] properties: id: description: '' type: integer example: 1 name: description: '' type: string example: razum2um extensions: method: GET path_info: "/api/v1/users.json" path_params: action: index controller: api/v1/users query_params: limit: '1'
  6. Failure/Error: post :create [...] Lurker::ValidationError: Request - The property '#/'

    contains additional properties ["social_network"] outside of the schema when none are allowed in schema file:///.../lurker/api/v1/users- POST.json.yml# Response - The property '#/user/last_sign_in_at' of type String did not match the following type: null in schema file:///.../lurker/api/v1/users-POST.json.yml#
  7. — zookeeper.apache.org “ZooKeeper is a centralized service for maintaining configuration

    information, naming, providing distributed synchronization, and providing group services”