SlideShare a Scribd company logo
1 of 22
DCOM-CORBA Comparison Operating Systems II Reference: P. Chung et al., DCOM and CORBA: side by side, step by step,and layer by layer, C++ Report. http://www.research.att.com/~ymwang/papers/HTML/DCOMnCORBA/S.html
[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object]
Communication ,[object Object],[object Object],[object Object],[object Object]
Sample application ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
// uuid and definition of IGrid1 [  object,  uuid(3CFDB283-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring("IGrid1 Interface"), pointer_default(unique) ] interface IGrid1 : IUnknown  { import "unknwn.idl"; HRESULT get([in] SHORT n, [in] SHORT m, [out] LONG *value); HRESULT set([in] SHORT n, [in] SHORT m, [in] LONG value); }; // uuid and definition of IGrid2 [  object,  uuid(3CFDB284-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring("IGrid2 Interface"), pointer_default(unique)  ] interface IGrid2 : IUnknown  { import "unknwn.idl"; HRESULT reset([in] LONG value); }; DCOM IDL Each interface and class has GUIDs
// uuid and definition of type library [  uuid(3CFDB281-CCC5-11D0-BA0B-00A0C90DF8BC), version(1.0), helpstring("grid 1.0 Type Library) ] library GRIDLib { importlib("stdole32.tlb"); // uuid and definition of class [  uuid(3CFDB287-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring("Grid Class") ] // multiple interfaces coclass CGrid {  [default] interface IGrid1; interface IGrid2; }; }; DCOM IDL (continued) multiple views for Grid
interface grid1  { long get(in short n, in short m); void set(in short n, in short m, in long value); }; interface grid2  { void reset(in long value); }; // multiple inheritance of interfaces interface grid: grid1, grid2  { }; CORBA IDL
DCOM server class definition (cgrid.h)  #include "grid.h" // IDL-generated interface header file class CGrid : public IGrid1, public IGrid2 { public: // IUnknown STDMETHODIMP QueryInterface(REFIID riid, void** ppv); STDMETHODIMP_(ULONG) AddRef(void)  { return InterlockedIncrement(&m_cRef); } STDMETHODIMP_(ULONG) Release(void)  { if (InterlockedDecrement(&m_cRef) == 0)  { delete this; return 0; } return 1; } // IGrid1 STDMETHODIMP get(IN SHORT n, IN SHORT m,  OUT LONG *value); STDMETHODIMP set(IN SHORT n, IN SHORT m,  IN LONG value); // IGrid2 STDMETHODIMP reset(IN LONG value); // create and destroy methods, and private declarations are not shown }
CORBA server class definition (grid_i.h) #include "grid.hh" // IDL-generated interface header file class grid_i : public gridBOAImpl {  public: virtual CORBA::Long get(CORBA::Short n, CORBA::Short m, CORBA::Environment &env); virtual void set(CORBA::Short n, CORBA::Short m,  CORBA::Long value, CORBA::Environment &env); virtual void reset(CORBA::Long value,  CORBA::Environment &env); grid_i(CORBA::Short h, CORBA::Short w); virtual ~grid_i(); private: CORBA::Long **m_a;  CORBA::Short m_height, m_width;  };
#include &quot;cgrid.h&quot; STDMETHODIMP CGrid::QueryInterface(REFIID riid, void** ppv) { if (riid == IID_IUnknown || riid == IID_IGrid1)  *ppv = (IGrid1*) this; else if (riid == IID_IGrid2) *ppv = (IGrid2*) this; else { *ppv = NULL; return E_NOINTERFACE; }  AddRef(); return S_OK; }  STDMETHODIMP CGrid::get(IN SHORT n, IN SHORT m, OUT LONG* value) { *value = m_a[n][m]; return S_OK; } extern HANDLE hevtDone; CGrid::~CGrid () { for (int i=0; i < m_height; i++)  delete[] m_a[i]; delete[] m_a; SetEvent(hevtDone); } DCOM Server Implementation create, set, reset method  implementations are not shown
#include &quot;grid_i.h&quot; CORBA::Long grid_i::get(CORBA::Short n, CORBA::Short m,  CORBA::Environment &) {  return m_a[n][m]; } void grid_i::set(CORBA::Short n, CORBA::Short m,  CORBA::Long value, CORBA::Environment &) { m_a[n][m] = value; } void grid_i::reset(CORBA::Long value, CORBA::Environment &) { short n, m; for (n = 0; n < m_height; n++)  for (m = 0; m < m_width; m++)  m_a[n][m]=value; return; } // create and delete not shown CORBA Server Implementation
HANDLE hevtDone; void main() { // Event used to signal this main thread  hevtDone = CreateEvent(NULL, FALSE, FALSE, NULL); hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); CClassFactory* pcf = new CClassFactory; hr = CoRegisterClassObject(CLSID_CGrid, pcf, CLSCTX_SERVER,  REGCLS_MULTIPLEUSE , &dwRegister); // Wait until the event is set by CGrid::~CGrid() WaitForSingleObject(hevtDone, INFINITE); CloseHandle(hevtDone); CoUninitialize(); } DCOM Server main program
int main()  { // create a grid object using the implementation class grid_i grid_i ourGrid(100,100); try { // tell Orbix that we have completed the server's initialization: CORBA::Orbix.impl_is_ready(&quot;grid&quot;); } catch (...) { cout << &quot;Unexpected exception&quot; << endl; exit(1); } } CORBA Server main program
#include &quot;grid.h&quot; void main(int argc, char**argv) { IGrid1  *pIGrid1; IGrid2  *pIGrid2; LONG  value; CoInitialize(NULL);  // initialize COM CoCreateInstance(CLSID_CGrid, NULL, CLSCTX_SERVER,  IID_IGrid1, (void**) &pIGrid1); pIGrid1->get(0, 0, &value); pIGrid1->QueryInterface(IID_IGrid2, (void**) &pIGrid2); pIGrid1->Release(); pIGrid2->reset(value+1); pIGrid2->Release(); CoUninitialize(); } DCOM client program
CORBA client program #include &quot;grid.hh&quot; void main (int argc, char **argv)  { grid_var gridVar;  CORBA::Long value; // bind to &quot;grid&quot; object; Orbix-specific gridVar = grid::_bind(&quot;:grid&quot;); value = gridVar->get(0, 0); gridVar->reset(value+1); }
Registration ,[object Object],[object Object],[object Object],[object Object]
Observations ,[object Object],[object Object],[object Object]
DCOM Middle layer ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
CORBA middle layer ,[object Object],[object Object],[object Object],[object Object],[object Object]

More Related Content

What's hot (19)

Remote Method Invocation (RMI)
Remote Method Invocation (RMI)Remote Method Invocation (RMI)
Remote Method Invocation (RMI)
 
C O R B A Unit 4
C O R B A    Unit 4C O R B A    Unit 4
C O R B A Unit 4
 
Component object model and
Component object model andComponent object model and
Component object model and
 
Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)Component Object Model (COM, DCOM, COM+)
Component Object Model (COM, DCOM, COM+)
 
Corba model ppt
Corba model pptCorba model ppt
Corba model ppt
 
Distributes objects and Rmi
Distributes objects and RmiDistributes objects and Rmi
Distributes objects and Rmi
 
Kotlin- Basic to Advance
Kotlin- Basic to Advance Kotlin- Basic to Advance
Kotlin- Basic to Advance
 
Java RMI Detailed Tutorial
Java RMI Detailed TutorialJava RMI Detailed Tutorial
Java RMI Detailed Tutorial
 
05 rpc-case studies
05 rpc-case studies05 rpc-case studies
05 rpc-case studies
 
C++ polymorphism
C++ polymorphismC++ polymorphism
C++ polymorphism
 
RMI
RMIRMI
RMI
 
1204csharp
1204csharp1204csharp
1204csharp
 
Oop l2
Oop l2Oop l2
Oop l2
 
Distributed objects
Distributed objectsDistributed objects
Distributed objects
 
Object Oriented Programming using C++ - Part 2
Object Oriented Programming using C++ - Part 2Object Oriented Programming using C++ - Part 2
Object Oriented Programming using C++ - Part 2
 
Rmi ppt-2003
Rmi ppt-2003Rmi ppt-2003
Rmi ppt-2003
 
learn design
learn designlearn design
learn design
 
Object Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World ScenarioObject Oriented Programming With Real-World Scenario
Object Oriented Programming With Real-World Scenario
 
Java rmi
Java rmiJava rmi
Java rmi
 

Viewers also liked

AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsRemedy IT
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMAashish Jain
 
Component based software development
Component based software developmentComponent based software development
Component based software developmentEmmanuel Fuchs
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecturenupurmakhija1211
 
Middleware and Middleware in distributed application
Middleware and Middleware in distributed applicationMiddleware and Middleware in distributed application
Middleware and Middleware in distributed applicationRishikese MR
 

Viewers also liked (12)

dot NET Framework
dot NET Frameworkdot NET Framework
dot NET Framework
 
DCOM
DCOMDCOM
DCOM
 
EJB Clients
EJB ClientsEJB Clients
EJB Clients
 
AXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systemsAXCIOMA, the component framework for distributed, real-time and embedded systems
AXCIOMA, the component framework for distributed, real-time and embedded systems
 
COM and DCOM
COM and DCOMCOM and DCOM
COM and DCOM
 
Deployment
DeploymentDeployment
Deployment
 
middleware
middlewaremiddleware
middleware
 
ASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOMASP, ASP.NET, JSP, COM/DCOM
ASP, ASP.NET, JSP, COM/DCOM
 
Component based software development
Component based software developmentComponent based software development
Component based software development
 
Middleware
MiddlewareMiddleware
Middleware
 
Corba concepts & corba architecture
Corba concepts & corba architectureCorba concepts & corba architecture
Corba concepts & corba architecture
 
Middleware and Middleware in distributed application
Middleware and Middleware in distributed applicationMiddleware and Middleware in distributed application
Middleware and Middleware in distributed application
 

Similar to DCOM vs CORBA: Comparing Object Models and Communication Methods

Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Remedy IT
 
Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Remedy IT
 
C++ amp on linux
C++ amp on linuxC++ amp on linux
C++ amp on linuxMiller Lee
 
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17LogeekNightUkraine
 
JVM code reading -- C2
JVM code reading -- C2JVM code reading -- C2
JVM code reading -- C2ytoshima
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipelineGirish Ghate
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer ToolsMark Billinghurst
 
JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)SMIJava
 
Virtual Function and Polymorphism.ppt
Virtual Function and Polymorphism.pptVirtual Function and Polymorphism.ppt
Virtual Function and Polymorphism.pptishan743441
 
ADV JAVA UNIT 2 M.SC CS (1).pdf
ADV JAVA UNIT 2 M.SC CS (1).pdfADV JAVA UNIT 2 M.SC CS (1).pdf
ADV JAVA UNIT 2 M.SC CS (1).pdfKALAISELVI P
 
Socket Programming Intro.pptx
Socket  Programming Intro.pptxSocket  Programming Intro.pptx
Socket Programming Intro.pptxssuserc4a497
 
C++11: Feel the New Language
C++11: Feel the New LanguageC++11: Feel the New Language
C++11: Feel the New Languagemspline
 
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)changehee lee
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationWei-Ren Chen
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWithTheBest
 

Similar to DCOM vs CORBA: Comparing Object Models and Communication Methods (20)

Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11
 
Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11Comparing IDL to C++ with IDL to C++11
Comparing IDL to C++ with IDL to C++11
 
C++ via C#
C++ via C#C++ via C#
C++ via C#
 
C++ amp on linux
C++ amp on linuxC++ amp on linux
C++ amp on linux
 
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
Vladymyr Bahrii Understanding polymorphism in C++ 16.11.17
 
JVM code reading -- C2
JVM code reading -- C2JVM code reading -- C2
JVM code reading -- C2
 
Lecture5
Lecture5Lecture5
Lecture5
 
Iphone course 2
Iphone course 2Iphone course 2
Iphone course 2
 
02 direct3 d_pipeline
02 direct3 d_pipeline02 direct3 d_pipeline
02 direct3 d_pipeline
 
426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools426 lecture 4: AR Developer Tools
426 lecture 4: AR Developer Tools
 
Overloading
OverloadingOverloading
Overloading
 
JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)JSR 82 (bluetooth obex)
JSR 82 (bluetooth obex)
 
Virtual Function and Polymorphism.ppt
Virtual Function and Polymorphism.pptVirtual Function and Polymorphism.ppt
Virtual Function and Polymorphism.ppt
 
ADV JAVA UNIT 2 M.SC CS (1).pdf
ADV JAVA UNIT 2 M.SC CS (1).pdfADV JAVA UNIT 2 M.SC CS (1).pdf
ADV JAVA UNIT 2 M.SC CS (1).pdf
 
Socket Programming Intro.pptx
Socket  Programming Intro.pptxSocket  Programming Intro.pptx
Socket Programming Intro.pptx
 
ql.io at NodePDX
ql.io at NodePDXql.io at NodePDX
ql.io at NodePDX
 
C++11: Feel the New Language
C++11: Feel the New LanguageC++11: Feel the New Language
C++11: Feel the New Language
 
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
개발 과정 최적화 하기 내부툴로 더욱 강력한 개발하기 Stephen kennedy _(11시40분_103호)
 
Part II: LLVM Intermediate Representation
Part II: LLVM Intermediate RepresentationPart II: LLVM Intermediate Representation
Part II: LLVM Intermediate Representation
 
Writing Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel SchulhofWriting Node.js Bindings - General Principles - Gabriel Schulhof
Writing Node.js Bindings - General Principles - Gabriel Schulhof
 

More from Roy Antony Arnold G (20)

6 sigma
6 sigma6 sigma
6 sigma
 
Run chart
Run chartRun chart
Run chart
 
Reliability growth models for quality management
Reliability growth models for quality managementReliability growth models for quality management
Reliability growth models for quality management
 
6 sigma
6 sigma6 sigma
6 sigma
 
Quality management models
Quality management modelsQuality management models
Quality management models
 
Pareto diagram
Pareto diagramPareto diagram
Pareto diagram
 
Ishikawa diagram
Ishikawa diagramIshikawa diagram
Ishikawa diagram
 
Histogram
HistogramHistogram
Histogram
 
Customer satisfaction
Customer satisfactionCustomer satisfaction
Customer satisfaction
 
Control chart
Control chartControl chart
Control chart
 
Complexity metrics and models
Complexity metrics and modelsComplexity metrics and models
Complexity metrics and models
 
Check lists
Check listsCheck lists
Check lists
 
Capability maturity model
Capability maturity modelCapability maturity model
Capability maturity model
 
Structure chart
Structure chartStructure chart
Structure chart
 
Seven new tools
Seven new toolsSeven new tools
Seven new tools
 
Scatter diagram
Scatter diagramScatter diagram
Scatter diagram
 
Qms
QmsQms
Qms
 
Relations diagram
Relations diagramRelations diagram
Relations diagram
 
Rayleigh model
Rayleigh modelRayleigh model
Rayleigh model
 
Defect removal effectiveness
Defect removal effectivenessDefect removal effectiveness
Defect removal effectiveness
 

Recently uploaded

Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escortsranjana rawat
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfGale Pooley
 
Monthly Market Risk Update: April 2024 [SlideShare]
Monthly Market Risk Update: April 2024 [SlideShare]Monthly Market Risk Update: April 2024 [SlideShare]
Monthly Market Risk Update: April 2024 [SlideShare]Commonwealth
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfGale Pooley
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...ssifa0344
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptxFinTech Belgium
 
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneVIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneCall girls in Ahmedabad High profile
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure servicePooja Nehwal
 
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...makika9823
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex
 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...shivangimorya083
 
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With RoomVIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Roomdivyansh0kumar0
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfAdnet Communications
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...ssifa0344
 
How Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingHow Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingAggregage
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...Call Girls in Nagpur High Profile
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfGale Pooley
 
00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptx00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptxFinTech Belgium
 

Recently uploaded (20)

Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur EscortsCall Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
Call Girls Service Nagpur Maya Call 7001035870 Meet With Nagpur Escorts
 
The Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdfThe Economic History of the U.S. Lecture 20.pdf
The Economic History of the U.S. Lecture 20.pdf
 
Monthly Market Risk Update: April 2024 [SlideShare]
Monthly Market Risk Update: April 2024 [SlideShare]Monthly Market Risk Update: April 2024 [SlideShare]
Monthly Market Risk Update: April 2024 [SlideShare]
 
The Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdfThe Economic History of the U.S. Lecture 22.pdf
The Economic History of the U.S. Lecture 22.pdf
 
Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024Veritas Interim Report 1 January–31 March 2024
Veritas Interim Report 1 January–31 March 2024
 
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
Solution Manual for Financial Accounting, 11th Edition by Robert Libby, Patri...
 
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
02_Fabio Colombo_Accenture_MeetupDora&Cybersecurity.pptx
 
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service ThaneVIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
VIP Call Girls Thane Sia 8617697112 Independent Escort Service Thane
 
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure serviceCall US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
Call US 📞 9892124323 ✅ Kurla Call Girls In Kurla ( Mumbai ) secure service
 
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
Independent Lucknow Call Girls 8923113531WhatsApp Lucknow Call Girls make you...
 
Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024Bladex Earnings Call Presentation 1Q2024
Bladex Earnings Call Presentation 1Q2024
 
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Shivane  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Shivane 6297143586 Call Hot Indian Gi...
 
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
Russian Call Girls In Gtb Nagar (Delhi) 9711199012 💋✔💕😘 Naughty Call Girls Se...
 
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With RoomVIP Kolkata Call Girl Jodhpur Park 👉 8250192130  Available With Room
VIP Kolkata Call Girl Jodhpur Park 👉 8250192130 Available With Room
 
Lundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdfLundin Gold April 2024 Corporate Presentation v4.pdf
Lundin Gold April 2024 Corporate Presentation v4.pdf
 
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
Solution Manual for Principles of Corporate Finance 14th Edition by Richard B...
 
How Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of ReportingHow Automation is Driving Efficiency Through the Last Mile of Reporting
How Automation is Driving Efficiency Through the Last Mile of Reporting
 
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
VVIP Pune Call Girls Katraj (7001035870) Pune Escorts Nearby with Complete Sa...
 
The Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdfThe Economic History of the U.S. Lecture 21.pdf
The Economic History of the U.S. Lecture 21.pdf
 
00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptx00_Main ppt_MeetupDORA&CyberSecurity.pptx
00_Main ppt_MeetupDORA&CyberSecurity.pptx
 

DCOM vs CORBA: Comparing Object Models and Communication Methods

  • 1. DCOM-CORBA Comparison Operating Systems II Reference: P. Chung et al., DCOM and CORBA: side by side, step by step,and layer by layer, C++ Report. http://www.research.att.com/~ymwang/papers/HTML/DCOMnCORBA/S.html
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8. // uuid and definition of IGrid1 [ object, uuid(3CFDB283-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring(&quot;IGrid1 Interface&quot;), pointer_default(unique) ] interface IGrid1 : IUnknown { import &quot;unknwn.idl&quot;; HRESULT get([in] SHORT n, [in] SHORT m, [out] LONG *value); HRESULT set([in] SHORT n, [in] SHORT m, [in] LONG value); }; // uuid and definition of IGrid2 [ object, uuid(3CFDB284-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring(&quot;IGrid2 Interface&quot;), pointer_default(unique) ] interface IGrid2 : IUnknown { import &quot;unknwn.idl&quot;; HRESULT reset([in] LONG value); }; DCOM IDL Each interface and class has GUIDs
  • 9. // uuid and definition of type library [ uuid(3CFDB281-CCC5-11D0-BA0B-00A0C90DF8BC), version(1.0), helpstring(&quot;grid 1.0 Type Library) ] library GRIDLib { importlib(&quot;stdole32.tlb&quot;); // uuid and definition of class [ uuid(3CFDB287-CCC5-11D0-BA0B-00A0C90DF8BC), helpstring(&quot;Grid Class&quot;) ] // multiple interfaces coclass CGrid { [default] interface IGrid1; interface IGrid2; }; }; DCOM IDL (continued) multiple views for Grid
  • 10. interface grid1 { long get(in short n, in short m); void set(in short n, in short m, in long value); }; interface grid2 { void reset(in long value); }; // multiple inheritance of interfaces interface grid: grid1, grid2 { }; CORBA IDL
  • 11. DCOM server class definition (cgrid.h) #include &quot;grid.h&quot; // IDL-generated interface header file class CGrid : public IGrid1, public IGrid2 { public: // IUnknown STDMETHODIMP QueryInterface(REFIID riid, void** ppv); STDMETHODIMP_(ULONG) AddRef(void) { return InterlockedIncrement(&m_cRef); } STDMETHODIMP_(ULONG) Release(void) { if (InterlockedDecrement(&m_cRef) == 0) { delete this; return 0; } return 1; } // IGrid1 STDMETHODIMP get(IN SHORT n, IN SHORT m, OUT LONG *value); STDMETHODIMP set(IN SHORT n, IN SHORT m, IN LONG value); // IGrid2 STDMETHODIMP reset(IN LONG value); // create and destroy methods, and private declarations are not shown }
  • 12. CORBA server class definition (grid_i.h) #include &quot;grid.hh&quot; // IDL-generated interface header file class grid_i : public gridBOAImpl { public: virtual CORBA::Long get(CORBA::Short n, CORBA::Short m, CORBA::Environment &env); virtual void set(CORBA::Short n, CORBA::Short m, CORBA::Long value, CORBA::Environment &env); virtual void reset(CORBA::Long value, CORBA::Environment &env); grid_i(CORBA::Short h, CORBA::Short w); virtual ~grid_i(); private: CORBA::Long **m_a; CORBA::Short m_height, m_width; };
  • 13. #include &quot;cgrid.h&quot; STDMETHODIMP CGrid::QueryInterface(REFIID riid, void** ppv) { if (riid == IID_IUnknown || riid == IID_IGrid1) *ppv = (IGrid1*) this; else if (riid == IID_IGrid2) *ppv = (IGrid2*) this; else { *ppv = NULL; return E_NOINTERFACE; } AddRef(); return S_OK; } STDMETHODIMP CGrid::get(IN SHORT n, IN SHORT m, OUT LONG* value) { *value = m_a[n][m]; return S_OK; } extern HANDLE hevtDone; CGrid::~CGrid () { for (int i=0; i < m_height; i++) delete[] m_a[i]; delete[] m_a; SetEvent(hevtDone); } DCOM Server Implementation create, set, reset method implementations are not shown
  • 14. #include &quot;grid_i.h&quot; CORBA::Long grid_i::get(CORBA::Short n, CORBA::Short m, CORBA::Environment &) { return m_a[n][m]; } void grid_i::set(CORBA::Short n, CORBA::Short m, CORBA::Long value, CORBA::Environment &) { m_a[n][m] = value; } void grid_i::reset(CORBA::Long value, CORBA::Environment &) { short n, m; for (n = 0; n < m_height; n++) for (m = 0; m < m_width; m++) m_a[n][m]=value; return; } // create and delete not shown CORBA Server Implementation
  • 15. HANDLE hevtDone; void main() { // Event used to signal this main thread hevtDone = CreateEvent(NULL, FALSE, FALSE, NULL); hr = CoInitializeEx(NULL, COINIT_MULTITHREADED); CClassFactory* pcf = new CClassFactory; hr = CoRegisterClassObject(CLSID_CGrid, pcf, CLSCTX_SERVER, REGCLS_MULTIPLEUSE , &dwRegister); // Wait until the event is set by CGrid::~CGrid() WaitForSingleObject(hevtDone, INFINITE); CloseHandle(hevtDone); CoUninitialize(); } DCOM Server main program
  • 16. int main() { // create a grid object using the implementation class grid_i grid_i ourGrid(100,100); try { // tell Orbix that we have completed the server's initialization: CORBA::Orbix.impl_is_ready(&quot;grid&quot;); } catch (...) { cout << &quot;Unexpected exception&quot; << endl; exit(1); } } CORBA Server main program
  • 17. #include &quot;grid.h&quot; void main(int argc, char**argv) { IGrid1 *pIGrid1; IGrid2 *pIGrid2; LONG value; CoInitialize(NULL); // initialize COM CoCreateInstance(CLSID_CGrid, NULL, CLSCTX_SERVER, IID_IGrid1, (void**) &pIGrid1); pIGrid1->get(0, 0, &value); pIGrid1->QueryInterface(IID_IGrid2, (void**) &pIGrid2); pIGrid1->Release(); pIGrid2->reset(value+1); pIGrid2->Release(); CoUninitialize(); } DCOM client program
  • 18. CORBA client program #include &quot;grid.hh&quot; void main (int argc, char **argv) { grid_var gridVar; CORBA::Long value; // bind to &quot;grid&quot; object; Orbix-specific gridVar = grid::_bind(&quot;:grid&quot;); value = gridVar->get(0, 0); gridVar->reset(value+1); }
  • 19.
  • 20.
  • 21.
  • 22.