ThoughtWorks
  • Contact
  • Español
  • Português
  • Deutsch
  • 中文
Go to overview
  • Engineering Culture, Delivery Mindset

    Embrace a modern approach to software development and deliver value faster

    Intelligence-Driven Decision Making

    Leverage your data assets to unlock new sources of value

  • Frictionless Operating Model

    Improve your organization's ability to respond to change

    Platform Strategy

    Create adaptable technology platforms that move with your business strategy

  • Experience Design and Product Capability

    Rapidly design, deliver and evolve exceptional products and experiences

    Partnerships

    Leveraging our network of trusted partners to amplify the outcomes we deliver for our clients

Go to overview
  • Automotive
  • Cleantech, Energy and Utilities
  • Financial Services and Insurance
  • Healthcare
  • Media and Publishing
  • Not-for-profit
  • Public Sector
  • Retail and E-commerce
  • Travel and Transport
Go to overview

Featured

  • Technology

    An in-depth exploration of enterprise technology and engineering excellence

  • Business

    Keep up to date with the latest business and industry insights for digital leaders

  • Culture

    The place for career-building content and tips, and our view on social justice and inclusivity

Digital Publications and Tools

  • Technology Radar

    An opinionated guide to technology frontiers

  • Perspectives

    A publication for digital leaders

  • Digital Fluency Model

    A model for prioritizing the digital capabilities needed to navigate uncertainty

  • Decoder

    The business execs' A-Z guide to technology

All Insights

  • Articles

    Expert insights to help your business grow

  • Blogs

    Personal perspectives from ThoughtWorkers around the globe

  • Books

    Explore our extensive library

  • Podcasts

    Captivating conversations on the latest in business and tech

Go to overview
  • Application process

    What to expect as you interview with us

  • Grads and career changers

    Start your tech career on the right foot

  • Search jobs

    Find open positions in your region

  • Stay connected

    Sign up for our monthly newsletter

Go to overview
  • Conferences and Events
  • Diversity and Inclusion
  • News
  • Open Source
  • Our Leaders
  • Social Change
  • Español
  • Português
  • Deutsch
  • 中文
ThoughtWorksMenu
  • Close   ✕
  • What we do
  • Who we work with
  • Insights
  • Careers
  • About
  • Contact
  • Back
  • Close   ✕
  • Go to overview
  • Engineering Culture, Delivery Mindset

    Embrace a modern approach to software development and deliver value faster

  • Experience Design and Product Capability

    Rapidly design, deliver and evolve exceptional products and experiences

  • Frictionless Operating Model

    Improve your organization's ability to respond to change

  • Intelligence-Driven Decision Making

    Leverage your data assets to unlock new sources of value

  • Partnerships

    Leveraging our network of trusted partners to amplify the outcomes we deliver for our clients

  • Platform Strategy

    Create adaptable technology platforms that move with your business strategy

  • Back
  • Close   ✕
  • Go to overview
  • Automotive
  • Cleantech, Energy and Utilities
  • Financial Services and Insurance
  • Healthcare
  • Media and Publishing
  • Not-for-profit
  • Public Sector
  • Retail and E-commerce
  • Travel and Transport
  • Back
  • Close   ✕
  • Go to overview
  • Featured

  • Technology

    An in-depth exploration of enterprise technology and engineering excellence

  • Business

    Keep up to date with the latest business and industry insights for digital leaders

  • Culture

    The place for career-building content and tips, and our view on social justice and inclusivity

  • Digital Publications and Tools

  • Technology Radar

    An opinionated guide to technology frontiers

  • Perspectives

    A publication for digital leaders

  • Digital Fluency Model

    A model for prioritizing the digital capabilities needed to navigate uncertainty

  • Decoder

    The business execs' A-Z guide to technology

  • All Insights

  • Articles

    Expert insights to help your business grow

  • Blogs

    Personal perspectives from ThoughtWorkers around the globe

  • Books

    Explore our extensive library

  • Podcasts

    Captivating conversations on the latest in business and tech

  • Back
  • Close   ✕
  • Go to overview
  • Application process

    What to expect as you interview with us

  • Grads and career changers

    Start your tech career on the right foot

  • Search jobs

    Find open positions in your region

  • Stay connected

    Sign up for our monthly newsletter

  • Back
  • Close   ✕
  • Go to overview
  • Conferences and Events
  • Diversity and Inclusion
  • News
  • Open Source
  • Our Leaders
  • Social Change
Blogs
Select a topic
View all topicsClose
Technology 
Agile Project Management Cloud Continuous Delivery  Data Science & Engineering Defending the Free Internet Evolutionary Architecture Experience Design IoT Languages, Tools & Frameworks Legacy Modernization Machine Learning & Artificial Intelligence Microservices Platforms Security Software Testing Technology Strategy 
Business 
Financial Services Global Health Innovation Retail  Transformation 
Careers 
Career Hacks Diversity & Inclusion Social Change 
Blogs

Topics

Choose a topic
  • Technology
    Technology
  • Technology Overview
  • Agile Project Management
  • Cloud
  • Continuous Delivery
  • Data Science & Engineering
  • Defending the Free Internet
  • Evolutionary Architecture
  • Experience Design
  • IoT
  • Languages, Tools & Frameworks
  • Legacy Modernization
  • Machine Learning & Artificial Intelligence
  • Microservices
  • Platforms
  • Security
  • Software Testing
  • Technology Strategy
  • Business
    Business
  • Business Overview
  • Financial Services
  • Global Health
  • Innovation
  • Retail
  • Transformation
  • Careers
    Careers
  • Careers Overview
  • Career Hacks
  • Diversity & Inclusion
  • Social Change
MicroservicesTechnology StrategyTechnology

Microservices: using resources and business services as extensibility strategy

Bruno Quaresma Bruno Quaresma

Published: Dec 19, 2017

In this post, I want to share with you a strategy intended to improve your system’s extensibility — in other words, making your business better able to cope with future change. Of course, not everyone sees the world with the same eyes, so if you disagree with something, please share your thoughts — it will be appreciated.

Before we begin, I want to share a use case, that should make it easier to frame the concepts and the problems this article will explore.

So, we’re going to explore a fictitious start-up, that I’ll call WidgetKing. As it grows, its executives realize they need a system for managing its employee annual leave. This company decides to create a leave app that will have the employee and leave data.
Figure 1: Initial architecture
The initial architecture enables the development team to deliver rapidly.  But, over time, other applications want to consume the leave information to generate reports, dashboards and populate BI systems.

After some time thinking about those requirements, the team decides to expose the leave endpoints as an API that will be consumed by other apps and extract the leave management logic to a separate app.
Extracted Leave API
Figure 2: Extracted Leave API
Now, the architecture is able to expose the leave information to other services.

After more time, WidgetKing wants to create a new service that manages all employee benefits, including medical care, transport subsidies or insurance.

To build this new app, the team will need to use the employee data, and following the same concept of the leave API, they decide to extract the employee data from leave API to a new service. This approach avoids spreading the employee business logic through the system.
Employee resource service extracted
Figure 3: Employee resource service extracted
Now, they have clean services with a single purpose and responsibility. And it is a Resource Service.

A Resource Service is responsible for only storing and managing its own information. It doesn’t mean that you can have to stop storing supplementary data, such as leave type, but, you should be careful about the type of information that you save in this kind of service. As a rule of thumb, you should keep the minimum data possible for the service to work it to work.

Using resource services to extensibility

Now, WidgetKing expands to other countries and the employee service doesn’t support the level of data legally required in the new countries. Without this information, the company cannot generate benefits contracts and other important stuff like employee payments.

So, to resolve this situation, the tech team comes up with two options. The first is to put all those fields into the model. The second one is to create a service that will wrap up the business logic from each country.

This first option will generate a big fat model, and mean that any future change — for instance when a country wants to add some new information — it’ll increase the logic complexity. Option two will allow WidgetKing to handle different business contexts with its own specific business logic and doesn’t create a new monolithic service. It also decreases the need for changes in the common resource. Other positives are scalability and maintenance.

So the second option seems the best choice, which is how WidgetKing proceeds.
Architecture with business services
Figure 4: Architecture with business services
The new services extend the Resource Services to provide some additional functionality or information, without changing the core resource. We call these additional services Business Services or Capability Services.

The objective of a Business Service is to provide a new capability for an existent resource or additional information that is not common to other services.

So, using these patterns, we can create a platform ecosystem that provides to you and your company a fast way to develop and validate new ideas removing friction and avoiding repeated and inconsistency business logic between services.
Related blogs
Evolutionary Architecture

Microservices as an Evolutionary Architecture

Neal Ford
Rebecca Parsons
Learn more
Technology Strategy

​The CxO Guide to Microservices

Jim Highsmith
Neal Ford
Learn more
Microservices

Microservices: Lessons from the Frontline

Zhamak Dehghani
Learn more
  • What we do
  • Who we work with
  • Insights
  • Careers
  • About
  • Contact

WeChat

×
QR code to ThoughtWorks China WeChat subscription account

Media and analyst relations | Privacy policy | Modern Slavery statement ThoughtWorks| Accessibility | © 2021 ThoughtWorks, Inc.