tuinordic monolith to microservices with contentful
TRANSCRIPT
![Page 1: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/1.jpg)
From Enterprise Monolith to Microservices
with Contentful Emil Wiklund, TUI Nordic David Fuchslin, Valtech
Contentful Meetup, Stockholm27 September 2017
![Page 2: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/2.jpg)
Introductions are in order...
• Emil Wiklund, David Fuchslin - Team CMS
• TUI Nordic: tui.se | tui.dk | tui.no | tui.fi
• TUI Group:- 30 million customers from 31 source markets travelling to 180 destinations - 136 airplanes- 300 hotels- 13 cruise ships
![Page 3: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/3.jpg)
The "Monolith"
![Page 4: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/4.jpg)
The "Monolith"
• TUI Group project: "one platform for all markets"
• Hybris: CMS, PIM, hotel search, website booking
• A very large single codebase that makes it slow to deliver features to customers, slow to fix bugs, slow feature feedback
• Large monolithic solutions have too much functionality, can't be the best of everything
![Page 5: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/5.jpg)
Microservice sharding
• Sharded the Monolith into smaller services
• Teams can separately, completely own their product from data to the web
• Internal APIs can provide product content
• Hotel search, hotel configurator, checkout flow completely removed
• Partial loading of fragments on pages with widget-framework
• What's left in the monolith: CMS, PIM
![Page 6: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/6.jpg)
Why change the CMS?
• Editors want an easy-to-use solution
• Developers want freedom
• Teams want to have editable content in each of their microservices
• Reduce costs!
• Headless CMS! Contentful!
![Page 7: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/7.jpg)
Website CMS
• Start page - editorial
• "Trips and Offers" - editorial with partial dynamic
• Concept pages - mostly fully dynamic with some editorial
• Destination pages - mostly fully dynamic with little editorial
• Corporate pages - editorial
• Inspiration blog - editorial
![Page 8: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/8.jpg)
Top navigation
Hero
Text block
Dynamic hotel list
Content cards
Footer
![Page 10: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/10.jpg)
![Page 11: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/11.jpg)
Content design
• Page "components" match already-design organisms in the TUI Nordic Styleguide
• Contentful content models match the Styleguide models
• Easy to build!
![Page 12: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/12.jpg)
Architecture and Infrastructure
• Static (pre-generated) HTML using content from Contentful
• Handlebars templates (styleguide)
• Metalsmith (contentful plugin + handlebar support + nodejs = :) )
• Dynamic content loaded with javascript and edge-side includes
• Microservices hosted in VMs and docker containers onsite in our "Rocketship", can easily be moved to a cloud provider
![Page 13: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/13.jpg)
View page
![Page 14: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/14.jpg)
Generate HTML
![Page 15: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/15.jpg)
Preview
![Page 16: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/16.jpg)
Webhooks
![Page 17: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/17.jpg)
Multimarket
• 1 space per market (4 total)
• 1 shared space for common, translatable content
• Content from same space used in UAT and Production
![Page 18: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/18.jpg)
Contentful GUI
![Page 19: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/19.jpg)
UI Extensions
![Page 20: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/20.jpg)
Advantages• Contentful: good uptime, cloud-hosted, great support
• Simple json api: we can choose the tech stack as needed to render the content, serious flexibility
• Multichannel since we build the channels ourselves, we design the content model ourselves
• Multi-language out-of-the-box
• Fun to work with, stimulating, creative!
• Extensible UI to handle custom/complex types
• Integrated asset API: rescales and optimizes images
• Much faster GUI and fewer clicks than previous CMS
• Fast! We started at the beginning of May!
• High satisfaction and high productivity with the editors now!
![Page 21: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/21.jpg)
"Dis"advantages
• Build everything yourself (both good and bad)
• Content model management between spaces
![Page 22: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/22.jpg)
Next steps for us
• Other teams starting to use Contentful in their microservices
• CMS: Destination pages
• PIM migration
• Episerver migration
• Wordpress migration
![Page 23: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/23.jpg)
Summary
• Contentful was the "missing piece" for us
• We had a microservice architecture but we needed a place to store our content
• Developer-driven!
• More socks please!?
![Page 24: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/24.jpg)
Thank you!
![Page 25: Tuinordic monolith to microservices with contentful](https://reader031.vdocuments.net/reader031/viewer/2022021815/5a66f2147f8b9a59088b47a1/html5/thumbnails/25.jpg)