CC BY 4.0 (除特别声明或转载文章外)
如果这篇博客帮助到你,可以请我喝一杯咖啡~
In the text, we described a multithreaded file server, showing why it is better than a single-threaded server and a finite-state server. Are there any circumstances in which a single-threaded server might be better? Given an example.
当服务器的负载非常简单,数据量也很小时,多线程操作反而可能带来资源争用等问题,例如一个小型博客的留言板模块。
Is a server that maintains a TCP/IP connection to a client stateful or stateless?
如果服务器在该客户端上没有维护其他信息,那理论上就是无状态的。
A reliable multicast service allows a sender to reliably pass messages to a collection of receivers. Does such a service belong to a middleware layer, or should it be part of a lower-level layer?
是中间件,因为它是可靠的。理论上多播也可以放在协议级别实现,不需要放在更低的层。
Explain why transient synchronous communication has inherent scalability problems, and how these could be solved.
因为同步通信要求调用者被阻塞直到其消息被接收到,所以当接收者远离时调用者可能需要很长时间才能继续。解决此问题需要合理设计调用方应用程序,使其在通信发生时异步地执行,可以切换到其他有用的工作要做。