Download presentation
Presentation is loading. Please wait.
Published byMilton Pitts Modified over 8 years ago
1
1 Distributed Processing Framework Behind the scenes
2
2 Presentation structure The new DPF prototype Architecture Entities and interfaces Working of the prototype DPF background
3
3 Design 1/2 The need for well defined interfaces Interfaces need to be standardized at design phase Implemented by client and component (Agent and Station) DPF considerations Need to persist Agent state Need to remote Agent instance
4
4 Design 2/2 Persisting Agent state STG – Storage files IPersistStream – To read and write object state information as an array of bytes into a storage file Remoting an Agent Transfer of class information Instantiating a remote agent Reviving the agent
5
5 Entities & interfaces Station, Agent, StationManager IStation TransferAgentToRemoteHost ([in] BSTR szRemoteHostName, [in] BSTR bszComponentDllFileName, [in] BSTR bszAgentStateSTGFileName, [in] CLSID clsidOfAgent); RegisterDllComponent ([in] BSTR bszDllpath); StartAndRunAgent (); CopyAgentStateFromShare ([in] BSTR bszAgentStateSTGFileName); CopyAgentSourceFromShare ([in] BSTR bszComponentDllFileName); IAgent RunAgent ([in] IStation *pIStation); IPersist, IPersistStream, IPersistStreamInit Load (IStream *pStm); Save (IStream *pStm, BOOL fClearDirty); IsDirty (void); GetSizeMax (ULARGE_INTEGER *pcbSize); InitNew (void); GetClassID (CLSID *pClassID);
6
6 Working of the prototype Client- Create Agent component DLL Register Agent component Instantiate StationManager Pass to StationManager Agent IID and CLSID StationManager Instantiate Station (Load Station DLL into memory) Pass to Station Agent IID and CLSID Station Instantiate Agent (Load Agent DLL into memory) Call RunAgent method of Agent Upon ‘TransferAgent’ request, create new instance of Station on remote machine. Send Agent DLL and Agent STG files Remote Station instantiates Agent on remote machine Remote Agent retrieves persisted state and continues execution Agent Execute Agent specific code (RunAgent method) Persist state with methods implemented by Ipersist On transfer request call TransferAgent method of Station
7
7 COM Background Component development Description of Source code Execution environment Technology and terminology Registry Compile / build time & Debug time Software and tools
8
8 Component development Interface definition (standardization) Exporting to IDLs or TLBs Reverse engineering TLBs for type information (TLIs, TLHs) MIDL used on VC++ 7.0 attributed managed C++ Component registration
9
9 Description of source code StationManager.cpp Station.cpp Agent.cpp http://v.students.umkc.edu/vp4k3/
10
10 Execution environment Component developed as either DLL or.exe Component run either locally or remote (abstracted from client) Local DLL or.exe Remote dllhost.exe (or custom surrogate) or remote.exe
11
11 Technology and terminology ATL Active template library Virtual functions Late binding Member name resolution at compile time (avoid naming conflicts) Static member functions and static data elements Singleton components Inheritance Abstract base classes Virtual functions Pure virtual functions Code reuse (addition to existing code) and overloading GUIDS and guidgen.exe Smart pointers IinterfacePtr varPtr; CComPtr varPtr; HRESULTS VC++ 7.0 (yet to be released | limited online resources) Attribute (Compiler, IDL …) Dual, library, oleautomation, in, out, retval
12
12 Registry IID To indicate proxy stub marshaller CLSID TypeLib LocalServer32 InprocServer RemoteHostName AppId HKeyLocalHost
13
13 Software and tools VC++ 7.0 (part of Visual Studio.Net).Net SDK
14
14 Compile / build time & Debug time Compile time Merge files.mrg.cpp.obj.exe Link time Symbol table Debug time Symbol file.pdb devenv /debugexe symbol file path
15
15 Miscellaneous Robust code Checking all HRESULTS The ‘Chicken and the Egg’ problem Interface declaration fiasco Information needed at compile time IIDs, CLSIDs, TLBs, IDLs …
16
16 DPF – The next step Implementing a singleton DPF Station component Providing for persisting of basic byte stream Comparative analysis of an Agent based scenario vs. a non-Agent based scenario
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.