CN111258567B - Service code development processing method and device - Google Patents
Service code development processing method and device Download PDFInfo
- Publication number
- CN111258567B CN111258567B CN201811461099.XA CN201811461099A CN111258567B CN 111258567 B CN111258567 B CN 111258567B CN 201811461099 A CN201811461099 A CN 201811461099A CN 111258567 B CN111258567 B CN 111258567B
- Authority
- CN
- China
- Prior art keywords
- service
- code
- window
- implementation
- interface
- 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
Links
- 238000011161 development Methods 0.000 title claims abstract description 72
- 238000003672 processing method Methods 0.000 title claims abstract description 8
- 238000000034 method Methods 0.000 claims abstract description 47
- 238000012545 processing Methods 0.000 claims abstract description 17
- 230000000977 initiatory effect Effects 0.000 claims abstract description 14
- 230000006870 function Effects 0.000 claims description 22
- 238000012360 testing method Methods 0.000 claims description 8
- 239000000758 substrate Substances 0.000 claims 2
- 230000008569 process Effects 0.000 description 20
- 238000007726 management method Methods 0.000 description 13
- 238000004891 communication Methods 0.000 description 6
- 238000010276 construction Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 238000012986 modification Methods 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012856 packing Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 239000000178 monomer Substances 0.000 description 2
- 238000013459 approach Methods 0.000 description 1
- 238000000889 atomisation Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005111 flow chemistry technique Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 239000003607 modifier Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 230000000630 rising effect Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/30—Creation or generation of source code
- G06F8/33—Intelligent editors
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the application discloses a service code development processing method and a device, wherein the method provides a plug-in for a development tool, and the following processing is executed through the plug-in: creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; after receiving an operation request through the first operation option, creating a code base, and releasing the received service code to a server, so that a service calling party initiates a call to the service implementation through the service interface to obtain the service on the corresponding node. By the embodiment of the application, the service scene can be flexibly supported, the access of a new merchant can be rapidly carried out at low cost, and the code development and release based on the service granularity can be better supported.
Description
Technical Field
The present invention relates to the technical field of service code development, and in particular, to a method and an apparatus for service code development processing.
Background
In the online and offline combined business mode of 'new retail' and the like, retailers can provide information of commodity objects through online application programs (apps), and users can conduct browsing, purchasing and other actions through online apps. Meanwhile, retailers can also open off-line physical shops, and users can purchase commodity objects through the off-line physical shops. Meanwhile, the online order can be subjected to a series of processing such as shipment by an offline physical store and finally delivered to a receiving address designated by a user. However, some retailers may be limited by their own resources or capabilities, and may not be able to provide perfect shipping, distribution, etc. services for users, and even when the process of putting on shelves of goods, etc. is performed, there may be some difficulties, resulting in low efficiency, high error rate, etc. To enable such retailers to also be incorporated into a "new retail" system, the "new retail" platform may provide services to the retailers, such as standardized flow processing services, which may complete online and offline integrated sales links by purchasing the platform's services. For example, a retailer may purchase an "on-shelf" service, at which point the platform may provide the retailer with a corresponding solution, and so on.
Typically, services on a particular business link may be provided by the platform side, but as systems evolve, more and more external merchants need to cooperate with the "new retail" platform. For example, an external merchant may be able to offer "on-shelf" services and also wish to add to a "new retail" system, so that other retailers may also purchase the services offered by the external merchant to address a class of problems, and so that such external merchants may also be able to act as another source of revenue by selling such services.
However, merchants who can provide related services on the service link generally use a specific ERP system to manage various information and data. For example, merchant a internally uses an ERP system, where the specific manner in which the product stocking is implemented may be different from the default stocking approach for the "new retail" system platform side. At this time, when the external merchant accesses the platform, it may be hoped to continue to use the processing mode which is customary in the external merchant rather than uniformly using the platform scheme, and the latter needs to modify and upgrade the software and hardware system in the external merchant, which can have high cost.
Therefore, how to flexibly support the service scenario, and quickly and inexpensively access new merchants becomes a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The service code development processing method and device can support the service scene flexibly, quickly and cheaply access new merchants, and better support the code development and release based on service granularity.
The application provides the following scheme:
a service code development processing method provides a plug-in for a development tool, and the following processing is executed through the plug-in:
creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
after receiving an operation request through the first operation option, creating a code base, and releasing the received service code to a server, so that a service calling party initiates a call to the service implementation through the service interface to obtain the service on the corresponding node.
A service code development processing apparatus, the apparatus being a plug-in of a preset development tool, comprising:
the system comprises a window creation unit, a code editing unit and a code editing unit, wherein the window creation unit is used for creating a first window and a second window, the first window is used for performing code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
and the code issuing unit is used for creating a code library after receiving the operation request through the first operation option and issuing the received service code to a server so that a service calling party initiates call of the service realization through the service interface to obtain the service on the corresponding node.
An electronic device, comprising:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the operations of:
Creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
after receiving an operation request through the first operation option, creating a code base, and after receiving a service code through the first window, issuing the service code to a server so that the server stores the corresponding relation between the service interface and the service implementation, and a service calling party initiates calling of the service implementation through the service interface to obtain the service on a corresponding node.
According to a specific embodiment provided by the application, the application discloses the following technical effects:
according to the embodiment of the application, the standard operation program flow in the commodity object service flow is split and abstracted according to the granularity of the logic nodes to define the service interface, and then service implementation is provided for the service interface, so that service implementation corresponding to different nodes in the flow is mutually independent, a corresponding flow engine is provided, and the service implementation can be routed to a specific service implementation level, so that each service implementation can be independently developed, independently deployed and independently called, a service scene can be flexibly supported, and access of new merchants can be rapidly and cost-effectively carried out. Meanwhile, a plug-in may be introduced into the integrated development tool, which may be capable of providing a first operation option for determining a service code type and initiating code editing directly within the integrated development tool interface, after which a developer may perform specific development work on a service granularity, including providing service implementation code to a service interface for the definition of a new service interface, combining existing service interfaces into a new service interface, and so on. After that, service codes can be directly and seamlessly released to the server platform from the development tool without switching back and forth among a plurality of systems or platforms, so that the scheme can be well realized.
In addition, full life cycle management can be carried out on the service codes, engineers only pay attention to the service in the whole process, do not pay attention to the application, and do not need to pay attention to the code management.
Of course, not all of the above-described advantages need be achieved at the same time in practicing any one of the products of the present application.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are needed in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a system provided by an embodiment of the present application;
FIG. 2 is a flow chart of a method provided by an embodiment of the present application;
FIGS. 3-1 to 3-3 are schematic diagrams of interfaces provided by embodiments of the present application;
FIG. 4 is a schematic diagram of an apparatus provided by an embodiment of the present application;
fig. 5 is a schematic diagram of an electronic device provided in an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application are within the scope of the protection of the present application.
Firstly, it should be noted that in the service mode of combining online with offline in the "new retail" etc., the service scenario is complex, the service link is long, and a whole set of central station system from the supply chain to the user terminal is realized. In this process, business parties in the service platform often need to handle a variety of standard workflow. For example, for consumer-oriented business parties, processing order flows, shipping flows, etc. may be involved. For business side facing the merchant, the process of loading, stock adjustment, stock replenishment, stock distribution, modification of commodity price, etc. may be more needed. Each process may include a plurality of business logic nodes, for example, for a commodity shelf-loading process, a plurality of nodes such as picking- > packing- > boxing- > shelf-loading are included.
In the prior art, a platform side uses an application-based development mode, and a developer develops codes according to application dimensions, so that an application generally comprises a plurality of nodes in a specific flow. For example, for the commodity loading process in the foregoing example, which includes a plurality of nodes such as picking- > packing- > boxing- > loading, in the prior art, implementation codes on each node in the process are combined together and bound in the same unit, developed together, deployed together, and provided with services together. At this time, if the platform side can provide the corresponding implementation for the package service in the above-mentioned flow, and two cooperated merchants A, B can also provide the respective implementation, the package service needs to be added to the above-mentioned flow, but the original implementation in the flow may not meet the requirements of the new merchant. Such as: the original flow is Start- > node A- > node B- > node C- > End. When a new merchant needs to join the process, the service implementation corresponding to the node A is realized according to the default mode of the platform, the requirement of the merchant A cannot be met, and an implementation mode needs to be newly added to the node A: "implementation of a service 2". At this time, if the conventional flow engine is adopted, there are several schemes as follows: scheme 1: redefining a new flow, still comprising 'Start- > node A- > node B- > node C- > End', modifying the implementation of 'service A' to 'implementation of A service 2'. Scheme 2: the original flow is used, but the code corresponding to the flow needs to be modified, and a conditional statement is written in the code to judge which calling service is selected, namely, the hard coding mode. Scheme 3: on the basis of the original flow, a branch flow, namely a selection node is newly added, a judgment condition is added on the selection node, and meanwhile, the selection corresponding to the new condition is selected and called according to the judgment condition. These three schemes each have drawbacks: in the scheme 1, a plurality of sets of processes are required to be maintained, and the maintenance cost is high. Once the flow template is modified, all corresponding flows need to be modified. In the scheme 2, the business logic is realized by depending on codes, and once a new flow is accessed, the codes corresponding to the flow are required to be modified, so that the method is an invasive realization mode, the codes are required to be released every time the codes are modified, the release risk is high, and the logic is not friendly to non-technical personnel in the codes. Scheme 3, once a new merchant accesses, the flow configuration needs to be modified, and a relatively steady flow cannot be maintained.
In the embodiment of the present application, in order to support a service scenario more flexibly, to quickly and at low cost access a new merchant, as shown in fig. 1, a standard operation program flow in a service platform such as "new retail" may be first abstracted out by taking a node as a unit to provide a standard service interface (which may be referred to as SPI in the embodiment of the present application), and a first system 101 may be provided to define and register a specific service interface; the definition information of such a service interface may then be provided to a specific service provider (e.g., the service platform itself, or other external merchants, etc., referred to as the third system 103 in this embodiment), which may then provide a specific service implementation (which may be referred to as bundle in this embodiment) according to a standard job interface specification corresponding to the specific service. That is, in the embodiment of the present application, the service logic node on a specific flow does not correspond to a certain fixed specific implementation, but exists in the form of an interface, and when defining a service interface, only the in-parameter, out-parameter, function, and the like of the service interface need to be defined, without providing specific implementation codes. In other words, a service interface need only define what functions are corresponding, which in-parameters are needed, and which out-parameters are needed, without providing specific implementation code. A specific service provider may provide a plurality of different service implementations for a specific service interface, for example, for a "pick" service interface, at the service interface level, it is not necessary to determine how to implement a pick function specifically, but, if a merchant a is able to provide a specific pick service, a specific service implementation code may be provided for the service interface, that is, by the merchant a, according to the specific pick implementation logic of the merchant a, a service implementation code related to the pick service is provided. In addition, if merchant B is also able to provide specific pick-up services, a corresponding pick-up service implementation code may also be provided according to specific pick-up implementation logic within the merchant B. By the method, the different nodes in the business process are decoupled from each other, and the service implementation on the different nodes can be independently developed, independently deployed and independently provided with the service. And, for the same service interface, a plurality of different service providers can provide a plurality of different service implementation codes, which are respectively registered in the flow engine subsystem, so that the same service interface can have a 'multi-state' implementation.
That is, in the embodiment of the present application, a specific service interface may be abstracted by a platform side, and then a specific service implementation code may be provided by service providers, where each service provider's service implementation code may be developed according to service implementation logic in an ERP (enterprise management planning) system within the service provider. In addition, the service implementation code provided by the specific service provider can be directly stored on the server of the service provider, and then when the service implementation code is called by the specific service caller, the service implementation code can also run on the server of the service provider, execute specific operation according to the implementation logic inside the service provider, and return the processing result to the service caller.
After the service interface is abstracted and defined in the above manner and at least one service implementation is provided for a specific service interface, a service caller (for example, a specific business party, etc. may be referred to as the second system 102 in the embodiment of the present application) may call one of the specific service implementations under the service interface through the specific service interface, so as to obtain a corresponding service. When a service calling party specifically calls a service, the service calling party can specify the id or name of the service to be called, can also specify the information of the specific required service implementation, and then a specific flow engine system routes a specific calling request to a service address corresponding to a specific service implementation. In particular, when the service implementation is specified, specific parameter information may be set in the call code. In order to facilitate the setting of call parameters by the service caller, the service provider may also set specific routing rules when providing the service implementation code. For example, in one form, identification information such as an id or name of a particular service implementation may be directly specified, such that the flow engine can locate the service implementation code of a particular desired call directly through the id or name of the service implementation. Alternatively, in another implementation manner, the specification may be performed by a regularization method, where the specific incoming parameter may be some indirect information, for example, information such as a warehouse type, a warehouse Id, etc., and then the specific service implementation code is located by the regularization method.
For example, in a service system in a "new retail" mode, in order to enable access to ERP systems of different partners for standard services of the system on a standard service link of the system, to implement diversification of a certain service node, the embodiment of the present application abstracts, for each service on a specific service link, a standard interface of the service is defined, which may be referred to as an SPI, for example, including a pick-up service interface, a package service interface, an on-shelf service interface, and so on. The specific implementation of the service is called as Bundle, and one SPI can be provided with a plurality of bundles to realize the polymorphism of the service implementation. For example, in the foregoing commodity loading process, the four nodes including picking, packing, boxing and loading may be abstracted into four service interfaces in the embodiment of the present application, which are a picking service interface, a packing service interface, a boxing service interface and a loading service interface. The goods picking service interface (SPI) can be realized by providing service by the service provider 1; the SPI, the package service interface, may have a Default implementation (Default Bundle) provided by the service provider a, an implementation (e.g., darun fa Bundle) provided by the service provider 2, and so on.
After the abstraction of the service interface is performed and the service implementation is developed on the service granularity, the service interface can be registered in the service system, so that the service call in a specific entity store can be conveniently performed by calling the service implementation to obtain a specific function. For example, a service caller in the physical store a may call the implementation of the package service provided by the service provider 1, implement the package function, call the implementation of the put-on-shelf service of the service provider 2, and implement the put-on-shelf function; the service caller in the physical store B may call the implementation of the pick service provided by the service provider 1, implement the pick function, call the implementation of the put-on-shelf service of the service provider 2, implement the put-on-shelf function, and so on. That is, in the process of implementing the standard operation flow, the same service caller client can jointly solve the specific problem in the actual service scene by arranging the implementation corresponding to a plurality of different services, including setting the call relationship among the different services, and the like, and using the service implementation provided by a plurality of different service providers.
Wherein, both the definition of the service interface and the creation of the service implementation involve some code editing operations, such as definition codes of the service interface, implementation codes of the service implementation, and so on. In the embodiment of the application, the development of the code can be realized through a Serverless architecture. The server architecture is a technical concept that is rapidly rising in recent years, and based on the server architecture, developers do not need to deploy, configure or manage server services, and server services required by code running are all provided by a cloud platform. However, in the present embodiment, since the granularity of work switches from monomer application to monomer service/function, from the past: "building a framework running on a server, responding to multiple events" becomes: "build/use a microservice or microservice function to respond to an event". Correspondingly, in the past, since all services are bound in the same unit according to development of application dimensions, under a server architecture, service and function splitting is needed, and one application is split into decoupled micro services and further split into functions, which is a huge workload and is not easy.
In addition, the code developed by the code development tool in the prior art needs to be submitted or issued in a manner of Web pages and the like corresponding to the service platform provided by the embodiment of the application. That is, the developer needs to switch back and forth between multiple systems due to the splitting between the development operation of the code and the operations of submitting, constructing, deploying and the like of the code, the working efficiency is low, and the management operation of the full life cycle of the code cannot be realized.
Therefore, in the preferred embodiment of the present application, a plug-in may also be provided for an existing development tool, and through the development framework provided in the embodiment of the present application, registration, development, deployment and management may be directly performed in a service dimension, so as to naturally support a Serverless framework. That is, by means of the plug-in tool, definition of services, provision of service implementation and the like provided in the embodiments of the present application can be facilitated, and development efficiency can be improved.
Specifically, in the embodiment of the present application, whether it is a definer of a service interface or a provider of a service implementation, as long as it wants to join in a service platform provided in the embodiment of the present application, a plug-in provided in the embodiment of the present application may be installed in a development tool thereof. In a display window (explorer) of the development tool, a display window corresponding to the plug-in can be created, and a list of service interfaces existing in the service platform can be displayed in the display window and can be classified for display. In addition, operation options for newly creating a service interface or viewing service interface details, providing service implementation for a specified service interface, and the like can also be provided. After receiving the operation request through the newly built service interface or the operation options for providing service implementation, the code library can be automatically created, a window for editing codes is created, a developer can directly edit codes in the window, and the like, and in addition, one-key code construction, deployment, release, and the like can be performed. In addition, in the embodiment of the present application, in order to further reduce the workload of the developer, a template may be provided in advance, and when the window for code editing is provided, the initialization of the code library may be performed simultaneously, so as to provide an initial code. In this way, the developer only needs to edit specific business codes in the code editing window, and other initialization work and the like do not need to pay attention.
That is, in the embodiment of the present application, since the developer naturally performs the new addition of the service version under the code development tool according to the dimension of the atomized service, the development based on the development framework is determined, and the developer naturally performs FAAS (Function As A Service) without performing service splitting; also, since the granularity of service splitting is small enough that one engineer can be responsible for one service, no change-based code branching is necessary. In the embodiment of the present application, the development mode is a backbone development mode by default, and by integrating the code development tool (e.g., IDEA, etc.) and the code management tool (e.g., gitlab, etc.), the code library creation and detection are done locally by default, and the backbone development mode is used, that is, each service implementation belongs to the backbone code, and the operation of creating multiple branches is no longer required. In specific implementation, firstly, a service version can be newly added on a code development tool according to a service/interface level, then the code development tool can automatically create a code base and a trunk branch, and development and code submission can be performed based on automatically detected codes to the local. In the construction and deployment process, the function integrated into the plug-in of the development tool can be used for one-key construction and deployment to the server platform. As can be seen, the development framework in the embodiment of the present application is different from the conventional development framework in that: because the development, deployment and management are carried out according to the mode of the atomization service, the application is not required to be split into service granularity, and the server framework is naturally supported; and the plug-in can automatically generate a code base and detect the code base to the local, and can perform one-key construction and deployment to a server platform.
Thus, in the embodiment of the application, a complete new service (code development in a service dimension, rather than the traditional development in an application dimension) can be provided from scratch, and the full life cycle management of the service platform can be released seamlessly. In the process, engineers only need to pay attention to the service, but do not need to pay attention to the application, and the engineers do not need to pay attention to the code management, because the code library is automatically created and automatically carries out branch management according to the version rule of the service, and the engineers only need to double-click one service in the code development tool to develop the code.
In particular implementation, referring to fig. 2, an embodiment of the present application provides a service code development processing method, referring to fig. 2, which provides plug-ins for development tools,
the specific integrated development tools may have a plurality of types, and in specific implementation, different plug-ins may be provided for different integrated development tools, where the plug-ins have the same function, but may be different in terms of related interfaces and so on to adapt to the specific integrated development tools. Alternatively, in another implementation, a plug-in may be provided that integrates an integrated development tool that a developer desiring to join a process can use to develop code.
After the plug-ins are installed in the code development tool, the following processing can be performed by the plug-ins:
s201: creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
in this embodiment of the present application, the service code specifically required to be edited may include definition code of a service interface, implementation code of service implementation, and so on, and various different types of codes may be developed by a code development tool installed with the plug-in, and may be issued in a one-touch manner. Therefore, in the embodiment of the present application, specific service codes are classified into two types, namely, service interface codes and service implementation codes. For two different types of codes, different processing modes can be adopted when processing such as release is specifically performed.
After the development tool is started, as shown in fig. 3-1, a first window 301 and a second window 302 may be created, where the first window 301 may be specifically used for code editing, and the second window 302 may be used for displaying information related to a service interface, service implementation, and the like related to the embodiment of the present application, where the first window may include a first operation option for initiating code editing.
The information about the related service interface, service implementation, etc. may be specifically stored at the service end, for example, taking the service interface of the performance class as an example, and a specific storage manner may be as shown in table 1:
TABLE 1
In the initial state, a defined list of service interfaces may be presented in the second window. In particular, when the service interface list is displayed, it may be further displayed in a classified manner, for example, in the example shown in fig. 3-1, the class information of the service interface is mainly displayed, after clicking each class name, as shown in fig. 3-2, a specific service interface list included in the class may be displayed in an expanded manner, and so on. The specific service interface list information may be pulled from the service configuration platform, that is, after defining a specific service interface, the specific service interface may be registered with the service end of the flow engine subsystem, and may be recorded in the service configuration platform. Thus, the service configuration platform records the information of all the defined service interfaces. Accordingly, the code editor may be exposed through a plug-in the development tool.
In this embodiment of the present application, the specific code editor may be a platform side for defining a service interface, or may also be a service provider that needs to provide a service implementation code, or even may also be a service caller, for example, a certain service caller needs to combine two or more services into another new service in the process of actually calling the service, and then the new service interface may also be combined in a mode that needs to perform code editing, and so on. Thus, the service code includes definition code of a service interface, or implementation code of a service implementation provided for a specified service interface, or combination code for combining at least two existing service interfaces into a new service interface, and accordingly, there may be a plurality of specific first operation options.
For example, one of them may be a first operation option for defining a new service interface, at which time a service definition code for the service interface may be received through the first window. Specifically, the service definition code may include codes for defining the in-parameter, out-parameter and function of the service interface.
Alternatively, the first operation option for initiating code editing includes: a first operational option for providing a service implementation for a specified service interface receives implementation code information about the service implementation through the first window.
The first operation option for providing the service implementation for the specified service interface may be provided after selecting to view the detailed information of a certain service interface on the basis of the foregoing fig. 3-2. For example, as shown in fig. 3-3, when the service provider specifically clicks to view a certain service interface, list information of existing service implementation corresponding to the service interface may be displayed, and information about a last modifier of the service interface, a last modification time, a total call number, a change number, and the number of methods contained in a current version may also be included. In addition, the first operation option described above may also be provided in the interface, for example, a button in the form of a "new button" as shown in fig. 3-3, or the like. In the examples shown in fig. 3-3, the service interface is specifically "the performing operator cooperates with the service-operator", and at this time, the information corresponding to the service interface may be specifically shown in the following table 2:
TABLE 2
In addition, the first operation option for initiating code editing includes: for combining at least two existing service interfaces into a first operation option of a new service interface by defining a call relation between the at least two existing service interfaces, so as to receive combined code information about the new service interface through the first window.
For example, a service a calls a service B, and a function that is relatively commonly used in a system can be implemented, so that in the process of defining a service, the service a and the service B can be further combined into another service C by packing. Thus, when the function is needed to be realized later, the service C is directly called without calling the service A first and then calling the service B in the service A.
S202: after receiving an operation request through the first operation option, creating a code base, and releasing the received service code to a server, so that a service calling party initiates a call to the service implementation through the service interface to obtain the service on the corresponding node.
After receiving the code editing request, the plug-in the embodiment of the application can automatically execute the operation of creating the code library without manually creating by a developer, and then can receive the service code through the first window. In addition, in a preferred embodiment, after receiving the operation request through the first operation option, an initialization code may also be provided through the first window according to a preset template. Such initialization code may specifically include definitions of some dependencies, and so on. That is, in the embodiments of the present application, some initialization codes may be automatically generated, so that a developer no longer needs to pay attention to the implementation of such initialization codes, and thus, efficiency may be improved. Even in a specific implementation, the code related to the specific business logic can be automatically provided in the initialization code, so that a developer only needs to pay attention to the implementation of the code related to the specific business logic, and does not need to pay attention to other information such as dependency relations and the like. After finishing the editing and other works of the service codes, the service codes can be directly released to the service configuration platform in the embodiment of the application in the current development tool, and the operations of registering and the like to the service end of the flow engine subsystem can be finished. That is, editing and publishing of specific code may be accomplished within the same development tool without having to switch back and forth between multiple tools or systems.
In addition, in the embodiments of the present application, other related operations regarding the full life cycle of a specific service code may also be provided. For example, it may be tested whether the newly defined service interface was defined successfully, test results obtained, and a second operation option for checking whether the service interface was defined successfully; the second operation option may be provided by means of a right mouse button option, or may be provided by means of other shortcut keys, etc. And after receiving an operation request through the second operation option, providing the test result. For example, after a user completes the definition of a service interface, the user may click right on information such as the name of the service interface, query whether the definition is successful, and so on.
In addition, the corresponding relation between the service interface and the service realization can be recorded; and providing a third operation option for viewing service interface information to which the service implementation belongs; after receiving the operation request through the third operation option, the service interface information to which the service implementation belongs can also be provided. For example, in a specific implementation, it may be queried whether an entry corresponds to a bundle, which service interface a certain entry belongs to, and so on.
Because the service can be polymorphic in the embodiment of the present application, that is, for the same service interface, multiple different service providers can provide multiple different service implementations for the service interface, in the embodiment of the present application, service implementation list information corresponding to a specified service interface may also be provided through the second window, so that a user may query a service implementation situation corresponding to each service interface, and so on.
In addition, in the concrete implementation, a fourth operation option for constructing, deploying and publishing the received service code can be further provided, and after the operation request received by the fourth operation option is passed, the one-key construction, deployment and publishing of the service code can be realized, and then the service code can be further published. Among these, so-called building, that is, compiling a development language in a service code, generating a machine-recognizable language, and generating an instruction packet, is possible. The deployment process mainly comprises the step of deploying a specific instruction packet into a specific server. The service implementation code can be deployed in a server of a service provider, and in particular implementation, the server of the service provider may exist in a distributed server cluster, so that the service implementation code can be stored in a plurality of different servers, and then when a specific call is made, a service address can be selected from the service addresses through a certain load balancing algorithm, so that the service caller can provide a specific service.
Furthermore, in specific implementation, a fifth operation option for updating the version of the released service code can be provided, so that a developer can directly perform operations such as version updating on the released code in a development tool.
It can be seen that in the embodiment of the present application, a plug-in may be introduced into the integrated development tool, where the plug-in can directly create a list for showing specific service interface information in the integrated development tool interface, and then a developer may perform specific development work on the service granularity. Including the definition of a new service interface, providing service implementation code to the service interface, combining existing service interfaces into a new service interface, and so forth. Thereafter, the service code can be seamlessly published from the development tool directly to the serverless platform. In addition, full lifecycle management of service codes is possible, in which process engineers only pay attention to the service, not to the application, and they do not need to care about code management.
Corresponding to the foregoing method, the embodiment of the present application further provides a service code development processing apparatus, where the apparatus is a plug-in of a preset development tool, and referring to fig. 4, the apparatus may include:
A window creation unit 401, configured to create a first window and a second window, where the first window is used for performing code editing, and the second window includes a first operation option for determining a service code type and initiating code editing, and the service code type includes: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
and the code issuing unit 402 is configured to create a code library after receiving an operation request through the first operation option, and issue the received service code to a server, so that a service caller initiates a call to the service implementation through the service interface to obtain a service on a corresponding node.
In particular, the apparatus may further include:
and the code initialization unit is used for providing an initialization code through the first window according to the template corresponding to the service code type after receiving the operation request through the first operation option.
Wherein the initialization code includes all dependency codes except the business logic code so as to receive the code information related to the business logic only through the first window.
Wherein the first operation option includes: a first operation option for defining a new service interface, a service definition code for the service interface is received through the first window, and the service definition code comprises codes for describing the in-parameter, out-parameter and function of the service interface.
At this time, the apparatus may further include:
and the testing unit is used for testing whether the newly defined service interface is defined successfully or not, obtaining a testing result, providing a second operation option for checking whether the service interface is defined successfully or not, and providing the testing result after receiving an operation request through the second operation option.
In addition, the first operation option includes: a first operational option for providing a service implementation for a specified service interface receives implementation code information about the service implementation through the first window.
At this time, the apparatus may further include:
an information providing unit for providing a third operation option for viewing service interface information to which the service implementation belongs; and after receiving an operation request through the third operation option, providing service interface information to which the service implementation belongs.
In addition, the first operation option may also include: for combining at least two existing service interfaces into a first operation option of a new service interface by defining a call relation between the at least two existing service interfaces, so as to receive combined code information about the new service interface through the first window.
Wherein the same service interface corresponds to a plurality of service realizations;
at this time, the apparatus may further include:
and the list display unit is used for providing a defined service interface list through the second window and providing service realization list information corresponding to a designated service interface after one designated service interface is selected.
A fourth operation option providing unit, configured to provide a fourth operation option for constructing, deploying and publishing the received service code;
the code release unit is specifically configured to construct and release the service code after deployment according to the operation request received through the fourth operation option.
The code issuing unit is specifically configured to:
after the service codes are constructed, an instruction packet is generated, the instruction packet is deployed into a designated server, and a service address for storing the service codes is determined;
And releasing the service code according to the service address information corresponding to the service code.
Wherein the server comprises a distributed server cluster; the service code is deployed into a plurality of servers in the distributed server cluster.
In addition, the apparatus may further include:
and the version updating unit is used for providing a fifth operation option for updating the version of the released service code.
In addition, the embodiment of the application also provides electronic equipment, which comprises:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the operations of:
creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface;
After receiving an operation request through the first operation option, creating a code base, and after receiving a service code through the first window, issuing the service code to a server so that the server stores the corresponding relation between the service interface and the service implementation, and a service calling party initiates calling of the service implementation through the service interface to obtain the service on a corresponding node.
Fig. 5 illustrates an architecture of a computer system, which may include a processor 510, a video display adapter 511, a disk drive 512, an input/output interface 513, a network interface 514, and a memory 520, among others. The processor 510, the video display adapter 511, the disk drive 512, the input/output interface 513, the network interface 514, and the memory 520 may be communicatively coupled via a communication bus 530.
The processor 510 may be implemented by a general-purpose CPU (Central Processing Unit ), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, etc., for executing relevant programs to implement the technical solutions provided in the present application.
The Memory 520 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory ), static storage device, dynamic storage device, or the like. The memory 520 may store an operating system 521 for controlling the operation of the electronic device 500, and a Basic Input Output System (BIOS) for controlling the low-level operation of the electronic device 500. In addition, a web browser 523, a data storage management system 524, a code development processing system 525, and the like may also be stored. The code development processing system 525 may be an application program that implements the operations of the foregoing steps in the embodiments of the present application. In general, when the technical solutions provided in the present application are implemented by software or firmware, relevant program codes are stored in the memory 520 and invoked by the processor 510 to be executed.
The input/output interface 513 is used for connecting with an input/output module to realize information input and output. The input/output module may be configured as a component in a device (not shown) or may be external to the device to provide corresponding functionality. Wherein the input devices may include a keyboard, mouse, touch screen, microphone, various types of sensors, etc., and the output devices may include a display, speaker, vibrator, indicator lights, etc.
The network interface 514 is used to connect communication modules (not shown) to enable communication interactions of the device with other devices. The communication module may implement communication through a wired manner (such as USB, network cable, etc.), or may implement communication through a wireless manner (such as mobile network, WIFI, bluetooth, etc.).
In addition, the electronic device 500 may also obtain information of specific acquisition conditions from the virtual resource object acquisition condition information database 541 for making condition judgment, and so on.
It should be noted that although the above devices only show the processor 510, the video display adapter 511, the disk drive 512, the input/output interface 513, the network interface 514, the memory 520, the bus 530, etc., in the specific implementation, the device may include other components necessary to achieve proper operation. Furthermore, it will be understood by those skilled in the art that the above-described apparatus may include only the components necessary to implement the present application, and not all the components shown in the drawings.
From the above description of embodiments, it will be apparent to those skilled in the art that the present application may be implemented in software plus a necessary general purpose hardware platform. Based on such understanding, the technical solutions of the present application may be embodied essentially or in a part contributing to the prior art in the form of a software product, which may be stored in a storage medium, such as a ROM/RAM, a magnetic disk, an optical disk, etc., including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform the methods described in the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for a system or system embodiment, since it is substantially similar to a method embodiment, the description is relatively simple, with reference to the description of the method embodiment being made in part. The systems and system embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
The service code development processing method and device provided by the application are described in detail, and specific examples are applied to illustrate the principle and implementation of the application, and the description of the above examples is only used for helping to understand the method and core idea of the application; also, as will occur to those of ordinary skill in the art, many modifications are possible in view of the teachings of the present application, both in the detailed description and the scope of its applications. In view of the foregoing, this description should not be construed as limiting the application.
Claims (12)
1. A service code development processing method is characterized in that a plug-in is provided for a development tool, and the following processing is executed through the plug-in:
creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface; wherein the first operation option includes: a first operation option for defining a new service interface, receiving a service definition code related to the service interface through the first window, wherein the service definition code comprises codes for describing the input parameters, the output parameters and the functions of the service interface; or, a first operation option for providing a service implementation for a specified service interface, so as to receive implementation code information about the service implementation through the first window; or, the method is used for combining at least two existing service interfaces into a first operation option of a new service interface by defining a calling relation between the at least two existing service interfaces, so as to receive combined code information about the new service interface through the first window;
After receiving an operation request through the first operation option, creating a code base, and releasing the received service code to a server, so that a service calling party initiates a call to the service implementation through the service interface to obtain the service on the corresponding node.
2. The method of claim 1, wherein the step of determining the position of the substrate comprises,
after receiving an operation request through the first operation option, the method further comprises:
and providing an initialization code through the first window according to the template corresponding to the service code type.
3. The method of claim 2, wherein the step of determining the position of the substrate comprises,
the initialization code includes all dependency codes except the business logic code so that only code information related to the business logic is received through the first window.
4. The method as recited in claim 1, further comprising:
when the first operation option is used for defining a new service interface, whether the newly defined service interface is defined successfully or not is tested, a test result is obtained, and a second operation option for checking whether the service interface is defined successfully or not is provided;
and after receiving an operation request through the second operation option, providing the test result.
5. The method as recited in claim 1, further comprising:
providing a third operation option for viewing service interface information to which the service implementation belongs when the first operation option is used for providing the service implementation for the specified service interface;
and after receiving an operation request through the third operation option, providing service interface information to which the service implementation belongs.
6. The method according to claim 1, characterized in that:
the same service interface corresponds to a plurality of service realizations;
the method further comprises the steps of:
and providing a defined service interface list through the second window, and providing service realization list information corresponding to a designated service interface after one of the designated service interfaces is selected.
7. The method as recited in claim 1, further comprising:
providing a fourth operation option for constructing, deploying and publishing the received service code;
and constructing and deploying the service codes according to the operation request received through the fourth operation option, and then publishing the service codes.
8. The method according to claim 7, wherein:
the post-deployment release of the service code comprises the following steps:
After the service codes are constructed, an instruction packet is generated, the instruction packet is deployed into a designated server, and a service address for storing the service codes is determined;
and releasing the service code according to the service address information corresponding to the service code.
9. The method according to claim 8, wherein:
the server comprises a distributed server cluster;
the service code is deployed into a plurality of servers in the distributed server cluster.
10. The method as recited in claim 1, further comprising:
a fifth operational option is provided for version updating of the published service code for updating the version of the service code.
11. A service code development processing apparatus, wherein the apparatus is a plug-in of a preset development tool, comprising:
the system comprises a window creation unit, a code editing unit and a code editing unit, wherein the window creation unit is used for creating a first window and a second window, the first window is used for performing code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface; wherein the first operation option includes: a first operation option for defining a new service interface, receiving a service definition code related to the service interface through the first window, wherein the service definition code comprises codes for describing the input parameters, the output parameters and the functions of the service interface; or, a first operation option for providing a service implementation for a specified service interface, so as to receive implementation code information about the service implementation through the first window; or, the method is used for combining at least two existing service interfaces into a first operation option of a new service interface by defining a calling relation between the at least two existing service interfaces, so as to receive combined code information about the new service interface through the first window;
And the code issuing unit is used for creating a code library after receiving the operation request through the first operation option and issuing the received service code to a server so that a service calling party initiates call of the service realization through the service interface to obtain the service on the corresponding node.
12. An electronic device, comprising:
one or more processors; and
a memory associated with the one or more processors, the memory for storing program instructions that, when read for execution by the one or more processors, perform the operations of:
creating a first window and a second window, wherein the first window is used for code editing, the second window comprises a first operation option used for determining a service code type and initiating code editing, and the service code type comprises: service interface code and service implementation code; the service interface is defined according to nodes in the commodity object service flow, and the service implementation is provided according to definition information of the service interface; wherein the first operation option includes: a first operation option for defining a new service interface, receiving a service definition code related to the service interface through the first window, wherein the service definition code comprises codes for describing the input parameters, the output parameters and the functions of the service interface; or, a first operation option for providing a service implementation for a specified service interface, so as to receive implementation code information about the service implementation through the first window; or, the method is used for combining at least two existing service interfaces into a first operation option of a new service interface by defining a calling relation between the at least two existing service interfaces, so as to receive combined code information about the new service interface through the first window;
After receiving an operation request through the first operation option, creating a code base, and after receiving a service code through the first window, issuing the service code to a server so that the server stores the corresponding relation between the service interface and the service implementation, and a service calling party initiates calling of the service implementation through the service interface to obtain the service on a corresponding node.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811461099.XA CN111258567B (en) | 2018-12-01 | 2018-12-01 | Service code development processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811461099.XA CN111258567B (en) | 2018-12-01 | 2018-12-01 | Service code development processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111258567A CN111258567A (en) | 2020-06-09 |
CN111258567B true CN111258567B (en) | 2023-06-16 |
Family
ID=70948357
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811461099.XA Active CN111258567B (en) | 2018-12-01 | 2018-12-01 | Service code development processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111258567B (en) |
Families Citing this family (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114116543B (en) * | 2020-08-26 | 2024-08-27 | 中移动信息技术有限公司 | Hardware plug method, device and equipment based on middle platform and computer storage medium |
CN113296740A (en) * | 2020-11-30 | 2021-08-24 | 阿里巴巴集团控股有限公司 | Service object processing method, device, equipment and machine readable medium |
CN112597013A (en) * | 2020-12-16 | 2021-04-02 | 北京三快在线科技有限公司 | Online development and debugging method and device |
CN112860238B (en) * | 2021-02-19 | 2024-10-29 | 中国建设银行股份有限公司 | Data processing method, device, computer equipment and storage medium |
CN113515271B (en) * | 2021-05-17 | 2024-02-23 | 中国工商银行股份有限公司 | Service code generation method and device, electronic equipment and readable storage medium |
CN115328463B (en) * | 2022-08-01 | 2023-07-21 | 无锡雪浪数制科技有限公司 | Visual business arrangement design system |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6920615B1 (en) * | 2000-11-29 | 2005-07-19 | Verizon Corporate Services Group Inc. | Method and system for service-enablement gateway and its service portal |
CN101826987A (en) * | 2010-04-27 | 2010-09-08 | 北京邮电大学 | System and method for supporting mixed service based on integrated open network |
CN101840334A (en) * | 2010-04-16 | 2010-09-22 | 中国电子科技集团公司第二十八研究所 | Software component service packaging method |
CN104915193A (en) * | 2015-05-04 | 2015-09-16 | 北京奇艺世纪科技有限公司 | Flow engine processing method and device |
CN105022897A (en) * | 2015-08-17 | 2015-11-04 | 武汉理工大学 | Marine simulation engine supporting heterogeneous model integration and component reuse |
CN106293704A (en) * | 2016-07-26 | 2017-01-04 | 北京北森云计算股份有限公司 | Dynamic micro services edit methods, device and the server of multilingual cloud compiling |
EP3125180A1 (en) * | 2015-07-29 | 2017-02-01 | GXS, Inc. | Systems and methods for managed services provisioning using service-specific provisioning data instances |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9804994B2 (en) * | 2013-03-15 | 2017-10-31 | Microsoft Technology Licensing, Llc | Application architecture supporting multiple services and caching |
-
2018
- 2018-12-01 CN CN201811461099.XA patent/CN111258567B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6920615B1 (en) * | 2000-11-29 | 2005-07-19 | Verizon Corporate Services Group Inc. | Method and system for service-enablement gateway and its service portal |
CN101840334A (en) * | 2010-04-16 | 2010-09-22 | 中国电子科技集团公司第二十八研究所 | Software component service packaging method |
CN101826987A (en) * | 2010-04-27 | 2010-09-08 | 北京邮电大学 | System and method for supporting mixed service based on integrated open network |
CN104915193A (en) * | 2015-05-04 | 2015-09-16 | 北京奇艺世纪科技有限公司 | Flow engine processing method and device |
EP3125180A1 (en) * | 2015-07-29 | 2017-02-01 | GXS, Inc. | Systems and methods for managed services provisioning using service-specific provisioning data instances |
CN105022897A (en) * | 2015-08-17 | 2015-11-04 | 武汉理工大学 | Marine simulation engine supporting heterogeneous model integration and component reuse |
CN106293704A (en) * | 2016-07-26 | 2017-01-04 | 北京北森云计算股份有限公司 | Dynamic micro services edit methods, device and the server of multilingual cloud compiling |
Non-Patent Citations (1)
Title |
---|
刘高嵩,龙军.基于CORBA组件的软件开发技术.福建电脑.2003,(第04期),全文. * |
Also Published As
Publication number | Publication date |
---|---|
CN111258567A (en) | 2020-06-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111258773B (en) | Service call flow information processing method and device and electronic equipment | |
CN111258567B (en) | Service code development processing method and device | |
CN111258772B (en) | Service calling information processing method, device and system | |
US8898620B2 (en) | System and method for application process automation over a computer network | |
US8141043B2 (en) | Automated business process testing that spans multiple platforms or applications | |
CN111262897B (en) | Service call routing processing method, device and system | |
US20080109468A1 (en) | Method and apparatus for creating an offline service- oriented architecture based application from an online service-oriented architecture based application | |
US10425295B1 (en) | Transformation platform | |
JP2008533549A (en) | System and method for application development and deployment | |
WO2023050956A1 (en) | Automatic selection of nodes on which to perform tasks | |
CN112132530A (en) | Visual dynamic flow arrangement method and system | |
CN1799059B (en) | Method and system for automatically transforming a provider offering into a customer specific service environment definiton executable by resource management systems | |
US11195137B2 (en) | Model-driven and automated system for shared resource solution design | |
US8812964B2 (en) | Managing evelopment of an enterprise application | |
WO2013054296A2 (en) | Enterprise resource planning system | |
US20070033570A1 (en) | Method and system for transforming a process flow | |
CN111510393B (en) | Traffic scheduling method, device and system | |
Wittern et al. | Feature-based configuration of vendor-independent deployments on iaas | |
CN103106238B (en) | The user-defined operation system of a kind of support and operational approach thereof | |
US8543971B2 (en) | Specifying on the fly sequential assembly in SOA environments | |
US20070074202A1 (en) | Program product installation | |
CN112114857B (en) | Front-end service management method, front-end server and website server | |
TW202331545A (en) | Mehod for implementing library by using microservices architecture | |
CN117632226A (en) | Program package and construction method, device, computing equipment and computer storage medium | |
CN118672599A (en) | Application deployment system, application deployment method and device |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |