CN102413022B - Application debugging method and system - Google Patents

Application debugging method and system Download PDF

Info

Publication number
CN102413022B
CN102413022B CN201110460663.8A CN201110460663A CN102413022B CN 102413022 B CN102413022 B CN 102413022B CN 201110460663 A CN201110460663 A CN 201110460663A CN 102413022 B CN102413022 B CN 102413022B
Authority
CN
China
Prior art keywords
application
server
request message
proxy server
client 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
CN201110460663.8A
Other languages
Chinese (zh)
Other versions
CN102413022A (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.)
Beijing Feinno Communication Technology Co Ltd
Original Assignee
Beijing Feinno Communication 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 Beijing Feinno Communication Technology Co Ltd filed Critical Beijing Feinno Communication Technology Co Ltd
Priority to CN201110460663.8A priority Critical patent/CN102413022B/en
Publication of CN102413022A publication Critical patent/CN102413022A/en
Application granted granted Critical
Publication of CN102413022B publication Critical patent/CN102413022B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The invention discloses an application debugging method and system. The application debugging system comprises an expansion plug-in and an application service platform system, and a proxy server and a cloud computing application service system are arranged in the application service platform system. The application debugging method comprises: the expansion plug-in locally starts applications; the started applications create connections with the proxy server and send configuration parameters for application debugging to the proxy server; the configuration parameters for application debugging are limited to users within a specified range; after receiving a request message from a client side, the proxy server firstly matches the configuration parameters for application debugging; if the match is successful, the proxy server sends the request message from the client side to the started applications for processing the message, and then sends the processing result returned by the started applications to the client side; and if the match is failed, the proxy server distributes the request from the client side to application servers, at which the corresponding applications are located, in the cloud computing application service system. According to the technical scheme of the invention, environmental injection debugging can be carried out on an application development machine.

Description

A kind of application adjustment method and system
Technical field
The present invention relates to Internet technical field, particularly a kind of application adjustment method and system.
Background technology
So-called application program debugging, is that the program of establishment is dropped into before actual motion, tests, and revises the process of syntax error and logic error.This is the requisite step that guarantees computer information system correctness.
In prior art, debug an application program and program division need to be deployed to (test environment or production environment) in the middle of actual motion environment, but the application being deployed in test environment is difficult to debugging.
Summary of the invention
In view of this, the invention provides a kind of application adjustment method and system, the solution of the present invention can be carried out the pouring-in debugging of environment on the developing engine of application.
For achieving the above object, technical scheme of the present invention is achieved in that
The invention discloses a kind of application adjustment method, realize expansion plugin and application service platform system, proxy server and cloud computing application service system are set in application service platform system, the method comprises:
Expansion plugin is applied at local boot;
The application of described startup creates and is connected with proxy server, and sends to proxy server the configuration parameter that will debug application; The described configuration parameter that will debug application limits the user in specified scope;
Proxy server is receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessfully, client-requested is distributed to the application server at correspondence in cloud computing application service system application place.
The invention also discloses a kind of application debug system, this system comprises: expansion plugin and application service platform system; Described application service platform system comprises: proxy server and cloud computing application service system;
Expansion plugin, for applying at local boot; The application of this startup creates and is connected with proxy server, and sends to proxy server the configuration parameter that will debug application; The described configuration parameter that will debug application limits the user in specified scope;
Proxy server, for receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessfully, client request message is distributed to the application server at correspondence in cloud computing application service system application place.
From above-mentioned, this expansion plugin of the present invention is applied at local boot, the application of described startup creates and is connected with proxy server, and to debug the configuration parameter of application to proxy server transmission, proxy server is receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessful, again client request message is distributed to the technical scheme of the application server at the correspondence application place in cloud computing application service system, can on the developing engine of application, carry out the pouring-in debugging of environment.
Accompanying drawing explanation
Fig. 1 is an actual networking schematic diagram of the application service platform system in the embodiment of the present invention;
Fig. 2 is the schematic diagram of the pouring-in debug system in the embodiment of the present invention.
Embodiment
For making the object, technical solutions and advantages of the present invention clearer, below in conjunction with accompanying drawing, embodiment of the present invention is described further in detail.
For the pouring-in application adjustment method providing in the present invention is provided, first the plateform system to the operation application in the present invention and should developing describes.
Fig. 1 is an actual networking schematic diagram of the application service platform system in the embodiment of the present invention.As shown in Figure 1, this application service platform system comprises: proxy server and cloud computing application service system, wherein, load operation application on application server cluster in cloud computing application service system, and in cloud computing application service system, preserve the corresponding relation between descriptor and application and the application server of application;
Proxy server, be used for receiving client request message, client request message is resolved, determine corresponding application, according to the descriptor of this application, create application context, in described client request message, add after application context, according to described application and the corresponding relation between application server, client request message is distributed to the application server at corresponding application place; Receive the result that application server end returns, and return to client;
Described application server in described cloud computing application service system, for when receiving the client request message of proxy server transmission, gives corresponding application by this client request message and processes, and result is returned to proxy server; The task that this client request message is asked is processed in the application of described correspondence, according to described application context, carries out data resource location, draws result.
Application server returns to client by described result through proxy server.
Corresponding relation between application and the application server of preserving in above-mentioned cloud computing application service system, adopts table storage, wherein records application process title and application service path, i.e. corresponding relation between application and application server.
In the embodiment of the present invention, cloud computing application service system comprises: central server, Resource Server and the server cluster being formed by multiple application servers, wherein:
Central server, for receiving the application that upload outside, the descriptor of application is saved in application configuration information list, create the corresponding relation between described application and application server, and in corresponding this application of application server deploy, preserve the application operation information list for preserving the corresponding relation between application and application server;
Each application server, for the operation information of the application of institute's load is uploaded on central server for preserving the application operation information list of corresponding relation between application and application server;
Wherein, application configuration information list comprises following information: application ID, Apply Names, application service type, application process name, application service metadata mark; The list of application operation information comprises following information: the address of service of application process title, application;
Resource Server, the data resource that need to access during the task of asking for each application processing client request message of preserving on application server; In the present embodiment, Resource Server comprises: database server, file server and memory object buffer server.
Proxy server, be used for receiving client request message, by the application configuration information list on Help Center's server, identify the corresponding application of this client request message, then by the application configuration information list on Help Center's server and the list of application operation information, obtain the address of service of corresponding application, according to obtained address of service, client request message is distributed to the application server at corresponding application place; Receive the result that application server end returns, and return to client;
In one embodiment of the invention, proxy server comprises: HTML (Hypertext Markup Language) http proxy server, initial session sip proxy server and note system SMS proxy server.Wherein, http proxy server is responsible for distributing HTTP application, and sip proxy server is responsible for long connection of SIP with client, and SMS proxy server is responsible for dividing the up application of sending short messages.
In addition, cloud computing application service system also comprises the infrastructure service server (not drawing this infrastructure service server in Fig. 1) being connected with application server cluster, for some core application or the independent utility of platform internal demands are provided.
In the application service platform system shown in Fig. 1, described proxy server, for when receiving client request message, from client request message, extract required parameter, application configuration information list in Help Center's server, find out the application configuration information list items that required parameter and metadata mark field meet, and then identify corresponding application.
For example: when receiving HTTP request message, according to the uniform resource position mark URL in this request message, application configuration information list on Help Center's server, find out apply metadata mark field and include and the application configuration information list items of described URL consistent information, according to the Apply Names in found out application configuration information list items, identify the corresponding application of this client request message;
Or, proxy server is when receiving the far call process agreement Rpc request corresponding with far call application component RemoteAppBean, according to the far call service name (RemoteAppName) in this request message, find out Apply Names on central server (AppName) the field application configuration information list items consistent with described far call service name, according to the Apply Names field in found out application configuration information list items, identify the corresponding application of this request message;
Described proxy server, be used for according to the application process name of found out application configuration information list items, find out application process name field on central server and comprise and the application operation information list items of described application process name consistent information, from found out application operation information list items, obtain the address of service information of application service.And according to the address of service information of described application, client request message is distributed to the application server at corresponding application place.
Described proxy server, according in the metadata mark field in found out application configuration information list items about load application Service context information, create application service context.
In the application service platform system shown in Fig. 1, central server, is further used for preserving the Resources list; The Resources list comprises following information: resource name, resource type, application service context type, location algorithm title and location algorithm parameter;
Be applied in and receive after client request message, in the process that completes the task that this client request message asks, according to the corresponding informance in application context and the Resources list, carry out resource location.
Visible, this application service platform system being formed by above-mentioned proxy server, application server cluster, central server and Resource Server of the present invention, the server resource of dispersion is logically integrated together, greatly reduced the development difficulty of application, improved the flexibility of disposing and reduced the difficulty of disposing.
Application service platform system is developed based on following hierarchical structure, and on proxy server, proxy server, infrastructure service and the load running application on application server cluster is all developed based on following hierarchical structure specifically:
Exploitation basic framework class libraries (Framework): basic framework class libraries provides basic Core Feature and the expansion interface for customizing in specific transactions field; In basic framework class libraries, define and realize multiple application component AppBean type of foundation, and in basic framework class libraries predefine the realization of application context interface and basic application context type, so that basic Core Feature to be provided; Wherein application corresponding to different AppBean type of foundations, for the processing of dissimilar signaling; The expansion interface that basic framework class libraries provides is specifically used for the new AppBean type of foundation expanded in business framework class libraries BizLibrary and new application context.
According to traffic performance, on the basis of basic framework class libraries, be developed as the business framework class libraries (Biz Library) of business customizing.Business framework class libraries also provides the expansion interface of traffic aided, for expanding new application;
Based on basic framework class libraries and business framework class libraries, exploitation realizes application, infrastructure service and the proxy server of business demand.
Application-dependent, in Framework and Biz Library, realizes business demand.
Infrastructure service depends on Framework and Biz Library, and infrastructure service is provided.
Proxy server depends on Framework and Biz Library, realizes route and loading functional based on business.
In embodiments of the present invention, provide the application and development pattern based on application component (AppBean).Here the granularity that defines minimum exploitation and load is AppBean, and an AppBean is defined as the application program that realizes a small granularity function.
Generally application definition is arrived to signaling rank; be defined into the concrete manifestation form of application of signaling rank according to the difference of business; can have multiple, such as being a specific Http request (as GET/default.do), or a specific up note (FROM:13800138000; TO:10658000032; TEXT:HELLO), or a specific SIP instruction, or a RPC instruction (method is not an interface) etc.
In the embodiment of the present invention, process the application of one or more of instructions, be defined as AppBean, the least unit that application can develop and field is AppBean, can be for a signaling or many signalings exploitation AppBean, and be deployed in plateform system, accept user's request, request may be from user's client software, browser, internal reference, or outside signaling is called.
In the embodiment of the present invention, based on Java, realize certain applications, AppBean is described to an interface (interface), and all specific AppBean can derive from from this interface, in order to realize specific method, such as mechanism, configuration initialization, service loading and service unloading etc. are installed certainly.
AppBean is an abstraction interface, but during application and development, must derive from from the AppBean type of foundation (BaseAppBeanTypes) for specific signaling Treatment Design.
In embodiments of the present invention, the AppBean type of foundation of having realized comprises: process the JobAppBean of the HttpAppBean of HTTP request, the RemoteAppBean that processes RPC request and processing timed task etc.
Each specific AppBean type of foundation can be processed the signaling of particular form, and application developer need to select suitable AppBean type of foundation to go to realize the application of oneself.AppBean type of foundation is not limited to above-mentioned several, can expand the BaseAppBeanType of particular type, and realize the Proxy of particular type processing in the aspect of Biz Library.
About application context (being called AppContext)
In the present invention, not only development mode is split as towards independent signaling, and signaling and application context are bound together, application context is called AppContext.In application service platform system of the present invention, application service context (AppContext) is the key of application call and resource location.Here application call comprises that proxy server calls application service, and in application service, calls other application service, and these two kinds of application all need AppContext to come the location of realize target application service.
AppContext can understand like this: the place environment identity of a current application operation of AppContext binding, such as active user, do like this, developer is based on AppContext(active user in the exploitation moment) develop, access resources (database, file, buffer memory) all must be by current AppContext, developer can be without management database like this, file, the fractionation problem of buffer memory etc., even user data across problem in computer rooms, only close and develop based on active user, simplified greatly development mode, system deployment architecture and development process are kept apart, realize efficient, PaaS platform easily.
AppContext forms and is divided into two parts from data, and AppContext is serializability and unserializing:
(1) generic resource identifier URI(Context Uri): be string format, comprise user's index information, be responsible for follow-up location, as id:230302023; Session:13910000001.
(2) additional data (ContextData): be the strongly-typed data structure that predefine is good, can comprise multiple fields; It comprises the attribute information of this application; The attribute information of application comprises: session parameter, authorization message etc.;
In some occasion, additional data can produce and be applied in the long Proxy server scene connecting by Proxy.
Support getNamedValue (String fieldName) method, can get the data of a specific fields name, the method is used to gray scale issue occasion (seeing below literary composition).
AppContext is abstract base class, in Framework predefine below AppContext subclass:
NullContext: predefined empty context, is used in and does not need contextual occasion;
SessionContext: preserve the context of session Id for predefined.
In complicated applications, generally can in Biz Library, expand specific AppContext, such as an IM system, on SIP Proxy, can preserve user's Session, we can expand UserContext so, can receive the upper Session information of preserving of Proxy in the time of so each application processing.
When using application service system platform of the present invention to carry out regarded as output controlling, need some bases that first custom service is relevant, AppContext is exactly one of them.Exemplify a specific embodiment about AppContext below.
For example: use application service platform system of the present invention to open an instant message (IM) system, user in this IM system adopts an integer id to position, can customize according to following mode so the AppContex of this IM system, from AppContext, derive from called after UserContext:
Uri part: " id:230302023 ", represent user's id, so by this user's id, application service position and database memory location that can consumer positioning;
Data part:
-user's logging in network address;-client type etc.;
When having customized user's UserContext, the AppBean operating based on user in all these systems can use the ﹤ C ﹥ parameter of UserContext as AppBean, as:
-obtain subscriber data;-subscriber data is set;-obtain buddy list etc.;
In addition, in application service platform system of the present invention, except providing the AppContext based on unique user, type of service based on group is also provided, and the application service of exploitation based on group, also needs the AppContext of customization based on group, IM system is used an integer to be used for identifying group, from AppContext, derive from, called after GroupContext, the structure of GroupContext is as follows:
Uri part: " group:123123 ", the sign id of group, expression user's id, by the id of this group, we can locate the application service position of group, with database memory location so;
Data part:
The session parameter of-group; The mandate of-group etc.;
When after the GroupContext having customized based on group, all AppBean that operate based on group in this system can use the ﹤ C ﹥ parameter of GroupContext as AppBean, as:
-group name is set;-renewal group authority;-obtain group deferred information etc.
Metadata mark (Annotations) information of application
In invention, while developing an application AppBean and expansion AppBean, can be by the mode of loading of Java metadata mark (Annotation) mark application, the data such as operational mode, after this data compilation, can load in the runtime, or from the binary system bag compiling, data be extracted from reflection.
In an embodiment of the present invention, as described below, the AppBean of expansion can define own specific Annotation to some predefined Annotations.
1. name and the systematic name of@AppName(application)
Name and the systematic name of statement AppBean;
–@AppName(category="Core",name="GetUserInfo");
Here@xxx is the mark of Java language to program metadata.
The Category:name overall situation is unique;
Category can be for the classification of AppBean;
– facilitates O&M personnel to be configured and classifies;
–, in a Category, if allow an AppBean to be accessed by the AppBean in other Category, must become this AppBean statement openly, or friendly;
@Public (): allow all AppBean access;
@Friendlly (" Core "): only allow to specify Category access;
@Friendlly (" Core:AddBuddy "): only allow to specify application access.
2. the state information of@Stateful(application)
When statement, an AppBean has state, and this AppBean can be kept at state in the machine internal memory;
The application that does not mark@Stateful is all considered as stateless application, bans use of the machine internal memory to carry out the preservation of state;
If the Stateful parameter the same (" Presence ") of the multiple AppBean statements in a Category, these several AppBean start in a process, and do not allow heat separately to upgrade;
Can lost condition in the time of being applied in heat and upgrading of@Stateful, so go to replace by memcache mode as far as possible, suggestion is only in the very high field startup of some performance requirement;
When certain AppBean is declared as Stateful, for the access of this AppBean, can adopt the mode of the consistency Hash of the AppContext binding of this AppBean to carry out route.
3.@HttpPrefix
HttpPrefix(HTTP prefix, only for HttpAppBean)
The Http request scope of processing for marking a HttpAppBean;
As :@HttpPrefix ("/login.do ");
-represent that this HttpAppBean processes take login.do as initial http request.
Message Name(event title, only for MessageAppBean)
For marking the title of a MessageAppBean;
As :@Message Name
4.@ContextLoader(load application Service context information)
Be used for marking an AppBean and how load AppContext
As :@ContextLoader (name=" CookieParser ")
-represent to remove to process Context by the program of CookieParser by name;
-CookieParser program is built in the middle of Proxy, by the Cookie field of processing in Http Request, removes to load user related information.
In an embodiment of the present invention, some predefined Annotations are not limited to as above several, can be according to other mark of practical business increase in demand.
Basis AppBean type (AppBeanBaseType)
In Framework, realize the step of an AppBeanBaseType and describe as follows:
An AppBeanBaseType comprises following assembly and characteristic:
AppBeanBaseType is an abstract base class
AppBeanBaseType must add mark@AppBeanBaseType, could be recognized by AppLoader like this
In AppBean, do not have the method for definition process business, but the abstract method of processing business must be provided in AppBeanBaseType, offer application subclass and go to realize
In the application moment, AppBeanBaseType is single-piece, can import whole required parameters of this service operation in Business Processing abstract method into, and with the affairs abstract class of answer method, we are referred to as AppTx
AppTx generally can be bundled on an AppContext
Must realize corresponding AppHost class, the actual method for processing business that triggers AppBean of AppHost class meeting, AppHost can derive from together with AppBeanBaseType
Generally need to realize the AppBeanRouteManager that is responsible for this request of distribution and the Proxy(independent agency service of processing application)
In Framework, realized the AppBeanBaseType on several bases, but applying spendable AppBean is not limited to several types below, can also on Biz Library level, expand.
1.HttpAppBean(HTML (Hypertext Markup Language) application component)
HttpAppBean is for the treatment of a specific Http request, and Http request may come from the direct request from subscription client browser or program, and request meeting is forwarded in application process by 7 layers of load of intelligence of Http Proxy.Http request also may derive from the request of other servers.
HttpAppBean<C extends AppContext> is a general type class, and wherein general shape parameter is explained as follows:
Context <C>: the context of particular type
Context source: from where obtaining context ﹤ C ﹥;
URL prefix: the URL prefix (URL prefix is processed by@HttpPrefix metadata mark) that this application is processed
HttpAppBean indicates own handled request UrlPrefix(prefix by mark), for example, develop a step for the simplest HttpAppBean roughly as follows:
1. from the base class of HttpAppBean, derive from
@HttpPrefix(“/Hello”)
@AppName(category=”example”name=”hello”)
class?HelloWorldAppBean?extends?HttpAppBean<NullContext>()
2. specifying context type <C>, is NullContext, does not need context;
3. by@HttpPrefix, mark, represent for the treatment of the address that is dealt into@HttpPrefix mark
Request;
4. by AppName, mark, represent that the catalogue of this application is example, name is called hello;
5. realize process () method, process () method is the abstract method defining in HttpAppBean,
Read HttpRequest, after processing, return to HttpResponse to client.
For example: developing a flow process for the application of user's unified login authentication is:
1. from the base class of HttpAppBean, derive from;
2. specifying application service context type ﹤ C ﹥ is SessionContext;
3. specify Context source for the ssic field in cookie;
4. realize process method, read HttpRequest, after processing, return
HttpResponse is to client.
2.RemoteAppBean(far call application component)
RemoteAppBean derives from from AppBean, is used for processing a specific Rpc request, and Rpc request may derive from following several scene
Deriving from calling of other AppBean, may be to carry out arbitrarily Source Type;
Derive from its proxy;
Deriving from other external service calls.
RemoteAppBean is a general type class, and wherein general shape parameter is explained as follows:
<A>: required parameter, strongly-typed definition, serializability;
<R>: reply parameter, strongly-typed definition, serializability;
<C>: the application context of particular type.
Realize a RemoteAppBean definite following type must be provided, the step of for example developing the RemoteAppBean that a processing obtains subscriber data is as follows:
1. from the base class of RemoteAppBean, derive from
@AppName(category=”example”,name=”GetUserInfo”)
class?GetUserInfo?extends?RemoteAppBean<GetOption,UserInfo,
NullContext>
2. definition required parameter type <A> is GetOption, and GetOption is serializability class, preserves id and the option parameter of obtaining user;
3. defining and replying parameter type <R> is UserInfo, and UserInfo is serializability class, preserves user profile;
4. defining context <C> is NullContext, does not need context in present case;
5. after inheriting, realize process () method for the treatment of service logic, inherit load () method and use with just
Beginningization, inherits the unloading of unload () method, inherits setup () method and realizes from installing.
The application context (AppContext) of the particular type that this RemoteAppBean states when realizing must be provided when calling a RemoteAppBean.
An application meeting of obtaining user profile is stated as follows:
1. from RemoteAppBean ﹤ GetOption, UserInfo, derives from UserContext ﹥;
A. required parameter ﹤ A ﹥ is GetOption, for obtaining some option parameter of user
B. replying parameter ﹤ R ﹥ is UserInfo, is the set of user profile
C. application context ﹤ C ﹥ is UserContext, is the user profile of current context, and UserContext is for identifying user ID
2. realize process method and process service logic
3.JobAppBean(task application assembly)
JobAppBean derives from from AppBean, is used for processing a timed task, and can in the overall situation, guarantee that timed task monopolizes operation in certain resource.
The step that realizes a JobAppBean is as follows
1. from the base class of JobAppBean, derive from
@JobSchedule(cron=”*/5****”)
@JobResource(resource=”USERDB”,parallel=true)
@AppName(category=”example”,name=”GetUserInfo”)
class?GetUserJobApp?extends?JobAppBean
2. the running time of definition Job, wherein the running time of Job is according to explaining in Corn expression formula
Time operation
3. the resource that definition Job will monopolize, asks for an interview next joint about the definition of resource, after binding resource,
JobAppBean in plateform system will can not rerun when for this resource.
Resource access location based on AppContext
In the present invention, define and realize after an application with certain business function, this application certainly will will be accessed various resources, as database, file server, memory object buffer server or other services providing etc.Application service platform system in the present invention is large-scale distributed system, so these resources are not single-point services, namely the database of same type may exist the example of multiple longitudinal fractionations (Sharding).The resource binding that in the present invention, an application can be accessed is on its application context AppContext.
Such as, stating an application of obtaining user profile, GetUserInfoApp by name, reads customer data base (UserDB) at the realization link of application, and result is returned.There are multiple examples of longitudinally splitting of being undertaken carrying out after delivery by user id in UserDB wherein.
Detailed process is as follows so:
1. proxy server Http Proxy receives the Http request that comes from client;
The URL that 2.Http Proxy asks by Http judges the application of this request correspondence; Be specially Http Proxy by the application configuration information list on access central server, find the@HttpPrefix application configuration information list items consistent with the URL of Http request in metadata mark Annotations field, the application that this list item is corresponding is this Http and asks corresponding application;
3.Http Proxy is the request of GetUserInfoApp by this request of step 2 identification, and needs UserContext as context parameters;
4.Http Prorxy is according to the@ContextLoader in the Annotations field in application configuration information list item, and the relevant information of extracting in Http request message creates UserContext;
After 5.Http Proxy has added UserContext data in the Http request from client, Http request is forwarded to the application server at GetUserInfoApp place; Here by the list of inquiry application operation information, obtain the address of service of GetUserInfoAPP.
6. the application process of the operation GetUserInfoApp on application server receives Http request, extracts UserContext, and gives GetUserInfoApp and process;
7.GetUserInfoApp reads UserDB, when reading UserDB, by the id information in UserContext, carries out the location of UserDB;
8.GetUserInfoApp organizes returned packet, and returns to Http Proxy;
9.Http Proxy returns to client by returned packet.
In the step 7 of said process, by resource (Resource) table, position.Resource table is in one embodiment of the invention as shown in table 1:
Figure GDA0000434128390000131
Table 1
Can, by realizing different mapping function (Locator), realize the different locate modes for different resource.For example, in upper example, the concrete configuration of resource table is as shown in table 2:
Figure GDA0000434128390000132
Table 2
While using id:1001 location UserDB in step 7, ModDatabaseLocator can take out 1001, and by 1001 except 5, remainder number is 1, returns to the database instance of UserDB.1 by name.
Again for example:
Develop an instant message (being abbreviated as IM) system, user in this IM system adopts the id of an integer to position, and scheme customizes the AppContext of this IM system so as follows, from AppContext, derives from, called after UserContext
– Uri part: " Id:230302023 ", represent user's id, so by this user's id, the application site that we can consumer positioning, with database memory location
– Data part:
User's logging in network address,
Client type
Deng
As the UserContext having customized based on user, the AppBean operating based on user in all these systems can use the <C> parameter of UserContext as AppBean
As: obtain subscriber data, subscriber data is set, obtains buddy list,
But in an IM platform, except the AppContext based on user is provided, also there is the type of service based on group, the application of exploitation based on group, also need the AppContext of customization based on group, IM system is used an integer to be used for identifying group, and GroupContext structure is as follows so
– Uri part: " group:123123 ", the sign id of group, expression user's id, by the id of this group, we can locate the application site of group, with database memory location so
– Data part comprises: the session parameter of group, the mandate of group etc.
When after the GroupContext having customized based on group, the AppBean operating based on group in all these systems can use the <C> parameter of GroupContext as AppBean
As: group name is set, upgrades group authority, obtains group deferred information,
Next introduce application and development mode based on plug-in unit and the pouring-in debud mode of application
In the application and development based on Java of the present invention, based on existing plug-in unit system (Eclipse), generated expansion plugin, this expansion plugin connects development management server and realizes following functions:
Create also management engineering assembly, the upgrade-system of realization based on version;
Create the skeleton code of application;
The generation of realization to RemoteAppBean invoke code, and the Dependency Specification of assisting management;
The pouring-in debugging of realization to application.
The version management of assembly
In native system, in exploitation, need to carry out the dependence of different editions assembly, the mode relying on for the version of base library is as follows, for example:
During exploitation Apps1.0, rely on as Framework-1.0.jar BizLibrary-1.0-jar;
During exploitation Apps2.0, rely on as Framework-1.1.jar BizLibrary-2.0-jar.
Native system addresses this problem like this, and version is defined as follows:
1.0 versions, rely on storehouse and comprise: Framework-1.0.jar; BizLibrary-1.0.jar;
2.0 versions, rely on storehouse and comprise: Framework-1.1.jar; BizLibrary-2.0.jar.
This version information is created by development management person, and each upgraded version all need to increase this configuration information newly in the repository of development management server.
Dependence configuration during new construction is set up
While creating App engineering, exploitation need to be selected a current version, and when developer selects after version, the step that plug-in unit carries out is as follows:
1. by development management server, obtain the information of the bag of dependence;
2. obtain the bag of particular version;
3. dependence is joined in current App engineering-environment;
4. version number is write (this version also can follow-uply have influence on program and reach the standard grade, and gray scale issue) in META-INF/AppBean.properties version
The dependence configuration upgrading of old engineering
When we need carry out the upgrading of old application according to the base library of new issue, such as, when base library upgrades to 2.0 versions, our step during by application upgrade to 2.0 version of 1.0 versions is as follows:
1. developer selects current version to 2.0;
2. plug-in unit reads the dependence library information of 2.0 versions to edition management system;
3. the dependence plug-in unit of plug-in download development management system configuration;
4. replace local dependence;
5. upgrade successfully.
The generation of the invoke code to RemoteAppBean
RemoteAppBean is the key concept of realizing application exchanging visit and application level in native system, when having realized RemoteAppBean and after AppLoader uploads to central server, any one wishes that the application of this RemoteAppBean of access need to generate the proxy class of calling for this RemoteAppBean.
When the application that need to access RemoteAppBean of exploitation, expansion plugin obtains published all RemoteAppBean from development management server, and its information is shown to developer, and developer selects the RemoteAppBean that will call again; Expansion plugin obtains following information from the reflective information of selected RemoteAppBean: Apply Names and type information; Expansion plugin is according to obtained Information generation request and acknowledgement type entity class; Expansion plugin is according to described request and reply entity type establishment proxy class, and this proxy class is inserted in the described application that need to access RemoteAppBean.
Concrete steps are as follows:
1. developer starts to carry out RemoteAppBean dependence;
2. plug-in unit is accessed development management platform and is received current all disclosed RemoteAppBean, and developer is returned to and be shown to its information;
3. developer selects the RemoteAppBean that will call;
4. plug-in unit, from the reflective information of RemoteAppBean, obtains following information:
A)@AppName: Apply Names;
B) type information, comprising: request, reply, and context type;
5. plug-in unit basis Information generation request above, acknowledgement type entity class, this process is as follows:
A) AppLoader can, by request and acknowledgement type, save as the intermediate data of reflection, preserves in management platform storehouse;
If b) this type is in the middle existence of quoting of this engineering, directly quote such;
C) otherwise plug-in unit according to intermediate data, regenerate the code of request and the class of acknowledgement type;
6. the request of using previous step to obtain, with acknowledgement type, creates proxy class, and proxy class can be used the context type obtaining in step 4;
7. the initialization of proxy class is inserted in the AppBean calling.
Rely on and detect
In large-scale complex platform, the dependence between different services is a problem that is very difficult to management.
In the present invention, show the Dependency Specification creating between application, and detect Dependency Specification in the renewal process of application, with the renewal that determines whether to apply.
When AppLoader loads the App engineering of an Existence dependency, Dependency Specification can be saved as to following data:
Caller;
Callee;
The required parameter type information relying on;
The parameter type information of replying relying on.
For example, when application B relies on application A, system can create Dependency Specification:
Caller: B
Callee: A
The required parameter type information relying on: A.RequestArgs
What rely on replys parameter type information: A.ResponseArgs
Dependence in the renewal process of application detects
B is to A Existence dependency, but when A upgrades to A ', the step that relies on detection is as follows:
1. deployment program is uploaded application A ', and initiate to upgrade instruction;
2. deployment program finds that application program B depends on A, request that at this moment can the dependence to A to A ' and B and reply parameter and contrast, have two kinds possible:
A) request of A ' and reply the request of parameter and A and reply parameter compatibility (equate, or backward compatible), system allows to upgrade, and A and B are labeled as to refresh routine;
B) request of A ' and reply parameter and the request of A and to reply parameter incompatible, system will not allow to upgrade, unless the renewal of B is also submitted in the lump, or first B is rolled off the production line.
Version test specification is estimated
By the description of a upper joint scene, when the application and development of certain version, system can record the more new record of all time points, when system manager determines while reaching the standard grade version, can extract the range of application list that may have influence on after certain time point from certain time point like this.
This list can be carried out automatic test specification judgement, and the step of extraction is as follows:
1. find out all application of upgrading after time point;
2. find out the application that relies on these application;
3. recurrence is found out the application in step 2, until there is no refers to;
4. include all application of finding out in test specification.
Pouring-in debugging
Generally debug an application program and program division need to be deployed to (test environment or production environment) in the middle of actual motion environment, but the application being deployed in test environment is difficult to debugging, and native system has been invented a kind of pouring-in solution can solve the debugging problem of developer for running environment.
Solution is: expansion plugin is applied at local boot; The application of described startup creates and is connected with proxy server, and sends to proxy server the configuration parameter that will debug application; The described configuration parameter that will debug application limits the user in specified scope; Proxy server is receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessfully, client-requested is distributed to the application server at corresponding application place.
When the application of described startup is exited, interrupt being connected between proxy server, proxy server is deleted the configuration parameter of this application.
Fig. 2 is the schematic diagram of the pouring-in debug system in the embodiment of the present invention.Referring to Fig. 2, plug-in unit is connected with the proxy server in system shown in Figure 1, has only illustrated proxy server and the application server cluster in system shown in Figure 1 here.
As shown in Figure 2, in the environment of normal operation, proxy server can be directly issued in the request of client, and then proxy server sends specific application server according to application configuration, referring to the description of chapters and sections above.
The step of injecting debugging is as follows:
1. the application meeting starting by plug-in unit creates long connection with the proxy server of particular type (each all will create), and interception request;
2. application sends to proxy server the request of injection, and the configuration parameter of the application of debugging is sent to proxy server, and wherein the configuration parameter of plug-in unit restriction application must comprise grey parameter (namely can only affect the user in fixed range);
3. proxy server can add injection in local routing table;
4. when proxy server listens to after the request from client, can judge whether request meets current injection condition; The request meeting that does not meet injection condition is carried out route according to original logical routing.
5. the request meeting that meets injection condition is connected request is transmitted to the application that plug-in unit starts with the length of proxy server foundation by plug-in unit;
6. application meeting will be converted to request under normal circumstances from the request connecting, and pass to application and process, and will reply to return and send to proxy server, and descending to client by proxy server;
7. after application is exited, can interrupt with being connected of proxy server, at this moment proxy server can remove injecting item automatically.
So just realized the injection debugging of carrying out environment on developing engine.
From above-mentioned, this expansion plugin of the present invention is applied at local boot, the application of described startup creates and is connected with proxy server, and to debug the configuration parameter of application to proxy server transmission, proxy server is receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessful, again client-requested is distributed to the technical scheme of the application server at the correspondence application place in cloud computing application service system, can on the developing engine of application, carry out the pouring-in debugging of environment.
The foregoing is only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All any modifications of doing within the spirit and principles in the present invention, be equal to replacement, improvement etc., be all included in protection scope of the present invention.

Claims (10)

1. an application adjustment method, is characterized in that, realizes expansion plugin and application service platform system, and proxy server and cloud computing application service system are set in application service platform system, and the method comprises:
Expansion plugin is applied at local boot;
The application of described startup creates and is connected with proxy server, and sends to proxy server the configuration parameter that will debug application; The described configuration parameter that will debug application limits the user in specified scope;
Proxy server is receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessfully, client request message is distributed to the application server at correspondence in cloud computing application service system application place.
2. method according to claim 1, is characterized in that, the method further comprises:
When the application of described startup is exited, interrupt being connected between proxy server, proxy server is deleted the configuration parameter of this application.
3. method according to claim 1, is characterized in that,
The described expansion plugin of realizing comprises: based on plug-in unit system Eclipse, generate expansion plugin;
The method also comprises: in the development process of application, and this expansion plugin establishment management engineering assembly, realization upgrade-system, the skeleton code that creates application, generation and the assist management Dependency Specification of realization to far call application component RemoteAppBean invoke code based on version.
4. method according to claim 3, is characterized in that, described expansion plugin is realized the generation of RemoteAppBean invoke code is comprised:
When the application that need to access RemoteAppBean of exploitation, expansion plugin obtains published all RemoteAppBean from development management server, and its information is shown to developer, is selected the RemoteAppBean that will call by developer;
Expansion plugin obtains following information from the reflective information of selected RemoteAppBean: Apply Names and type information; Described type information comprises request, replys and contextual type information;
Expansion plugin is according to obtained Information generation request and acknowledgement type entity class;
Expansion plugin is according to described request and reply entity type establishment proxy class, and this proxy class is inserted in the described application that need to access RemoteAppBean.
5. according to the method described in any one in claim 1 to 4, it is characterized in that, if described, mate unsuccessfully, the application server that client request message is distributed to correspondence in cloud computing application service system application place comprises:
In cloud computing application service system, preserve the corresponding relation between descriptor and application and the application server of applying;
Proxy server is resolved client request message, determine corresponding application, according to the descriptor of this application, create application context, in described client request message, add after application context, according to described application and the corresponding relation between application server, client request message is distributed to the application server at corresponding application place.
6. method according to claim 5, is characterized in that, the method also comprises:
Described application server in described cloud computing application service system, when receiving the client request message of proxy server transmission, is given corresponding application by this client request message and is processed;
The task that this client request message is asked is processed in the application of described correspondence, according to described application context, carries out data resource location, draws result;
Application server returns to client by described result through proxy server.
7. method according to claim 6, is characterized in that,
Described cloud computing application service system comprises: central server, Resource Server and the application server cluster being comprised of multiple application servers; Wherein, on Resource Server, preserve the data resource that need to access when the task that client request message asks is processed in each application on application server;
Load operation application on described application server cluster;
Corresponding relation between described descriptor and application and the application server of preserving application in cloud computing application service system comprises: central server receives outside application of uploading, the descriptor of application is saved in application configuration information list, and by application deployment to the application server in application server cluster; Application server in application server cluster by the operation information of the application of institute's load upload on central server for preserving the application operation information list of corresponding relation between application and application server;
Wherein, application configuration information list comprises following information: application ID, Apply Names, application type, application process name and apply metadata mark; The list of application operation information comprises following information: the address of service of application process title and application;
Described proxy server receives client request message, client request message is resolved, determine corresponding application, and the described application server that client request message is distributed to corresponding application place according to the corresponding relation of applying between application server comprises: proxy server is when receiving client request message, client request message is resolved, by the application configuration information list on Help Center's server, identify the corresponding application of described client request message, by the application configuration information list on Help Center's server and the list of application operation information, obtain the address of service of corresponding application, according to obtained address of service, client request message is distributed to the application server at corresponding application service place.
8. method according to claim 7, is characterized in that,
Described proxy server creates application context according to the descriptor of application and comprises: proxy server is when receiving client request message, from client request message, extract required parameter, application configuration information list in Help Center's server, find out the application configuration information list items that required parameter and metadata mark field meet, then according in the metadata mark field in this application configuration information list items about the contextual information of load application, create application context;
On described central server, also preserve the Resources list; The Resources list comprises following information: resource name, resource type, application context type, location algorithm title and location algorithm parameter;
The task that client request message is asked is processed in described application, according to described application context, carrying out data resource location comprises: be applied in and receive after client request message, in the process that completes the task that this client request message asks, according to the corresponding informance in application context and the Resources list, carry out resource location.
9. an application debug system, is characterized in that, this system comprises: expansion plugin and application service platform system; Described application service platform system comprises: proxy server and cloud computing application service system;
Expansion plugin, for applying at local boot; The application of this startup creates and is connected with proxy server, and sends to proxy server the configuration parameter that will debug application; The described configuration parameter that will debug application limits the user in specified scope;
Proxy server, for receiving after client request message, first described in coupling, to debug the configuration parameter of application, if the match is successful, client request message is sent to the application processing of described startup, and the result that the application of described startup is returned sends to client, if mate unsuccessfully, client request message is distributed to the application server at correspondence in cloud computing application service system application place.
10. system according to claim 9, is characterized in that,
When the application of described startup is exited, interrupt being connected between proxy server;
Proxy server, for when the application connection breaking of described startup, deletes the configuration parameter of this application.
CN201110460663.8A 2011-12-31 2011-12-31 Application debugging method and system Active CN102413022B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110460663.8A CN102413022B (en) 2011-12-31 2011-12-31 Application debugging method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110460663.8A CN102413022B (en) 2011-12-31 2011-12-31 Application debugging method and system

Publications (2)

Publication Number Publication Date
CN102413022A CN102413022A (en) 2012-04-11
CN102413022B true CN102413022B (en) 2014-04-16

Family

ID=45914884

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110460663.8A Active CN102413022B (en) 2011-12-31 2011-12-31 Application debugging method and system

Country Status (1)

Country Link
CN (1) CN102413022B (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103024002B (en) * 2012-11-30 2016-02-17 北京奇虎科技有限公司 Request issues method and the browser of browser component
CN103916374B (en) * 2013-01-09 2018-04-20 腾讯科技(深圳)有限公司 Service gray scale dissemination method and device
CN108052340B (en) * 2013-08-13 2021-03-30 华为技术有限公司 Application upgrading method and device
CN103645926B (en) * 2013-11-14 2017-01-25 乐视致新电子科技(天津)有限公司 Method and device for calling correlation module
CN103645927B (en) * 2013-11-14 2017-01-11 乐视致新电子科技(天津)有限公司 Method and device for calling correlation module
US9223965B2 (en) 2013-12-10 2015-12-29 International Business Machines Corporation Secure generation and management of a virtual card on a mobile device
US9235692B2 (en) * 2013-12-13 2016-01-12 International Business Machines Corporation Secure application debugging
CN104991760B (en) * 2014-12-23 2018-05-25 广州亦云信息技术有限公司 PaaS platform service management system and implementation method based on distributed modular technology
CN105824745B (en) * 2015-01-04 2019-03-01 中国移动通信集团湖南有限公司 A kind of gray scale dissemination method and device
CN104699612B (en) * 2015-03-25 2019-05-31 北京嘀嘀无限科技发展有限公司 For processing method, equipment and the system in software test
CN106649081B (en) * 2015-11-03 2019-04-05 阿里巴巴集团控股有限公司 A kind of method and device that commissioning test wraps offline in client application
CN106155749B (en) * 2016-07-28 2019-12-31 苏州浪潮智能科技有限公司 Monitoring plug-in extension method and device
CN109286684B (en) * 2018-11-21 2021-06-15 广州市百果园信息技术有限公司 Communication connection processing method and device, proxy server and storage medium
CN111464574B (en) * 2019-01-21 2022-10-21 阿里巴巴集团控股有限公司 Calling, loading, registering and managing method and route, server, node and medium
CN110109738A (en) * 2019-04-24 2019-08-09 上海易点时空网络有限公司 The execution method and device of timed task
CN110209107A (en) * 2019-05-10 2019-09-06 宁波安信数控技术有限公司 A kind of method and system by DTU remote debugging PLC device
CN110493074B (en) * 2019-07-19 2021-02-02 珠海金山网络游戏科技有限公司 Method and system for testing server and client
CN111367805B (en) * 2020-03-05 2023-08-18 中国银行股份有限公司 Development and debugging method and device
CN113507498A (en) * 2021-06-02 2021-10-15 浪潮软件股份有限公司 Government affair hall device data exchange method and model
CN114003486A (en) * 2021-09-17 2022-02-01 西安震有信通科技有限公司 Plug-in debugging method, client, server and storage medium
CN113869016A (en) * 2021-09-28 2021-12-31 城云科技(中国)有限公司 Chart configuration method, device and computer program product
CN114168210A (en) * 2021-12-13 2022-03-11 中信科移动通信技术股份有限公司 Embedded equipment deployment method and system
CN114661851B (en) * 2022-05-23 2022-08-16 山东省国土测绘院 Online lightweight quick-response natural resource space information processing method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002024120A (en) * 2000-07-11 2002-01-25 Mitsubishi Electric Corp Distributed application server system
CN101110756A (en) * 2006-07-18 2008-01-23 华为技术有限公司 Application server distribution method and device
CN102185900A (en) * 2011-04-18 2011-09-14 北京新媒传信科技有限公司 Application service platform system and method for developing application services
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002024120A (en) * 2000-07-11 2002-01-25 Mitsubishi Electric Corp Distributed application server system
CN101110756A (en) * 2006-07-18 2008-01-23 华为技术有限公司 Application server distribution method and device
CN102185900A (en) * 2011-04-18 2011-09-14 北京新媒传信科技有限公司 Application service platform system and method for developing application services
CN102255752A (en) * 2011-06-30 2011-11-23 北京新媒传信科技有限公司 Configuration management system and method of server cluster

Also Published As

Publication number Publication date
CN102413022A (en) 2012-04-11

Similar Documents

Publication Publication Date Title
CN102413022B (en) Application debugging method and system
CN102497454B (en) Method for realizing gray publication of application in application service platform system
US10419289B2 (en) System and method for configuration management service
CN103283209B (en) A kind of application service platform system and its implementation
CN102427480B (en) Application access method in a plurality of application service platform systems
JP5265549B2 (en) Consolidated Discovery Web Service
US9632764B2 (en) Defining configurable characteristics of a product and associating configuration with enterprise resources
JP6164440B2 (en) Application upgrade method and apparatus
CN102523308B (en) Application development method and development and application platform system for operating method
US20080065656A1 (en) Discovery web service
US7440971B2 (en) Context based access of files by file system to a client based on detection of related files opened by the client
CN106406961A (en) Method and device for loading and providing application based on browser
US9696977B2 (en) Method and system for allocating ID of software component
CN106569880B (en) Method and system for dynamically sharing resources between Android applications
US20230205503A1 (en) Method for dynamically integrating application programs, and software system and machine using the same
US20130091416A1 (en) Method for establishing a relationship between semantic data and the running of a widget
US20130124693A1 (en) System, method, and device for executing a composite service
CN110716786B (en) Page display method, system and storage medium
CN112416612A (en) Service calling method and device, computer equipment and readable storage medium
CN101751258B (en) Intelligent card and developing method, system and deployment method for intelligent card application
CN111813836A (en) Method for improving Ethereum block chain system expansibility
CN111683005A (en) Internet of things intelligent gateway equipment and construction method thereof
CN112486509B (en) Jar package assembly hot deployment method and system
CN115729526B (en) Single and micro-service integrated software development method
CN106502754B (en) Activity component loading method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP02 Change in the address of a patent holder

Address after: Room 810, 8 / F, 34 Haidian Street, Haidian District, Beijing 100080

Patentee after: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

Address before: 100089 Beijing city Haidian District wanquanzhuang Road No. 28 Wanliu new building 6 storey block A room 602

Patentee before: BEIJING D-MEDIA COMMUNICATION TECHNOLOGY Co.,Ltd.

CP02 Change in the address of a patent holder