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

Micro services as architectural concept

Micro services as architectural concept

What are micro services, some history and how we use it in Aimeos

Aimeos

May 09, 2016
Tweet

More Decks by Aimeos

Other Decks in Programming

Transcript

  1. Micro services as
    architectural concept

    View full-size slide

  2. Previous applications
    architectures

    View full-size slide

  3. “Spaghetti”

    View full-size slide

  4. Function 2
    Function 3
    Function ...
    Application
    Function 5
    Function 4
    Function 1

    View full-size slide

  5. Objekt oriented

    View full-size slide

  6. Object 1
    - Data
    - Methods
    Object 1
    - Data
    - Methods
    Object ...
    - Data
    - Methods
    Application

    View full-size slide

  7. Layer 1.3
    Layer 1.2
    Layer 1.1
    Layer 2.2
    Layer 2.1
    Application

    View full-size slide

  8. Similarity:
    Deployment monoliths

    View full-size slide

  9. Micro services

    View full-size slide

  10. Single, independent
    applications

    View full-size slide

  11. Layer 2.2
    Layer 2.1
    Layer 1.3
    Layer 1.2
    Layer 1.1
    Application 1 Application 2

    View full-size slide

  12. Requirement:
    Domain driven design

    View full-size slide

  13. Layer 1.3
    Layer 1.2
    Layer 1.1
    Layer 2.2
    Layer 2.1
    Layer 3.4
    Layer 3.4
    Layer 3.1
    Layer 3.2
    Domain 1 Domain 3 Domain 3

    View full-size slide

  14. Micro services
    in “real life”

    View full-size slide

  15. Domäne 3
    Domain 1
    Domain 2
    Domain 5
    Domain 4
    Domain 3
    Bounded contexts

    View full-size slide

  16. Interfaces and
    data exchange

    View full-size slide

  17. Domain 1
    Domain 5
    Format?
    Versioning?
    Compatibility?
    Fault tolerance?
    Number of calls?
    Common
    data model?

    View full-size slide

  18. Shared kernel

    View full-size slide

  19. Domain 1
    Data model
    Domain 3

    View full-size slide

  20. Best case
    ● Work independently from each other
    ● Extendable by different teams
    ● Exchangeable
    ● Scalable

    View full-size slide

  21. Worst case
    ● Erros are even harder to find
    ● Increased total complexity
    ● Performance suffers
    ● Cascading outages

    View full-size slide

  22. E-Commerce components
    for integration into
    applications

    View full-size slide

  23. Config
    Data access
    JQAdm JQuery
    Frontend
    client
    List
    ...
    Basket
    Admin
    controller
    Frontend
    controller
    PHP
    I18n
    Config
    Database
    View
    Logger
    Session
    Bandend application
    Frontend application
    ExtAdm
    JsonAdm
    ExtJS
    JSON API

    View full-size slide

  24. Data domains

    View full-size slide

  25. Product
    Catalog
    Index
    Order
    ...
    16 Datendomänen
    Data access

    View full-size slide

  26. Separation into stacks
    for micro services

    View full-size slide

  27. Config
    List
    Client
    ...
    Client
    Cntl
    ...
    Cntl
    Product
    ...
    Order
    ...
    Basket
    By domain

    View full-size slide

  28. Frontend
    client
    List
    ...
    Basket
    Frontend
    controller
    Data access
    By use case
    Config
    JQuery
    JQAdm
    ExtAdm
    JsonAdm
    Cntl
    Cntl
    Cntl
    Data
    Data
    Data
    ExtJS
    JSON API

    View full-size slide

  29. Frontend
    client
    List
    ...
    Basket
    Frontend
    controller
    Data access
    With shared kernel
    JQuery
    JQAdm
    ExtAdm
    JsonAdm
    Admin Controller
    ExtJS
    JSON API

    View full-size slide

  30. As Composer packages
    ● Aimeos core (shared kernel)
    ● HTML client (frontend)
    ● JQAdm (JQuery admin)
    ● ExtAdm (ExtJS admin)
    ● JsonAdm (JSON admin API)
    ● Jobs (cronjob controller)

    View full-size slide

  31. Open
    questions

    View full-size slide

  32. Further separation?
    Frontend?
    Shared admin controller?

    View full-size slide

  33. Best size for
    micro services?

    View full-size slide

  34. Aimeos
    aimeos.org
    Twitter: @aimeos
    facebook.com/Aimeos

    View full-size slide