Reading 18: Message-Passing and Networking
After reading the notes and examining the code for this class, you should be able to use message passing instead of shared memory for communication between TypeScript workers, and understand how client/server communication does message passing over the network. Network communication is inherently concurrent, so building clients and servers will require us to reason about their concurrent behavior and to implement them with thread safety. We must also design the protocol that clients and servers use to communicate, just as we design the operations that clients of an ADT use to work with it. In our introduction to concurrency, we saw two models for concurrent programming: shared memory and message passing. In the shared memory model, concurrent modules interact by reading and writing shared mutable objects. Creating multiple threads inside a single process is our primary example of shared-memory concurrency. Because TypeScript has no API for creating threads, many of our code examples ha
Reading 18: Message-Passing and Networking Reading 18: Message-Passing and Networking Software in 6.102 Safe from bugs Easy to understand Ready for change Correct today and correct in the unknown future. Communicating clearly with future programmers, including future you. Designed to accommodate change without rewriting. Objectives After reading the notes and examining the code for this class, you should be able to use message passing instead of shared memory for communication between TypeScript workers, and understand how client/server communication does message passing over the network. Netw
saved by
related reading
- Reading 14: Concurrencyweb.mit.edu
- Reading 4: Specificationsweb.mit.edu
- Reading 16: Mutual Exclusionweb.mit.edu
- Reading 15: Promisesweb.mit.edu
- Reading 13: Map, Filter, Reduceweb.mit.edu
- Reading 17: Callbacks and Graphical User Interfacesweb.mit.edu
- Problem Set 4: Memory Scrambleweb.mit.edu
- Transfer Data Between Threads with Message Passing - The Rust Programming Languagedoc.rust-lang.org
- Notes on structured concurrency, or: Go statement considered harmful - njs blogvorpus.org
- TypeScript Structured Concurrencythecandidstartup.org
- Designing a Concurrent Application | Learn You Some Erlang for Great Good!learnyousomeerlang.com
- TypeScript: Documentation - The Basicstypescriptlang.org