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

Service-oriented architecture

Service-oriented architecture

A modular style to software development is based on the use of distributed, loosely coupled, replaceable components.

Shalva Usubov

April 07, 2013
Tweet

More Decks by Shalva Usubov

Other Decks in Programming

Transcript

  1. Issues monolithic applications • Complexity • Hard deploy • Hard

    use new tools (DB, languages, etc.) • Scale team size • Changes are typically expensive
  2. What is it SOA? • A modular style to software

    development is based on the use of distributed, loosely coupled, replaceable components. • The fundamental concept of an SOA is that each component of the system is broken up into network-accessible services, which are integrated to make a functioning application.
  3. Rails application with multiple services End user High level domain

    logic Service 1 Domain logic Database Service 2 Domain logic Database Service N Domain logic Database
  4. SOA advantages over monolithic application • Isolation • Robustness •

    Scalability • Agility • Interoperability • Reuse
  5. Robustness • Implementation can be changed without the API consumer’s

    knowledge. • Example: Changing libraries, database or even languages.
  6. Scalability • Easy to scale portions of application individually. •

    Can be handled on a case-by-case instead of requiring optimization of a single database for all cases. • Easier to scale team size.
  7. Agility • New services can be implemented outside the full

    architecture. • Service interface should be versioned. “/api/v1/users/:id” • Design includes the ability to run multiple versions of a service simultaneously. “/api/v1/users/:id” and “/api/v2/users/:id”
  8. Interoperability • Prevents being tied to a specific implementation. •

    Services ease interoperation with internal and external systems and with systems written in languages other than Ruby.
  9. Reuse • Service-oriented design enables reuse of components across multiple

    applications or clients. • If services are created for internal use, they can be exposed later to the public.
  10. Converting to Services • Partitioning on Iteration Speed • Partitioning

    on Logical Function • Partitioning on Read/Write Frequencies • Partitioning on Join Frequency
  11. What we need to learn • RESTful-Oriented Architecture • HTTP

    Methods • HTTP Caching • MIME types • I/O, Threading, and Parallelism • Amazon AWS • Create clients • Testing and Mocking Service Calls • Load Balancing • Security • Web Hooks • Chef • Typhoeus
  12. Debug • Efficiency 2.0 Ops Middleware - track distributed transactions

    across its Ruby- based service oriented architecture • Monitoring tool.
  13. Development • Use stub mode in clients in development environment.

    • Disable stub mode when develop service.
  14. Tests • Test client with service • Test application with

    stubbed service • Test the full stack