CN101021791A - Method and apparatus for realizing distributed object persistence and compiling unit - Google Patents

Method and apparatus for realizing distributed object persistence and compiling unit Download PDF

Info

Publication number
CN101021791A
CN101021791A CNA2007100794487A CN200710079448A CN101021791A CN 101021791 A CN101021791 A CN 101021791A CN A2007100794487 A CNA2007100794487 A CN A2007100794487A CN 200710079448 A CN200710079448 A CN 200710079448A CN 101021791 A CN101021791 A CN 101021791A
Authority
CN
China
Prior art keywords
persistence
distributed objects
time point
operation code
sign
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.)
Granted
Application number
CNA2007100794487A
Other languages
Chinese (zh)
Other versions
CN100456238C (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2007100794487A priority Critical patent/CN100456238C/en
Publication of CN101021791A publication Critical patent/CN101021791A/en
Priority to PCT/CN2008/070453 priority patent/WO2008110108A1/en
Application granted granted Critical
Publication of CN100456238C publication Critical patent/CN100456238C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4488Object-oriented
    • G06F9/4493Object persistence

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Multi Processors (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Devices For Executing Special Programs (AREA)

Abstract

The invention provides a methods and devices for Distributed Object Persistence, including: it automatically generates the operation codes according to a lasting logo during Distributed Object compile time. It reads time point of starting a lasting Distributed Object manipulation in the configuration file when the system setting up. It calls the time point corresponding to the operation code for Distributed Object manipulation lasting to protract Distributed Object manipulation.

Description

Realize method, device and the compilation unit of distributed objects persistence
Technical field
The present invention relates to the distributed system technical field, particularly realize method, device and the compilation unit of distributed objects persistence.
Background technology
Along with popularizing rapidly and the develop rapidly of modern information technologies of computer utility, resource sharing, information sharing, load Sharing, application integration and co-ordination are supported in application network requirement system high efficiency ground, and then improve its availability, reliability, maintainability and extensibility.
The distributed influence to upper layer application of distributed system shielding makes client as using local service to use the service of far-end (striding course or stride machine).Support is stored between the program level object of different address spaces and communicates each other, realizes the seamless far call between the remote object.Distributed system can provide following advantage:
1) reliability and soundness: resource redundancy and autonomous control make system possess dynamic restructuring, even stand local failure and also can work on.The modularity of system helps maintenance and uses.2) increment extendability:, needn't resemble and to replace total system the central system with the module of cheapness increment as system extension or resource updates.3) dirigibility: the configuration of system changes easily, to adapt to the various needs of different application objects.4) capability of fast response: computer resource particularly makes the little user of dispersion can obtain the quick response of computing machine and directly service more near the user, thus the computing power of large scale computer and micro computer easy to use the two combine.5) resource sharing: on basis, realize sharing of software, hardware resource, the available resources of unique user are multiplied to user transparent.6) strengthen computing power: the less-restrictive that is subjected to system scale by the parallel processing capability of task distribution; And the dedicated processes parts that distribute by function equally can enhanced system effective processing capacity.7) economy: the ratio of performance to price advantage that helps bringing into play microcomputer.8) adapt to various applied environments: the resource distribution on each node of distributed computer system can with the fine coupling of local user's demand, thereby like this some have dispersion user and require the application scenario of coordinating mutually again to be specially adapted to economic management, transaction management, process control etc.
Because the existence of above-mentioned advantage, distributed system is irresistible becomes the present and later application main force.After distributed objects was created in internal memory, they can not exist forever, therefore must carry out persistence to object.Narrow understanding, " persistence " only are forever to be saved in object in the database; The understanding of broad sense, " persistence " comprise and are saved in database, file system, tape or other machines or the like.The persistence of distributed objects has purposes widely, as the automatic passivation and the activation that can realize calling out in communication system; Can support call back up, realize high reliability (HA) mechanism or the like.The existing mode that distributed objects is carried out persistence mainly contains following implementation:
Realize that by object/relational model mapping (O/R Mapping) instrument distributed objects persistence: Hibernate is the object/relational model mapping (O/R Mapping) of a java open source code, O/RMapping provides multiple exemplary tool, and Hibernate is wherein a kind of just.O/R Mapping instrument has realized that object model below the java is to the automatic mapping of database model.Distributed objects can be persisted in the relevant database, or from relevant database, recover object.
But, realize because O/R Mapping instrument all is based on the java voice, thereby can't below C++ and other language, use.
Realize the distributed objects persistence by the manual programming method of calling: the serializing and the unserializing function that call distributed objects by the mode of manual programming, distributed objects is persisted in the relevant database, or from relevant database, recovers object.
When adopting said method, owing to must write extremely in program code distributed objects serializing and unserializing function calls point, thereby, when distributed objects changes, need write serializing and unserializing code function again; If serializing and unserializing point of invocation change, also need to revise user's program code.
Summary of the invention
The embodiment of the invention provides a kind of method, device and compilation unit of realizing the distributed objects persistence, to realize not relying on distributed objects persistence mode characteristic of speech sounds, general.
The embodiment of the invention comprises:
A kind of method that realizes the distributed objects persistence comprises:
For the distributed objects that needs persistence is provided with the persistence sign, when described distributed objects is compiled, generate the operation code that is used for the persistence operation automatically according to described persistence sign;
The time point that certain distributed objects of sign begins the persistence operation is set in configuration file; Distributed system reads described configuration file when starting, according to the time point of described beginning persistence operation, call the operation code that be used for persistence operation corresponding with described distributed objects, and described distributed objects is carried out the persistence operation.
A kind of device of realizing the distributed objects persistence comprises:
Dispensing unit, the language that is used for the application interface definition are to need the distributed objects of persistence that the persistence sign is set; The time point that certain distributed objects of sign begins the persistence operation is set in configuration file;
Compilation unit is used for generating the operation code that is used for the persistence operation according to described persistence sign;
The persistence unit is used for the time point according to described beginning persistence operation, calls the operation code that be used for persistence operation corresponding with described distributed objects, and described distributed objects is carried out the persistence operation.
A kind of compilation unit comprises:
The operation code generation unit when being used for the compiling of described distributed objects, generates the operation code that is used for the persistence operation automatically according to the persistence sign.
When the embodiment of the invention compiles distributed objects, generate the operation code that is used for the persistence operation automatically according to the persistence sign; The time point that certain distributed objects of sign begins the persistence operation is set in the configuration file that reads when distributed system starts; Call the operation code that be used for persistence operation corresponding according to this time point, described distributed objects is carried out the persistence operation with described distributed objects.
Use the present invention, make the persistence operation of distributed objects not rely on certain phonetic feature, thereby a kind of general distributed objects persistence mode is provided.Realize because the operation of distributed objects persistence is a distributed system, thereby alleviated the workload of programmer's exploitation and maintenance.
Description of drawings
Fig. 1 is a schematic flow sheet of realizing the distributed objects persistence according to an embodiment of the invention;
Fig. 2 is an apparatus structure synoptic diagram of realizing the distributed objects persistence according to an embodiment of the invention.
Embodiment
Below in conjunction with accompanying drawing the present invention is elaborated again.
As everyone knows, the persistence of so-called distributed objects is actual to be exactly the persistence of distributed objects attribute, for example, if certain distributed objects comprises three attributes, two needs persistences wherein, then can be called this distributed objects usually and need persistence, perhaps, certain or some attributes that also can be called this distributed objects need persistence.
Referring to Fig. 1, it is a schematic flow sheet of realizing the distributed objects persistence according to an embodiment of the invention.In the present embodiment, supposing has two attributes to need persistence in three attributes of a distributed objects.
Step 101 for the distributed objects that needs persistence is provided with persistence sign, is specially: increase a persistence and identify in IDL (Interface Definition Language) (IDL), certain attribute that is used to identify distributed objects needs persistence.The persistence sign is at the attribute of distributed objects, and each needs the corresponding persistence sign of distributed objects attribute of persistence.Because being the language of application interface definition, the persistence sign is provided with, like this can be so that specific implementation does not rely on characteristic of speech sounds.
For example:
interface?CommodityItem
{
Persistence sign attribute string name;
Persistence sign attribute long amount;
double?price;
};
Above-mentioned example represents that a distributed objects that is called CommondityItem has three attributes, wherein preceding two needs persistences.
Step 102 when application idl compiler device compiles distributed objects, generates the operation code that is used for the persistence operation automatically according to the persistence sign; This operation code that is used for the persistence operation can be the serializing function.Certainly, when generation is used for the operation code such as serializing function of persistence operation, can also generate the operation code of recovering the distributed objects property operations with corresponding being used to of operation code that is used for persistence operation automatically, this operation code that is used to recover the distributed objects property operations can be the unserializing function.The serializing function is used for distributed objects is carried out persistence operation, and the operating result of persistence is kept in impact damper (buffer) or the hard disk; The unserializing function is used for recovering distributed objects by the attribute of persistence according to the data in buffer or the hard disk.
Above-mentioned two steps can be counted as the pre-service of persistence operation, and between the step 103 not closely the time get in touch, but the code that generates uses for 103 steps, the workload of code was manually write in minimizing after code generated automatically.
Step 103, the time point of beginning persistence operation is set in configuration file, distributed system reads this configuration file when starting, time point according to described beginning persistence operation, call the operation code that be used for persistence operation corresponding, described distributed objects is carried out the persistence operation with distributed objects.
Distributed system can be kept at the result after the serializing in internal memory or the hard disk when the persistence distributed objects, perhaps, can also be synchronized to and realize HA mechanism in the backup node.
In above-mentioned configuration file, can also comprise: the time point of identification recovery distributed objects property operations; After distributed objects persistence operating result is saved, can also comprise like this: according to the time point that recovers certain distributed objects property operations, call the operation code that is used to recover the persistence operation, recover the persistence attribute of distributed objects.
The time point of the time point of above-mentioned beginning persistence operation or recovery distributed objects property operations can also exist before far call and afterwards before or after distributed objects is by far call simultaneously.
The embodiment of the invention also discloses a kind of device of realizing the distributed objects persistence,, comprising referring to Fig. 2:
Dispensing unit 210, the language that is used for the application interface definition are to need the distributed objects of persistence that the persistence sign is set; The time point that certain distributed objects of sign begins the persistence operation is set in configuration file;
Compilation unit 220 is used for generating the operation code that is used for the persistence operation according to described persistence sign;
Persistence unit 230 is used for the time point according to described beginning persistence operation, calls the operation code that be used for persistence operation corresponding with described distributed objects, and described distributed objects is carried out the persistence operation.
The described device of the embodiment of the invention can also comprise: persistence recovery unit (figure does not show), and at this moment, above-mentioned dispensing unit also is used for the time point of identification recovery distributed objects property operations; Compilation unit also is used for generating automatically the operation code of recovering the distributed objects property operations with described corresponding being used to of operation code that is used for the persistence operation; The persistence recovery unit is used for after described distributed objects persistence operating result is saved, time point according to described recovery distributed objects property operations, call the described operation code that is used to recover the persistence operation, recover the persistence attribute of distributed objects.
Similarly, the time point of the time point of beginning persistence operation or recovery distributed objects property operations can also exist before far call and afterwards before or after distributed objects is by far call simultaneously.
The embodiment of the invention also discloses a kind of compilation unit, comprising:
The operation code generation unit when being used for the compiling of described distributed objects, generates the operation code that is used for the persistence operation automatically according to the persistence sign.
Aforesaid operations code generation unit also is used for generating automatically the operation code of recovering the distributed objects property operations with described corresponding being used to of operation code that is used for the persistence operation.
As seen, the embodiment of the invention makes the persistence operation of distributed objects not rely on certain phonetic feature, thereby a kind of general distributed objects persistence mode is provided.Realize because the operation of distributed objects persistence is a distributed system, thereby alleviated the workload of programmer's exploitation and maintenance.
The above is preferred embodiment of the present invention only, is not to be used to limit protection scope of the present invention.All any modifications of being done within the spirit and principles in the present invention, be equal to replacement, improvement etc., all be included in protection scope of the present invention.

Claims (11)

1, a kind of method that realizes the distributed objects persistence is characterized in that, comprising:
For the distributed objects that needs persistence is provided with the persistence sign, when described distributed objects is compiled, generate the operation code that is used for the persistence operation automatically according to described persistence sign;
The time point that certain distributed objects of sign begins the persistence operation is set in configuration file; Distributed system reads described configuration file when starting, according to the time point of described beginning persistence operation, call the operation code that be used for persistence operation corresponding with described distributed objects, and described distributed objects is carried out the persistence operation.
2, method according to claim 1 is characterized in that,
The language that described persistence sign is the application interface definition is provided with, and at the distributed objects attribute, each needs the corresponding persistence sign of distributed objects attribute of persistence.
3, method according to claim 1 is characterized in that, described distributed objects persistence operating result is stored in internal memory or the hard disk, or is synchronized in the backup node.
4, method according to claim 3, it is characterized in that, to described distributed objects compiling, generation also comprises after being used for the operation code of persistence operation: generate the operation code of recovering the distributed objects property operations with described corresponding being used to of operation code that is used for the persistence operation automatically;
Also comprise in the described configuration file: the time point of identification recovery distributed objects property operations;
After described distributed objects persistence operating result is saved, also comprise: according to the time point of described recovery distributed objects property operations, call the described operation code that is used to recover the persistence operation, recover the persistence attribute of distributed objects.
5, method according to claim 4 is characterized in that,
The described function that is used for the persistence operation comprises the serializing function;
The described operation code that is used to recover the persistence operation comprises the unserializing function.
6, method according to claim 4, it is characterized in that, the time point of the time point of described beginning persistence operation or recovery distributed objects property operations before or after described distributed objects is by far call, or exists before far call and afterwards simultaneously.
7, a kind of device of realizing the distributed objects persistence is characterized in that, comprising:
Dispensing unit, the language that is used for the application interface definition are to need the distributed objects of persistence that the persistence sign is set; The time point that certain distributed objects of sign begins the persistence operation is set in configuration file;
Compilation unit is used for generating the operation code that is used for the persistence operation according to described persistence sign;
The persistence unit is used for the time point according to described beginning persistence operation, calls the operation code that be used for persistence operation corresponding with described distributed objects, and described distributed objects is carried out the persistence operation.
8, device according to claim 7 is characterized in that,
Described dispensing unit also is used for the time point of identification recovery distributed objects property operations;
Described compilation unit also is used for generating automatically the operation code of recovering the distributed objects property operations with described corresponding being used to of operation code that is used for the persistence operation;
This device also comprises:
The persistence recovery unit, be used for after described distributed objects persistence operating result is saved, according to the time point of described recovery distributed objects property operations, call the described operation code that is used to recover the persistence operation, recover the persistence attribute of distributed objects.
9, device according to claim 8, it is characterized in that, the time point of the time point of described beginning persistence operation or recovery distributed objects property operations before or after described distributed objects is by far call, or exists before far call and afterwards simultaneously.
10, a kind of compilation unit is characterized in that, comprising:
The operation code generation unit when being used for the compiling of described distributed objects, generates the operation code that is used for the persistence operation automatically according to the persistence sign.
11, compilation unit according to claim 10 is characterized in that,
Described operation code generation unit also is used for generating automatically the operation code of recovering the distributed objects property operations with described corresponding being used to of operation code that is used for the persistence operation.
CNB2007100794487A 2007-03-12 2007-03-12 Method and apparatus for realizing distributed object persistence and compiling unit Expired - Fee Related CN100456238C (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CNB2007100794487A CN100456238C (en) 2007-03-12 2007-03-12 Method and apparatus for realizing distributed object persistence and compiling unit
PCT/CN2008/070453 WO2008110108A1 (en) 2007-03-12 2008-03-10 Method and device for realizing distributed object persistence and compiling unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2007100794487A CN100456238C (en) 2007-03-12 2007-03-12 Method and apparatus for realizing distributed object persistence and compiling unit

Publications (2)

Publication Number Publication Date
CN101021791A true CN101021791A (en) 2007-08-22
CN100456238C CN100456238C (en) 2009-01-28

Family

ID=38709566

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2007100794487A Expired - Fee Related CN100456238C (en) 2007-03-12 2007-03-12 Method and apparatus for realizing distributed object persistence and compiling unit

Country Status (2)

Country Link
CN (1) CN100456238C (en)
WO (1) WO2008110108A1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008110108A1 (en) * 2007-03-12 2008-09-18 Huawei Technologies Co., Ltd. Method and device for realizing distributed object persistence and compiling unit
CN103309733A (en) * 2013-06-07 2013-09-18 深圳中兴网信科技有限公司 Task scheduling information persistence device and task scheduling information persistence method
CN103678609A (en) * 2013-12-16 2014-03-26 中国科学院计算机网络信息中心 Large data inquiring method based on distribution relation-object mapping processing
CN108399068A (en) * 2018-03-02 2018-08-14 上海赞控网络科技有限公司 Method, electronic equipment and the storage medium of function program persistence
WO2020001459A1 (en) * 2018-06-26 2020-01-02 华为技术有限公司 Data processing method, remote direct memory access network card, and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6638315B2 (en) * 1998-09-21 2003-10-28 Wall Data Incorporated Method for preserving the state of a java applet during the lifetime of its container
US6477701B1 (en) * 1999-09-30 2002-11-05 Seiko Epson Corporation Version-adaptive serialization and deserialization of program objects in an object-oriented environment
US7096419B2 (en) * 2001-02-16 2006-08-22 Sas Institute Inc. System and method for object state persistence
US20040010498A1 (en) * 2002-07-10 2004-01-15 Lin Tser Yeng Object persistence to relational database within run-time environment supporting attributes and reflection
US7197512B2 (en) * 2003-03-26 2007-03-27 Microsoft Corporation Type bridges
US20050149952A1 (en) * 2003-04-11 2005-07-07 Microsoft Corporation Persisting state across navigations in a navigation-based application and responding to navigation-related events throughout an application
US7502811B2 (en) * 2004-07-08 2009-03-10 International Business Machines Corporation Defer container-managed persistence operations on transactional objects
US7493313B2 (en) * 2004-09-17 2009-02-17 Microsoft Corporation Durable storage of .NET data types and instances
CN100456238C (en) * 2007-03-12 2009-01-28 华为技术有限公司 Method and apparatus for realizing distributed object persistence and compiling unit

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008110108A1 (en) * 2007-03-12 2008-09-18 Huawei Technologies Co., Ltd. Method and device for realizing distributed object persistence and compiling unit
CN103309733A (en) * 2013-06-07 2013-09-18 深圳中兴网信科技有限公司 Task scheduling information persistence device and task scheduling information persistence method
CN103678609A (en) * 2013-12-16 2014-03-26 中国科学院计算机网络信息中心 Large data inquiring method based on distribution relation-object mapping processing
CN103678609B (en) * 2013-12-16 2017-05-17 中国科学院计算机网络信息中心 Large data inquiring method based on distribution relation-object mapping processing
CN108399068A (en) * 2018-03-02 2018-08-14 上海赞控网络科技有限公司 Method, electronic equipment and the storage medium of function program persistence
CN108399068B (en) * 2018-03-02 2021-07-02 上海赞控网络科技有限公司 Method for function program persistence, electronic device and storage medium
WO2020001459A1 (en) * 2018-06-26 2020-01-02 华为技术有限公司 Data processing method, remote direct memory access network card, and device

Also Published As

Publication number Publication date
WO2008110108A1 (en) 2008-09-18
CN100456238C (en) 2009-01-28

Similar Documents

Publication Publication Date Title
CN102222012B (en) For the static type checking of external data source
JP4038564B2 (en) Computer-based system and method for performing data processing tasks
CN100498719C (en) Method and device for executing batch processing job
Kaveh et al. Deadlock detection in distribution object systems
CN103336705A (en) Automatic transcoding and semantic adaptation between scripting and workflow systems
US20070016893A1 (en) Tracking resource usage by applications
JP5396979B2 (en) Software development support device, system, software development support device function expansion method, and program
CN104050261A (en) Stormed-based variable logic general data processing system and method
CN102810057A (en) Log recording method
CN100456238C (en) Method and apparatus for realizing distributed object persistence and compiling unit
CN102355499B (en) Cloud computing system
CN102591778B (en) Evaluation system of extendable program competition based on service
US20090171897A1 (en) Method and system for case management
CN102859489A (en) Resumable methods
CN101727648A (en) Overtime control method in service system and service system
US20050268283A1 (en) Audited builds based upon separate class dependency records
CN103257852A (en) Method and device for building development environment of distributed application system
CN114925084A (en) Distributed transaction processing method, system, device and readable storage medium
CN101789944B (en) Development system of communication protocol stack of multifunctional energy meter
CN103473034A (en) Method and device for dynamically publishing Web service
CN109683950A (en) Application program packaging method, device, storage medium and terminal
CN101136780A (en) Method, system to obtain user command information, and user command registered device
CN109558121A (en) Development approach, device, equipment and the storage medium of interface drive program
CN111880811A (en) Method for realizing resource arrangement of cloud platform
Arief et al. Automatic generation of distributed system simulations from UML

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
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20090128

Termination date: 20200312

CF01 Termination of patent right due to non-payment of annual fee