This lecture is concerned with Message-passing Communication Systems.
Readings and Activities for the Week:
- Read class text Chapters #14 and #22.
- Look through Asynchronous Systems Presentation, pptx
Glossary of Terms
-
Synchronous:
There are a couple of common uses for this term:- A function that completes all its activities on the caller's thread.
- An operation that blocks the calling thread until some event occurs.
-
Asynchronous:
- A function that spawns a child thread to execute function activities and then returns immediately.
-
An system whose parts communicate by sending one-way messages, without waiting for replies.
The receiver may elect to send a one-wait reply message subsequently.
- The Syllabus describes topics to be covered, reading material for you to digest as part of each lecture, and due dates for assigned projects.
-
Projects:
-
Asynchronous Systems
Asynchronous Systems Presentation, pptx, Communication using Message Queues BasicNetThreadDemos Queued Messages
Deposit messages in a queue for later retrieval by another thread. WPF Thread Demos
Illustrates use of (1) threads, and (2) asynch awaits to implement long running activities and displaying results in a WPF window. Basic Tasks
Explores asynchronous processing, using Tasks, with combinations of inputs and outputs, and also use of continuations. async await Pattern
Shows how to use asynch await emphasizing the affect of await's continuation. Asynchronous Calls Demo
Use delegates asynchronous BeginInvoke and EndInvoke methods. Form with BeginInvoke
Use the same asynchronous delegate, but now dequeue with a UI thread. ThreadPool Demo
Dispatch work items to members of a thread pool. Form's BackgroundWorker
The Form provided BackgroundWorker wraps the use of a ThreadPool to simplify a developer's implementation. You can use the BackgroundWorker with WPF, accorting to this blog post -
Peer-to-Peer communication Prototype
Illustrates use of one-way message passing to establish Peer-To-Peer communication. -
Preparation for Synchronous Discussion:
- Draw a package diagram for your design of Project #4 and be prepared to discuss it in the Synchronous session.
-
Lecture Take-aways:
The most important things we discussed are:- Asynchronous Systems Presentation
- Sender and Receiver Structures