Docsity

CSE775 Project 2: Building a COM In-process Component for Message-passing Communication - , Study Guides, Projects, Research of Engineering

Toggle sidebar
bg1
CSE775 – Distributed Objects
Spring 2008
Project #2 – Communication Components due
Monday, Mar 26
Purpose:
This project requires you to build a COM in-process component to support message-passing
communication between two processes that reside on the same machine1. You will demonstrate
the operation of this communicator by sending XML commands, and copying files, between two
different processes. You must assume that the files may be binary, so you cannot directly pass
blocks of data using XML messages, but will have to convert file data to text form, perhaps using
base64 conversion2, or use a lower-level binary transfer process.
Each process that hosts a communication component is, itself, an out-of-process COM
component. These are started by client interface processes, as shown in Figure 1. You are asked
to implement the interfaces as Win32 windows programs3. The client interfaces are COM clients
of the out-of-process components, and support the transfer of files from one machine to another
by selecting paths and files which the COM hosts transfer. In subsequent projects we will use this
mechanism to transfer execution images to run on remote machines. Thus, one end of this link
will support user selection of files to send4, and the other will display the current count of blocks
received and, when complete, a message that displays directory properties of the file, e.g.,
name, size, and date.
Requirements:
Your Communicator system:
1. shall use VC++ 9.0, as provided in the ECS clusters and operate in the environment
provided there5.
2. shall use standard C++ to build the Win32 window clients, supporting the capabilities
described in the Purpose section.
3. shall use standard C++ with the ATL library to build the communication component6.
This component shall be implemented using Memory-Mapped Files and threads 7 and
support XML-based message-passing communication.
4. The communication component shall support sending XML text messages and, possibly
binary, files in blocks. You may choose to send fixed size messages as a very direct way
of implementing this requirement. The component shall accept block size as a
parameter.
5. shall use standard C++ and the ATL library to build the File Handling Components, shown
in Figure 1.
6. shall provide two out-of-process components to host the file handling and communication
components, also built with C++ and the ATL library. The hosts load file handling and
communication components (acting as COM clients) and provide a higher level interface
1 You are encouraged to encapsulate the functionality provided by Project #1 as a COM object. We wi ll
provide machine to machine capability, using WCF, in Project #4.
2 You will find a base64 conversion module, written in C++, in the class code directory.
3 You are encouraged to use, perhaps with modifications, the interfaces you developed for Project #1.
4 Note that this implies that the communicator must be able to send both text messages and file blocks.
5 VC++ ver 9.0 is Visual Studio .Net 2008 and is available in all the ECS clusters.
6 It is intended that both ends of the communication link are identical. I will discuss this in class.
7 You may use the C++ Threads class, provided in the class code directory, if you wish.
pf3

Partial preview of the text

Download CSE775 Project 2: Building a COM In-process Component for Message-passing Communication - and more Study Guides, Projects, Research Engineering in PDF only on Docsity!

Spring 2008

Project #2 – Communication Components due

Monday, Mar 26

Purpose:

This project requires you to build a COM in-process component to support message-passing communication between two processes that reside on the same machine 1. You will demonstrate the operation of this communicator by sending XML commands, and copying files, between two different processes. You must assume that the files may be binary, so you cannot directly pass blocks of data using XML messages, but will have to convert file data to text form, perhaps using base64 conversion^2 , or use a lower-level binary transfer process. Each process that hosts a communication component is, itself, an out-of-process COM component. These are started by client interface processes, as shown in Figure 1. You are asked to implement the interfaces as Win32 windows programs^3. The client interfaces are COM clients of the out-of-process components, and support the transfer of files from one machine to another by selecting paths and files which the COM hosts transfer. In subsequent projects we will use this mechanism to transfer execution images to run on remote machines. Thus, one end of this link will support user selection of files to send^4 , and the other will display the current count of blocks received and, when complete, a message that displays directory properties of the file, e.g., name, size, and date.

Requirements:

Your Communicator system:

  1. shall use VC++ 9.0, as provided in the ECS clusters and operate in the environment provided there^5.
  2. shall use standard C++ to build the Win32 window clients, supporting the capabilities described in the Purpose section.
  3. shall use standard C++ with the ATL library to build the communication component 6. This component shall be implemented using Memory-Mapped Files and threads^7 and support XML-based message-passing communication.
  4. The communication component shall support sending XML text messages and, possibly binary, files in blocks. You may choose to send fixed size messages as a very direct way of implementing this requirement. The component shall accept block size as a parameter.
  5. shall use standard C++ and the ATL library to build the File Handling Components, shown in Figure 1.
  6. shall provide two out-of-process components to host the file handling and communication components, also built with C++ and the ATL library. The hosts load file handling and communication components (acting as COM clients) and provide a higher level interface (^1) You are encouraged to encapsulate the functionality provided by Project #1 as a COM object. We will provide machine to machine capability, using WCF, in Project #4. (^2) You will find a base64 conversion module, written in C++, in the class code directory. (^3) You are encouraged to use, perhaps with modifications, the interfaces you developed for Project #1. (^4) Note that this implies that the communicator must be able to send both text messages and file blocks. (^5) VC++ ver 9.0 is Visual Studio .Net 2008 and is available in all the ECS clusters. (^6) It is intended that both ends of the communication link are identical. I will discuss this in class. (^7) You may use the C++ Threads class, provided in the class code directory, if you wish.

Spring 2008

for use by the interface clients. Thus, the user interfaces should not have to do anything other than to request available files, select one or more, and ask for their transfer to a specified directory.