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

Coolblue Behind the scenes - Delphi (2018-11-29, with Barnsten)

Erik Stok
November 29, 2018

Coolblue Behind the scenes - Delphi (2018-11-29, with Barnsten)

On the 29th of November 2018, Coolblue and Barnsten organised a Delphi meeting in Rotterdam, to take a look behind the scenes of Coolblue Delphi development.

As a developer of the warehouse management system team I shared experiences in transforming a monolith back office application into a service oriented application.

Erik Stok

November 29, 2018
Tweet

Other Decks in Technology

Transcript

  1. Agenda What you can expect • Our back office system

    • Our architecture • Downsides to a monolith • Approach to integrating services • Testing • Upsides/downsides to services
  2. Monolith setup - business logic Back office Model View Controller

    Stored procedures Tables Triggers Database
  3. Monolith setup - downsides Why move the monolith? • Business

    logic in the client is not shared • Business logic in the server does not scale well • Events are hard to implement • Everything is synchronous • Testing is difficult
  4. Making it service oriented Back office Model View Controller Stored

    procedures Tables Triggers Database Services Logic
  5. Services - How to How we make services • REST

    • Discoverable through Swagger • Feature toggle
  6. Integrating a service - Approach 1 Back office View Controller

    Rest Service Database Model Service class Gateway ClientDataSet DataSet
  7. Integrating a service - Approach 2 Back office View Controller

    Rest Service Database Model Service class Gateway ClientDataSet Repository
  8. Integrating a service - Approach 3 Back office View Controller

    Rest Service Database Model Service class Gateway ClientDataSet
  9. Integrating a service - Approach 1 What to build •

    Create gateway (using OpenApi) ◦ Create Api classes ◦ Create gateway class • Create feature toggle • Create service class • Make the model use the service class ◦ Set up service class ◦ Use service class based on toggle
  10. Testing - Challenges How to get testing implemented • REST

    Service can be tested • Service class can be tested • Mapper can be tested • Repository integration tests • Gateway integration tests • Adjusting the framework for dependency injection
  11. Downsides to services What are the downsides? • Development setup

    becomes less easy • Breaking contracts/versioning
  12. Upsides to services Did we get rid of the downsides

    of the monolith? • Business logic in the client can be moved to the service • Business logic in the server can be moved to the service • Events can be started from the service • The service can operate asynchronous • Testing of business logic is covered in the service