Beruflich Dokumente
Kultur Dokumente
ABISHA.N, DIVYA.R
DCOM Services:
Major Services offered by DCOM are, 1. 2. 3. 4. 5. Persistence Service Queuing Service Transaction Service Security Service Clustering Service
PERSISTENCE
Storing an Objects state permanently. Persistence is the ability of an object state to survive termination of the process in which the object executes. Persistence is transparent to client Persistent state service hide the details of data stores from server objects
Illustration of perpetuity which gives an illusion that the software system is continuously active. >>This is done by storing the state of the private member variables of an objects and then retrieving their values when needed. Allow a system to work with a large collection of data than that could be held by the system memory. Share data between multiple processes.
1.
2.
ACHIEVEING PERSISTENCE
To achieve persistence, an object should perform the following:
Implement the IPersistFile interface. Read its data at the start of each method. Write data to Storage whenever the state of the object changes. It is done without the acknowledgement of the client.
2)
3)
FILE SYSTEMS: In file systems, each bit has a unique address. Files that store data are identified by their pathname.
Structured storage
2 methods:
load store
Structured Storage(CONT)
Steps in storing objects to Structured storage: 1. Construct object(Objects Persistent object registry) added to
2. load and store cycle(Object utilize smart pointers to restore pointer values)
STREAM
TYPES OF STORAGE
STREAM : DISK STRUCTURE.
STORAGE
STREAM OBJECT
Provides ISTREAM interface. Equivalent to single disk file. Can have internal structure.
STORAGE OBJECT
Provides ISTORAGE interface. Equivalent to directory structure. Can have any number of sub-storages and stream.
MODES OF ACCESS
DIRECT MODE
TRANSACTE D MODE
Changes are buffered so that they may be saved/committed when modifications are complete
MONIKERS
The file names is used to identify an object. However, file names are unintelligent. Intelligent can be brought about by encapsulating the information of working with the names within the name itself. Here, the name becomes an object that implements name- related interfaces. These objects are called monikers. Each individual moniker object maintains its own name data that identifies some other particular object or operation.
IMONIKER
A moniker is simply an object that supports IMONIKER interface. IMONIKER interface includes IPersistStream interface.
Can be saved to and loaded from streams. Also helps to provide transparency to clients.
OPERATIONS OF IMONKER
1. BINDING:
Binding
Binding
function in IMONKER takes as a parameter the interface identifier by which the client communicates with object. to locate the object. Binding: Avoids repeated Connections.
Used
Expensive
OPERATIONS OF IMONKER(cont)
2. REDUCTION:
Re-writes
3. DISPLAY NAME:
Equivalent
INTERFACES
COM allows read and write itself to storage by providing additional interfaces. 3 important interfaces are:
Monikers in Detail
Object or Component that refers to specific instance of another object. Name which uniquely identifies an COM object Persistent Object & Naming Object 1:1 IMoniker Interface is a Framework Co Create Instance cant be used
Implementations of Monikers
File Monikers: Wrapper for file path name Item Monikers: Object within another Object Pointer Monikers: Object Exist only in Running State Anti-Moniker: Inverse of A moniker Composite Monikers: Composed of Other Monikers Class Monikers: Wraps CLSID URL Monikers: Manages URL Custom Moniker: Object Implements IMoniker Interface
Inheritance Hierarchy
IUnknown
IPersist
IPersistStream
IMoniker
IPersist
IPersistFile
Reads/Writes information into a Completely Separate File outside structured storage. Methods: 1.Load 2.Save 3.IsDirty 4.SaveCompleted 5.GetCurFile
IPersistentStorage
Reads/Writes information in a storage hierarchy 1.Load 2.Save 3.IsDirty 4.SaveCompleted 5.InitNew 6.HandsOffStorage
IPersistStream
Reads/Write Information in a single stream Basic Model and provides semantics of simple load and save 1.Load 2.Save 3.IsDirty 4.GetSizeMax
IPersistStreamInit
a moniker is created for a query, the programmer can reuse the query simply by calling the moniker in the code. Transactions made in Ecommerce