CN107171877B - Method and device for creating CF service instance - Google Patents

Method and device for creating CF service instance Download PDF

Info

Publication number
CN107171877B
CN107171877B CN201710618441.1A CN201710618441A CN107171877B CN 107171877 B CN107171877 B CN 107171877B CN 201710618441 A CN201710618441 A CN 201710618441A CN 107171877 B CN107171877 B CN 107171877B
Authority
CN
China
Prior art keywords
service instance
service
creating
user
request
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.)
Active
Application number
CN201710618441.1A
Other languages
Chinese (zh)
Other versions
CN107171877A (en
Inventor
王阳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Inspur Cloud Information Technology Co Ltd
Original Assignee
Inspur Cloud Information Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Inspur Cloud Information Technology Co Ltd filed Critical Inspur Cloud Information Technology Co Ltd
Priority to CN201710618441.1A priority Critical patent/CN107171877B/en
Publication of CN107171877A publication Critical patent/CN107171877A/en
Application granted granted Critical
Publication of CN107171877B publication Critical patent/CN107171877B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/50Network service management, e.g. ensuring proper service fulfilment according to agreements
    • H04L41/5041Network service management, e.g. ensuring proper service fulfilment according to agreements characterised by the time relationship between creation and deployment of a service
    • H04L41/5051Service on demand, e.g. definition and deployment of services in real time
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for creating a CF service instance, wherein the method realizes communication between a CF and a resource pool of a service based on a service instance creating interface, then calls the service instance creating interface through a Java timing task, acquires a service instance creating request of a user, and triggers the CF to complete the creation of the service instance according to the service instance creating request. The timing task of the invention can effectively avoid the time limit problem in the process of creating the service instance, effectively solve the problem that the instance creation in various servicebrokers needs to be synchronous, and realize the asynchronous creation of the service instance without influencing the normal use of the CF. The invention changes the establishment of the service instance into asynchronous operation, is more flexible and efficient, enhances the universality and the usability of the servicebrowser, can realize the functions of cross-platform connection and the like, and has great popularization value.

Description

Method and device for creating CF service instance
Technical Field
The invention relates to the technical field of computers, information processing and the like, in particular to a method and a device for creating a CF service instance.
Background
Cf (cloud foundation) is the first open source PaaS cloud platform in the industry, which is introduced by VMware, and supports multiple frameworks, languages, runtime environments, cloud platforms, and application services, so that developers can deploy and extend application programs in seconds without worrying about any infrastructure problems. Meanwhile, the system is a distributed system which is based on Ruby on Rails and consists of a plurality of relatively independent subsystems through a message mechanism, so that the platform can be horizontally expanded in each level, and can be operated in a large-scale data center and a desktop computer, and the two systems use the same code base.
As a new generation of Cloud application platform, Cloud Foundation is specially created for private Cloud computing environments, enterprise-level data centers, and public Cloud service providers. The Cloud foundation Cloud platform can simplify the development, delivery and operation processes of modern application programs, and can significantly improve the capability of developers to deploy and operate the application programs in a Cloud environment when facing various public Cloud and private Cloud options, efficient development frameworks conforming to industry standards and application infrastructure services.
The App usually needs to rely on external services when running, such as database service, cache service, short message mail service and the like. Servicebroker is one way for apps to access services. For example, we need to access MySQL service, as long as the servicebrowser API required by the Cloud foundation is implemented. The serviceserver is a server program which realizes a set of rest api specified by the CF, and acts between the CF and the resource pool of the service, the CF manages the service resource pool by calling the specified rest api on the serviceserver, and the serviceserver actually executes the resource pool management operations.
One of the key points of the CF is the creation of a service instance, when the service instance is created, many services must be created in advance before accessing the CF, the real-time creation of the service cannot be realized, and the flexibility is greatly reduced. In addition, the CF framework provides that the CF has a 2 minute time limit at service instance creation, and that the timeout is a create timeout. In reality, service creation of many platforms is real-time, and the time limit mechanism of the CF makes cross-platform docking remote unreachable. Therefore, a flexible way to solve the above problems is needed.
Disclosure of Invention
The technical task of the invention is to provide a method and a device for creating a CF service instance aiming at the defects of the prior art, and solve the problems that the prior CF can not realize the real-time creation of the service and the cross-platform butt joint.
The technical scheme adopted by the invention for solving the technical problems is as follows:
1. the invention provides a method for creating a CF service instance, which is characterized in that communication between a CF and a resource pool of a service is realized based on a service broker service instance creating interface, then the service broker service instance creating interface is called through a Java timing task, a service instance creating request of a user is obtained, and the CF is triggered to complete the creation of the service instance according to the service instance creating request.
Optionally, the method comprises the following steps:
1) a user enters a corresponding service environment through a servicebrowser service instance creating interface to send a service instance creating request;
2) when a service instance creating request is sent, a Java timing task is triggered, a servicebrowser service instance creating interface is called, and meanwhile, the creating logic of the CF is obtained, so that the problem of triggering time limit is avoided; wherein, the creating logic of the CF is as follows:
if the service instance is successfully created within the specified time, returning information that the interface is successfully created to the CF, and performing service instance binding operation;
if the service instance is failed to be created within the specified time, returning the information of the failed operation of the creation interface to the CF, triggering an event rollback mechanism, deleting the service instance in the service environment, and deleting the service instance information in the CF;
3) and realizing real-time creation of the service instance through the Java timing task and the creating logic based on the CF, monitoring the creating process of the service instance, and returning monitoring information to the CF.
Optionally, the prescribed time does not exceed 2 minutes.
Optionally, the various platforms providing the user service instance creation request are seamlessly interfaced with the CF through extended operations of Java timing tasks.
Optionally, the resource pool of the service includes a service instance to be created and a service instance created in advance.
2. The invention provides a device for creating a CF service instance, which comprises:
the receiving unit is used for acquiring a service instance establishing request of a user;
the Java timing unit is connected with the receiving unit and used for generating a trigger signal according to the service instance establishing request of the user and enabling the trigger signal to work with the service instance establishing request of the user in a coordinated manner according to the specified time and the establishing logic;
the monitoring unit is connected with the Java timing unit and is used for feeding back the service instance creating information of the user to the CF;
the creating unit is connected with the monitoring unit and used for sending the service instance creating request of the user to the CF if the service instance is successfully created within the specified time, and the CF creates the service according to the service instance creating request of the user;
the event rollback unit is connected with the monitoring unit and used for controlling the service instance creation request of the user to rollback if the service instance is failed to be created within the specified time;
and the deleting unit is connected with the monitoring unit and used for deleting the service instance in the service environment and deleting the service instance information in the CF simultaneously if the service instance is failed to be created within the specified time.
Optionally, the method further comprises:
and the pre-creation unit is used for pre-creating the service instance in the resource pool of the service.
Compared with the prior art, the method and the device for creating the CF service instance have the following beneficial effects that:
the method can effectively solve the problem that the instance creation in various servicebrokers needs to be synchronous, and does not influence the normal use of the CF while creating the service instance asynchronously. Before the invention, the creation time of the service instance in the CF is specified to be 2 minutes and the logic is synchronous operation, the time limit problem can be effectively avoided through the timing task in the invention, the creation of the service instance is changed into asynchronous operation, the method is more flexible and efficient, meanwhile, the universality and usability of the servicebrowser are enhanced, and the functions of cross-platform connection and the like can also be realized. Therefore, the utility model has great popularization value.
Drawings
FIG. 1 is a flow diagram of a method of creating a CF service instance in accordance with the present invention;
fig. 2 is a schematic structural diagram of an apparatus for creating CF service instances according to the present invention.
Detailed Description
The following detailed description of a method and an apparatus for creating a CF service instance according to the present invention is provided with reference to fig. 1.
Example one
The method for creating the CF service instance realizes the communication between the CF and the resource pool of the service based on the service broker service instance creating interface, then calls the service instance creating interface through a Java timing task, acquires the service instance creating request of a user, and triggers the CF to complete the creation of the service instance according to the service instance creating request.
As shown in fig. 1, a method for creating a CF service instance of the present invention comprises the following steps:
1) a user enters a corresponding service environment through a servicebrowser service instance creating interface to send a service instance creating request;
2) when a service instance creating request is sent, a Java timing task is triggered, a servicebrowser service instance creating interface is called, and meanwhile, the creating logic of the CF is obtained, so that the problem of triggering time limit is avoided;
the key code is shown below:
Figure BDA0001361123560000031
Figure BDA0001361123560000041
3) and realizing real-time creation of the service instance through the Java timing task and the creating logic based on the CF, monitoring the creating process of the service instance, and returning monitoring information to the CF. Wherein, the creating logic of the CF is as follows:
if the service instance is successfully created within the specified time, returning information that the interface is successfully created to the CF, and performing service instance binding operation;
if the service instance is failed to be created within the specified time, the information that the operation of the creation interface fails is returned to the CF, an event rollback mechanism is triggered, the service instance in the service environment is deleted, and meanwhile, the service instance information in the CF is deleted.
Now the key code is shown as follows:
Figure BDA0001361123560000042
Figure BDA0001361123560000051
Figure BDA0001361123560000061
example two
On the basis of the first embodiment, the specified time of the second embodiment does not exceed 2 minutes.
EXAMPLE III
On the basis of the first embodiment or the second embodiment, the third embodiment Java timing task can be extended, and various platforms providing user service instance creation requests are seamlessly interfaced with the CF through the extended operation of the Java timing task.
Example four
On the basis of the first, second or third embodiment, the resource pool of the service according to the fourth embodiment includes the service instance to be created and the service instance created in advance.
EXAMPLE five
As shown in fig. 2, an apparatus for creating a CF service instance according to the present invention includes:
the receiving unit is used for acquiring a service instance establishing request of a user;
the Java timing unit is connected with the receiving unit and used for generating a trigger signal according to the service instance establishing request of the user and enabling the trigger signal to work with the service instance establishing request of the user in a coordinated manner according to the specified time and the establishing logic;
the monitoring unit is connected with the Java timing unit and is used for feeding back the service instance creating information of the user to the CF;
the creating unit is connected with the monitoring unit and used for sending the service instance creating request of the user to the CF if the service instance is successfully created within the specified time, and the CF creates the service according to the service instance creating request of the user;
the event rollback unit is connected with the monitoring unit and used for controlling the service instance creation request of the user to rollback if the service instance is failed to be created within the specified time;
and the deleting unit is connected with the monitoring unit and used for deleting the service instance in the service environment and deleting the service instance information in the CF simultaneously if the service instance is failed to be created within the specified time.
EXAMPLE six
On the basis of the fifth embodiment, the sixth embodiment further includes: and the pre-creation unit is used for pre-creating the service instance in the resource pool of the service.
The invention completes the asynchronous establishment of the CF service instance by the service broker service instance establishment interface and combining with the Java timing task technology, monitors the information in the establishment process, successfully solves the time limit problem of the CF when establishing the service instance, can realize the connection of multiple platforms while solving the time limit problem of the CF service instance establishment, and does not worry about a series of problems caused by the failure of the instance establishment through the event rollback mechanism in the invention, thereby ensuring that the service broker development of the CF is more agile and simple.
While the preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present application without departing from the spirit and scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is intended to include such modifications and variations as well.
In addition to the technical features described in the specification, the technology is known to those skilled in the art.

Claims (6)

1. A method for establishing a CF service instance is characterized in that the method realizes communication between a CF and a resource pool of a service based on a service instance establishing interface, then calls the service instance establishing interface through a Java timing task, acquires a service instance establishing request of a user, and triggers the CF to complete establishment of the service instance according to the service instance establishing request;
the method is realized based on the following units:
the receiving unit is used for acquiring a service instance establishing request of a user;
the Java timing unit is connected with the receiving unit and used for generating a trigger signal according to the service instance establishing request of the user and enabling the trigger signal to work with the service instance establishing request of the user in a coordinated manner according to the specified time and the establishing logic;
the monitoring unit is connected with the Java timing unit and is used for feeding back the service instance creating information of the user to the CF;
the creating unit is connected with the monitoring unit and used for sending the service instance creating request of the user to the CF if the service instance is successfully created within the specified time, and the CF creates the service according to the service instance creating request of the user;
the event rollback unit is connected with the monitoring unit and used for controlling the service instance creation request of the user to rollback if the service instance is failed to be created within the specified time;
the deleting unit is connected with the monitoring unit and used for deleting the service instance in the service environment and deleting the service instance information in the CF if the service instance is failed to be created within the specified time;
the method specifically comprises the following steps:
1) a user enters a corresponding service environment through a servicebrowser service instance creating interface to send a service instance creating request;
2) when a service instance creating request is sent out, a Java timing task is triggered, a servicebrowser service instance creating interface is called, and meanwhile, the creating logic of the CF is obtained; wherein, the creating logic of the CF is as follows:
if the service instance is successfully created within the specified time, returning information that the interface is successfully created to the CF, and performing service instance binding operation;
if the service instance is failed to be created within the specified time, returning the information of the failed operation of the creation interface to the CF, triggering an event rollback mechanism, deleting the service instance in the service environment, and deleting the service instance information in the CF;
3) and realizing real-time creation of the service instance through the Java timing task and the creating logic based on the CF, monitoring the creating process of the service instance, and returning monitoring information to the CF.
2. The method of claim 1, wherein said specified time is no more than 2 minutes.
3. The method of claim 1, wherein the various platforms providing the user service instance creation request are seamlessly interfaced with the CF through extended operations of Java timing tasks.
4. The method of claim 1, wherein the service's resource pool comprises service instances to be created and service instances created in advance.
5. An apparatus for creating a CF service instance, comprising:
the receiving unit is used for acquiring a service instance establishing request of a user;
the Java timing unit is connected with the receiving unit and used for generating a trigger signal according to the service instance establishing request of the user and enabling the trigger signal to work with the service instance establishing request of the user in a coordinated manner according to the specified time and the establishing logic;
the monitoring unit is connected with the Java timing unit and is used for feeding back the service instance creating information of the user to the CF;
the creating unit is connected with the monitoring unit and used for sending the service instance creating request of the user to the CF if the service instance is successfully created within the specified time, and the CF creates the service according to the service instance creating request of the user;
the event rollback unit is connected with the monitoring unit and used for controlling the service instance creation request of the user to rollback if the service instance is failed to be created within the specified time;
and the deleting unit is connected with the monitoring unit and used for deleting the service instance in the service environment and deleting the service instance information in the CF simultaneously if the service instance is failed to be created within the specified time.
6. The apparatus of claim 5, further comprising:
and the pre-creation unit is used for pre-creating the service instance in the resource pool of the service.
CN201710618441.1A 2017-07-26 2017-07-26 Method and device for creating CF service instance Active CN107171877B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710618441.1A CN107171877B (en) 2017-07-26 2017-07-26 Method and device for creating CF service instance

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710618441.1A CN107171877B (en) 2017-07-26 2017-07-26 Method and device for creating CF service instance

Publications (2)

Publication Number Publication Date
CN107171877A CN107171877A (en) 2017-09-15
CN107171877B true CN107171877B (en) 2020-07-07

Family

ID=59817445

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710618441.1A Active CN107171877B (en) 2017-07-26 2017-07-26 Method and device for creating CF service instance

Country Status (1)

Country Link
CN (1) CN107171877B (en)

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101420344A (en) * 2008-12-12 2009-04-29 北京邮电大学 Network performance automatic evaluation method based on Java and database
CN101604242A (en) * 2009-07-17 2009-12-16 深圳市珍爱网信息技术有限公司 Realize the system of timed task in the Java application system
CN102123079B (en) * 2010-12-31 2013-12-18 华为技术有限公司 Method and device for processing transaction message
US20120204187A1 (en) * 2011-02-08 2012-08-09 International Business Machines Corporation Hybrid Cloud Workload Management
US9128773B2 (en) * 2011-02-25 2015-09-08 International Business Machines Corporation Data processing environment event correlation
CN103605575B (en) * 2013-11-18 2017-10-13 深圳市远行科技股份有限公司 A kind of Cloud Foundry platform applications dispatch system and method
CN104090810B (en) * 2014-07-29 2017-07-14 中国航空无线电电子研究所 A kind of core frame integrated approach based on software communication architectural framework
CN104461744B (en) * 2014-12-18 2018-01-19 曙光云计算技术有限公司 A kind of resource allocation methods and device
CN105357045B (en) * 2015-11-20 2019-09-17 曙光云计算集团有限公司 A kind of cloud platform service creating method and device
CN106445512B (en) * 2016-09-12 2019-07-02 浪潮软件股份有限公司 A method of realizing running environment dynamic retractility

Also Published As

Publication number Publication date
CN107171877A (en) 2017-09-15

Similar Documents

Publication Publication Date Title
EP3138000B1 (en) System and method for supporting common transaction identifier (xid) optimization in a transactional environment
US11249794B2 (en) Client controlled transaction processing involving a plurality of participants
CN109800083B (en) Method, device, system and storage medium for micro-service collaborative call
US20160092296A1 (en) Resource manager failure handling in a multi-process transaction environment
CN103077034B (en) hybrid virtualization platform JAVA application migration method and system
US8938490B2 (en) System and method for accessing mainframe system automation from a process automation application
WO2023093016A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
US10169027B2 (en) Upgrade of an operating system of a virtual machine
CN111770176B (en) Traffic scheduling method and device
CN111338834B (en) Data storage method and device
US9912731B2 (en) Dynamic transaction coordination
CN114090113B (en) Method, device, equipment and storage medium for dynamically loading data source processing plug-in
GB2604203A (en) Managing failures in edge computing environments
CN107734050B (en) Load machine distribution method, computing equipment and load machine distribution system
CN111240686B (en) Cloud compiling method and system, terminal device, cloud server and storage medium
CN107171877B (en) Method and device for creating CF service instance
CN104461719A (en) Pseudo interrupt expanding method for partition operating system
US20220276901A1 (en) Batch processing management
CN115098469A (en) Database migration method and device, electronic equipment and readable storage medium
CN113010280A (en) Distributed task processing method, system, device, equipment and medium
CN115599507A (en) Data processing method, execution workstation, electronic device and storage medium
CN113781154A (en) Information rollback method, system, electronic equipment and storage medium
CN107038043B (en) Method and device for dynamically reading cloud platform configuration file
US11210129B2 (en) Extended architecture as a service to integrate resource and transaction managers
CN110727898B (en) OTA website event assisted processing method, system, equipment and storage medium

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20200519

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Applicant after: Tidal Cloud Information Technology Co.,Ltd.

Address before: 450000 Henan province Zheng Dong New District of Zhengzhou City Xinyi Road No. 278 16 floor room 1601

Applicant before: ZHENGZHOU YUNHAI INFORMATION TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee after: Inspur cloud Information Technology Co., Ltd

Address before: 250100 No. 1036 Tidal Road, Jinan High-tech Zone, Shandong Province, S01 Building, Tidal Science Park

Patentee before: Tidal Cloud Information Technology Co.,Ltd.