Decouple Everything

Decouple Everything

In the recent years we have seen a shift in software architectures. The monolithic approach slowly runs out of fashion and architectural concepts like microservices, SOA, API’s and decoupling in general are getting more and more important.
This talk will look at the different “new” approaches which can deliver a big benefit to your application’s architectural design. We will also dive into the disadvantages decoupling introduces into the software stack and how to overcome them.

E44317a06f6ff5fec214d3f54f7ba432?s=128

Johannes Pichler

November 24, 2018
Tweet

Transcript

  1. Decouple everything

  2. Johannes Pichler → Web Developer since 2006 → PHP, .NET,

    Java → now working with PHP → sorry
  3. None
  4. decoupling everything ...

  5. ... means → extracting logical units → breaking dependency chains

    → defining explicit boundaries
  6. ... but → not only on architectural level → code

    libraries → asynchronous execution
  7. Big picture

  8. karriere.at back in 2016 → karriere.at website v3 (K3) →

    PHP monolith → performant web application
  9. None
  10. Microservices

  11. Microservices → Do one thing and do it well →

    small piece of software → expressive API → quickly exchangeable
  12. SOA

  13. SOA → provides services → communicates via ESB → self

    contained → often misused for monoliths
  14. RESTful

  15. RESTful → client - server architecture → stateless handling →

    caching → consistent API → multiple layers → code on demand
  16. Planning the new release → centralized database access → RESTful

    data access → same performance level
  17. What works for us

  18. Resource Handling → RESTful APIs → basic CRUD operations

  19. None
  20. Functional Requirements → abstraction of CRUD operations → trigger for

    other services → authorization
  21. None
  22. Challenges with this approach → discovery → version management →

    breaking changes
  23. API Wrapper → temporary solves discovery problems → version bundling

    of resource APIs → deployable unit
  24. None
  25. Breaking Changes

  26. None
  27. Performance

  28. Performance → 2 additional layers → HTTP requests

  29. Performance

  30. Performance

  31. Async Tasks

  32. None
  33. User Notifications → user login → fetch notifications & enqueue

    → heartbeat
  34. None
  35. Caching

  36. Decoupling Code

  37. Reasons for decoupling code → separation from third party systems

    → make changes on configuration level → avoid f*** ups
  38. Language Standards

  39. PSR-6

  40. Caching @ karriere.at

  41. None
  42. memcached

  43. Switch to Redis

  44. None
  45. What has happened?

  46. Timeouts

  47. ... but → 100% test coverage for response caches →

    100% test coverage for repository caches → handling of CacheException implemented
  48. !

  49. None
  50. Not catchable exceptions

  51. Standard not implemented correctly

  52. Outlook → new team for architecture stuff → service discovery

    → resource & functional API usage → replace certain components
  53. Conclusion

  54. Architectural → build what fits your need → and not

    what is considered cool → partial adaption is ok → keep the big picture in mind
  55. Code → testing does not prevent f*** ups → deep

    dive into used libraries → share your knowledge
  56. None
  57. We are hiring https://devland.at/jobs

  58. Thank you Johannes Pichler - @fetzi_io https://speakerdeck.com/fetzi/decouple-everything