80 likes | 176 Views
A presentation on the DPF. The Distributed Processing Framework. CS 590L - Santhosh. The DPF objective. To provide for remoting of components at run-time To provide for a minimal mobile agent framework. Remoting components at run-time. Remoting a component – At the conceptual level
E N D
A presentation on the DPF The Distributed Processing Framework CS 590L - Santhosh
The DPF objective • To provide for remoting of components at run-time • To provide for a minimal mobile agent framework
Remoting components at run-time • Remoting a component – At the conceptual level • Component migration may be simulated by • Persisting current state of the component • Remoting state – storage information • Remoting component source • Instantiating agent on the remote machine • Reviving agent state • The DPF must provide for remoting an agent’s source, instantiating a remote agent, reviving the agent’s state, and transferring control back to the agent on the remote host
DPF – Entities and Interfaces • Components and interfaces • StationManager (IStationManager) - exe • Station (IStation) - exe • Agent (IAgent) – dll • Each component must adhere to well-defined, standardized interfaces in order to work with the framework
DPF – Entities and Interfaces • Interfaces • 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);
Working of the DPF prototype • A high level algorithm • Client- • Create Agent component DLL • 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 • Register Agent component • 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
IStation Machine A IStation Machine B Agent source Agent.dll Agent state STG Working of the DPF prototype • End user calls StationManager.exe with path to Agent.dll • StationManager calls Station.exe • Station registers Agent.dll • Station creates Agent • Agent executes and invokes IStation->TransferAgentToRemoteHost() when it wants to move • Station invokes ‘Remoting procedure’
DPF Prototype – The next step • Implementing a singleton DPF Station component • Providing for persisting of basic byte stream (framework handles persistence) • Comparative analysis of an Agent based scenario vs. a non-Agent based scenario