CN113407326A - Micro-service dividing method based on bound context - Google Patents
Micro-service dividing method based on bound context Download PDFInfo
- Publication number
- CN113407326A CN113407326A CN202110738038.9A CN202110738038A CN113407326A CN 113407326 A CN113407326 A CN 113407326A CN 202110738038 A CN202110738038 A CN 202110738038A CN 113407326 A CN113407326 A CN 113407326A
- Authority
- CN
- China
- Prior art keywords
- service
- micro
- context
- business
- case
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 38
- 230000000694 effects Effects 0.000 claims abstract description 19
- 238000010219 correlation analysis Methods 0.000 claims abstract description 8
- 238000004458 analytical method Methods 0.000 claims description 15
- 230000006870 function Effects 0.000 claims description 13
- 238000000638 solvent extraction Methods 0.000 claims description 8
- 238000010586 diagram Methods 0.000 claims description 7
- 230000001419 dependent effect Effects 0.000 claims description 5
- 238000010168 coupling process Methods 0.000 claims description 2
- 238000005859 coupling reaction Methods 0.000 claims description 2
- 238000013461 design Methods 0.000 claims description 2
- 230000003993 interaction Effects 0.000 claims description 2
- 230000008878 coupling Effects 0.000 claims 1
- 238000012986 modification Methods 0.000 description 5
- 230000004048 modification Effects 0.000 description 5
- 230000006399 behavior Effects 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 238000012804 iterative process Methods 0.000 description 1
- 230000002194 synthesizing effect Effects 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
- G06F9/4881—Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention relates to a micro-service dividing method based on bound context, belonging to the technical field of software system reconstruction. The invention comprises four steps: firstly, analyzing a service scene, combing out main service flows of the system, and acquiring the service scene of the system; secondly, describing by using an illustration, and modeling by using the illustration in a unified modeling language; thirdly, extracting context, namely extracting the context of business activity through semantic and functional correlation analysis; and fourthly, extracting the candidate micro-service, determining the context boundary and naming to obtain the candidate micro-service. The method and the system have the advantages that the single architecture system is divided into the micro-services in the process of reconstructing the direct-view software architecture, the problem that an architect excessively depends on intuition and experience to divide the micro-services in the past is solved in the software development demand stage, and objective decision suggestions are provided for the architect.
Description
Technical Field
The invention relates to a micro-service dividing method based on bound context, belonging to the technical field of software system reconstruction.
Background
In the enterprise reconfiguration process of the system, the first problem is to divide the legacy system into micro-services. The micro-service partitioning technology is a great challenge currently facing the field and is a research hotspot in academia and industry. The demand analysis is an early stage of software development, which determines the trend of software development and is a very important step. At present, no micro-service division method specially aiming at the early stage of software micro-service is found.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: the micro-service partitioning method based on the bound context solves the problem that an architect excessively depends on intuition and experience in the micro-service partitioning process.
The technical scheme adopted by the invention is as follows: a micro-service partitioning method based on bound context comprises the following steps:
1) analyzing a service scene;
2) describing by using an illustration, and modeling by using the illustration through a unified modeling language;
3) extracting context, namely extracting the context of business activity through semantic and functional correlation analysis;
4) and extracting candidate micro-services, determining context boundaries and naming to obtain the candidate micro-services.
Specifically, the step 1) is as follows:
by reading legacy system development documents and by fully communicating with developers and domain experts, legacy system information is comprehensively collected, participating roles (Who), business activities (What) and business values (Why) are cleared, and the processes and orders of completion of role and event interactions, i.e., the main business processes of the system, are combated. Different business scenes are abstracted on the basis of business processes, and the business scenes consist of a plurality of business activities. Gathering information is a very critical step due to the lack of knowledge of the structure of legacy systems.
Specifically, the step 2) is as follows:
on the basis of obtaining service scenes, analyzing the scenes by using a use case analysis method of field scene analysis to identify service activities, wherein one service activity is a use case, Modeling the service scenes by using a Unified Modeling Language (UML) use case diagram, and determining the relationship among the use cases to obtain a use case diagram model of a certain service scene. Since functional dependency analysis relies on relationships between use cases, it is briefly introduced first. The basic relationships between use cases include Generalization, containment and extension, the Generalization relationship (Generalization) represents general and special relationships; the inclusion relation (Include) is that one use case contains behaviors that other use cases have and takes the behaviors as part of the use case; extended relationships (Extend) are incremental extensions of the basic use case.
Specifically, the step 3) comprises two aspects of analysis:
1) semantic relevance analysis
And analyzing the use case description of the business activity from the semantic perspective, wherein if some use cases have the same semantic meaning, the use cases can be used as the characteristic of classification, and the semantic relevance mainly comes from the object for describing the business activity. For example, if cases are obtained to query commodities, collect commodities and share commodities, the cases have the semantics of "commodities", and based on the characteristics of semantic relevance, the cases can be considered to be classified into the same category.
2) Functional correlation analysis
Functional relevance refers to the cohesion of responsibility, and a strong correlation equates to high cohesion. The functional correlation uses a high-cohesion low-coupling design principle to analyze whether business activities are related and dependent on each other from the functional perspective, and if the related and dependent exist among the use cases, the business activities can be used as the classified characteristics. If two functions must exist simultaneously or one function is lacked and the other function is incomplete, the two functions are strongly related, otherwise, the two functions are weakly related. The method of the invention judges the strength of the functional correlation through the relationship between the use cases, if the use cases are in the inclusion relationship, the functional correlation is strong; if the use cases are in an extended relationship, the functional relevance is weak.
Specifically, the step 4) is as follows:
and synthesizing the semantic and function related analysis results, determining the context boundary and naming to obtain the candidate micro-service. The division of the bounding context is an iterative process, so this step can be viewed as a verification process of the adequacy of the refined context.
The invention has the beneficial effects that: the micro-service partitioning method based on the bound context solves the problem that an architect excessively depends on intuition and experience in the micro-service partitioning process, and can provide objective decision suggestions for companies needing to reconstruct a system.
Drawings
FIG. 1 is a schematic view of the present invention in its entirety;
FIG. 2 is a Jpetstore use case modeling diagram;
FIG. 3 is a diagram of extracting Jpetstore candidate microservice.
Detailed Description
The invention is further described below with reference to the accompanying drawings and specific embodiments.
Example (b): as shown in fig. 1-3, a micro-service partitioning method based on bound context includes the following steps:
1) analyzing a service scene;
2) describing by using an illustration, and modeling by using the illustration through a unified modeling language;
3) extracting context, namely extracting the context of business activity through semantic and functional correlation analysis;
4) and extracting candidate micro-services, determining context boundaries and naming to obtain the candidate micro-services.
The specific implementation process is as follows:
in the embodiment, a proposed method is subjected to case study by using an open source project Jpetstore on Github, wherein the Jpetstore is an electronic commerce platform for providing pet purchasing service for customers. The platform mainly comprises functions of browsing pets, adding shopping carts, ordering and purchasing and the like, and the case is applied to the research of service splitting for many times by researchers and has better representativeness. According to the proposed splitting method, the MA system jpeg store is split into microservices step by step.
Further, the step 1) is specifically as follows:
users purchase pets on the Jpetstore platform, and need to fill in information to register Jpetstore platform accounts, and the registered accounts can log in the system, inquire and modify account information, browse and purchase commodities. Through the analysis, two service scenes of registering, logging in and purchasing commodities can be obtained.
Further, the step 2) is specifically as follows:
according to the analysis of business scenes, the scenes are analyzed through a use case analysis method, and the recognition of use cases is driven by a participant (Actor). The method can obtain use case registration accounts, login accounts, account information inquiry, account information modification, commodity search, commodity browsing, shopping cart adding, shopping cart removing, shopping cart updating, order placing and order checking.
Further, the step 3) is specifically as follows:
1) semantic relevance analysis
According to the semantic correlation analysis rule, the registered account, the login account, the account information inquiry and the account information modification all have the same 'account' semantic, and the use cases can be classified into one type; the search goods and the browse goods have the semantics of 'goods', and the use cases can be classified into one category; the shopping cart adding, shopping cart removing and shopping cart updating cases all have the same 'shopping cart' semantic meaning, and the cases can be classified into one class; the order placing and order checking use cases have the same order semantics, the use cases can be classified into one type, the account information query and account information modification have the same information semantics, and the two use cases can be classified into one type.
2) Functional correlation analysis
According to the functional relevance rule, the login account use cases comprise login account use cases, account information inquiry use cases and account information modification use cases, have strong relevance and can be classified into one type; the searched commodity cases comprise browsed commodity cases, have strong correlation and can be classified into one type; the order placing case comprises checking orders, has strong correlation and can be classified into one type; adding a shopping cart case includes removing a shopping cart and updating the shopping cart, has strong correlation, and can be classified into one category.
Further, the step 4) is specifically as follows:
according to the context extraction, a registered account, a login account, account information inquiry and account information modification can be obtained as a bound context, and the bound context is named as an account service; searching and browsing the commodity as a limit context, and naming the limit context as commodity service; adding a shopping cart, removing the shopping cart and updating the shopping cart into a bound context, and naming the bound context as shopping cart service; order placement, order view, and a clearance context are named order service. FIG. 3 is a diagram illustrating a method for extracting four micro-services of an account, a commodity, a shopping cart and an order by using a dashed line.
While the present invention has been described in detail with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, and various changes can be made without departing from the spirit of the present invention within the knowledge of those skilled in the art.
Claims (5)
1. A micro-service partitioning method based on bound context is characterized in that: the method comprises the following steps:
1) analyzing a service scene;
2) describing by using an illustration, and modeling by using the illustration through a unified modeling language;
3) extracting context, namely extracting the context of business activity through semantic and functional correlation analysis;
4) and extracting candidate micro-services, determining context boundaries and naming to obtain the candidate micro-services.
2. The method of claim 1, wherein the method comprises: the step 1) is as follows:
the method comprises the steps of comprehensively collecting information of the legacy system by reading a development document of the legacy system and fully communicating with developers and field experts, clearing and participating roles Who, business activities What and business values Why, combing processes and completion sequences of role and event interaction, namely main business processes of the system, and abstracting different business scenes on the basis of the business processes, wherein the business scenes are composed of a plurality of business activities.
3. The method of claim 1, wherein the method comprises: the step 2) is as follows:
on the basis of different service scenes determined in the step 1), analyzing the scenes by using a case analysis method of field scene analysis to identify service activities, wherein one service activity is a case, Modeling the service scenes by using a Unified Modeling Language (UML) case diagram, and determining the relationship among the cases to obtain a case diagram model of a certain service scene.
4. The method of claim 1, wherein the method comprises: the step 3) is as follows:
on the basis of the case model established in the step 2), cases with the same characteristics are classified, and the cases are clustered through the following two aspects of analysis:
1) semantic relevance analysis
Analyzing the use case description of the business activity from the semantic perspective, and if some use cases have the same semantic meaning, the use cases can be used as the classified characteristics;
2) functional correlation analysis
Functional relevance refers to the cohesion of responsibility, strong relevance is equal to high cohesion, functional relevance uses a high cohesion low coupling design principle to analyze whether business activities are related and dependent with each other from the functional point of view, if the related and dependent exist between use cases, the related and dependent functions can be used as a characteristic of classification, if two functions must exist simultaneously or one function is lacked, the other function is incomplete, the two functions are strongly related, otherwise, the two functions are weakly related,
in this case, the case of grouping into one type is actually a microservice.
5. The method of claim 1, wherein the method comprises: the step 4) is as follows:
naming the identified micro-services to obtain candidate micro-services, identifying common characteristics of all business activities, and expressing the characteristics by accurate nouns.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110738038.9A CN113407326A (en) | 2021-06-30 | 2021-06-30 | Micro-service dividing method based on bound context |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110738038.9A CN113407326A (en) | 2021-06-30 | 2021-06-30 | Micro-service dividing method based on bound context |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113407326A true CN113407326A (en) | 2021-09-17 |
Family
ID=77680731
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110738038.9A Pending CN113407326A (en) | 2021-06-30 | 2021-06-30 | Micro-service dividing method based on bound context |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113407326A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116700703A (en) * | 2022-02-25 | 2023-09-05 | 腾讯科技(深圳)有限公司 | Service processing method, device, equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130159920A1 (en) * | 2011-12-20 | 2013-06-20 | Microsoft Corporation | Scenario-adaptive input method editor |
CN109804607A (en) * | 2016-07-29 | 2019-05-24 | 希尔戴克斯网络股份有限公司 | The system and method statelessly handled in fault-tolerant micro services environment |
US20200097586A1 (en) * | 2018-09-21 | 2020-03-26 | Microsoft Technology Licensing, Llc | Relevance ranking of productivity features for determined context |
-
2021
- 2021-06-30 CN CN202110738038.9A patent/CN113407326A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130159920A1 (en) * | 2011-12-20 | 2013-06-20 | Microsoft Corporation | Scenario-adaptive input method editor |
US20160299984A1 (en) * | 2011-12-20 | 2016-10-13 | Microsoft Technology Licensing, Llc | Scenario-adaptive input method editor |
CN109804607A (en) * | 2016-07-29 | 2019-05-24 | 希尔戴克斯网络股份有限公司 | The system and method statelessly handled in fault-tolerant micro services environment |
US20200097586A1 (en) * | 2018-09-21 | 2020-03-26 | Microsoft Technology Licensing, Llc | Relevance ranking of productivity features for determined context |
Non-Patent Citations (1)
Title |
---|
钟陈星 等: "限界上下文视角下的微服务粒度评估", 软件学报, vol. 30, no. 10, 4 November 2019 (2019-11-04), pages 3227 - 3240 * |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116700703A (en) * | 2022-02-25 | 2023-09-05 | 腾讯科技(深圳)有限公司 | Service processing method, device, equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
González López de Murillas et al. | Connecting databases with process mining: a meta model and toolset | |
La Rosa et al. | Merging business process models | |
CN104298771B (en) | A kind of magnanimity web daily record datas inquiry and analysis method | |
US8019771B2 (en) | Method for dynamically finding relations between database tables | |
CN106126648B (en) | It is a kind of based on the distributed merchandise news crawler method redo log | |
CN105144080A (en) | System for metadata management | |
EP1810131A2 (en) | Services oriented architecture for data integration services | |
CN101566997A (en) | Determining words related to given set of words | |
CN106991175B (en) | Customer information mining method, device, equipment and storage medium | |
US10628421B2 (en) | Managing a single database management system | |
KR101801257B1 (en) | Text-Mining Application Technique for Productive Construction Document Management | |
Skluzacek et al. | Skluma: An extensible metadata extraction pipeline for disorganized data | |
Leopold et al. | Automatic derivation of service candidates from business process model repositories | |
CN113407326A (en) | Micro-service dividing method based on bound context | |
Jaiswal et al. | Data Mining Techniques and Knowledge Discovery Database | |
CN109062551A (en) | Development Framework based on big data exploitation command set | |
Dong et al. | Teledata: data mining, social network analysis and statistics analysis system based on cloud computing in telecommunication industry | |
CN112231311A (en) | Method, system and computer readable medium for integrating cross-platform commodity data | |
Oliveira et al. | Enabling a unified view of open data catalogs | |
Trabelsi et al. | A new methodology to bring out typical users interactions in digital libraries | |
Wang et al. | 4DBInfer: A 4D Benchmarking Toolbox for Graph-Centric Predictive Modeling on Relational DBs | |
CN113609270A (en) | User behavior data analysis system capable of distinguishing clients through labels | |
US20210149864A1 (en) | Hyper-folding information in a uniform interaction feed | |
Schuchardt et al. | Applying content management to automated provenance capture | |
Qi et al. | XML-based data mining design and implementation |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |