Micro-service Consumer-Driven Contract Generation via Usage Clustering

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing micro-service environments face challenges in keeping pace with the introduction of new consumers and their varying interpretations of API Gateways, leading to difficulties in maintaining up-to-date Consumer-Driven Contracts and automated tests, which results in decreased confidence in the effectiveness of the CDC ecosystem.

Innovation Solution

An analytical method using clustering algorithms to generate micro-service Consumer-Driven Contracts and automated tests by analyzing usage data records, identifying new usage patterns, and creating corresponding contracts and tests, thereby automating the process of maintaining CDCs and associated test data.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If manual methods are used to create and maintain Consumer-Driven Contracts and automated tests, then initial CDC setup can be completed, but the effort required to keep pace with new consumers and evolving usage patterns increases significantly

Engineering Contradiction:
ImproveAbility to adapt to new consumers and usage patternsVSAvoidComplexity of maintaining CDCs and automated tests
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The system automatically generates Consumer-Driven Contracts and automated tests by analyzing usage data from the run-time environment. The analytics engine processes usage data records, extracts features, applies clustering algorithms to identify usage patterns, and automatically creates CDCs and tests without requiring manual intervention for each new consumer or usage pattern evolution.

Inventive Principle:
Principle #25Self-service

Solution Approach 2:

The patent replaces manual mechanical processes of creating and maintaining CDCs with an automated analytical system. The system uses clustering algorithms and analytics to automatically identify usage patterns and generate corresponding CDCs and tests, substituting human effort with computational analysis.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

2Productivity

If automated CDC generation is implemented using clustering algorithms, then the ability to keep pace with new consumers improves, but the initial setup and processing complexity increases

Engineering Contradiction:
ImproveRate of generating CDCs and automated testsVSAvoidComplexity of analytics engine and clustering processing
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The analytics engine serves multiple functions: it obtains usage data records from the run-time environment, extracts features from the data, applies clustering algorithms to identify usage patterns, and generates both Consumer-Driven Contracts and automated tests. This multi-functional approach consolidates what would otherwise require separate systems into a single unified engine.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Reliability

If continuous monitoring and analysis of usage data is performed, then CDC effectiveness is maintained, but the processing time and computational resources increase

Engineering Contradiction:
ImproveEffectiveness of CDC ecosystemVSAvoidTime for data processing and analysis
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The system continuously monitors and analyzes usage data from the run-time environment to maintain up-to-date Consumer-Driven Contracts. The analytics engine operates continuously, processing usage data records as they become available, rather than performing periodic batch processing, ensuring CDCs remain current with evolving usage patterns.

Inventive Principle:
Principle #20Continuity of useful action

Data Source

PatentUS10956918B1Analytically generated micro-service consumer-driven contracts and automated tests
Publication Date: 2021.03.23 EMC IP HLDG CO LLC
  • US10956918B1 patent drawing
  • US10956918B1 patent drawing
  • US10956918B1 patent drawing

AI summary

Techniques are provided for analytically generating micro-service Consumer- Driven Contracts and automated tests. One method comprises obtaining a plurality of usage data records for consumers of a service from a run-time environment; extracting data features from the usage data records; applying a clustering algorithm to the usage data records to assign the usage data records to a given usage pattern cluster of a plurality of usage pattern clusters based on the extracted data features, wherein each of the plurality of usage pattern clusters comprises usage data records; and performing the following steps when the clustering algorithm creates a new usage pattern cluster: creating a new Consumer-Driven Contract that defines consumer expectations of the service, with respect to the new usage pattern associated with the new usage pattern cluster; and generating automated Consumer-Driven Contract tests to test the new Consumer-Driven Contract.