tailieunhanh - peer-topeer Networks phần 8

Mô hình trong chương này cung cấp những ưu điểm sau: r logic của chương trình máy chủ là đơn giản như các thông tin liên lạc được xử lý bởi các máy chủ web. Do đó nó dễ dàng hơn để phát triển và gỡ lỗi. Nó sẽ mất một thời gian ngắn hơn để phát triển toàn bộ hệ thống. r Chúng tôi không cần phải lo lắng về các cổng giao tiếp. Nó sẽ là một tập thể dục timeconsuming để kiểm tra và thay đổi (nếu cần thiết) số cổng nếu chúng ta có. | 186 13. Power Server Model 5 Completed subtasks Unassigned sub-tasks queue Internet Intranet Server program I Servlet Servlet Assigned sub-task queue ị Load I Subservlet task I Load I Subservlet task 1 Servlet Server program I Load Sub- servlet task Server computer 1 Server computer i Server computer N Client computer Java application program J HTTP message Sub-task Result Figure . Robust power server model. Comparison with Model 4 The model in this chapter provides the following advantages The logic of the server program is simpler as the communications are handled by the web server. Thus it is easier to develop and debug. It will take a shorter time to develop the whole system. We do not need to worry about the communication port. It will be a timeconsuming exercise to check and change if necessary the port number if we have a large number of servers. We will have problems under the following conditions Some other software packages are using the port. The port is blocked by a firewall. Other Improvements 187 Further Tests Five models have been introduced from Chapters 9 to 12 . Each model has its own advantages and disadvantages. I recommend you to carry out tests with different models using the same size of problem . add 1 to 1 000 000 with different models and configurations so you can compare the efficiencies of them. Other Improvements I have tried to keep the size of all programs as small as possible in terms of number of coding lines so they are easy to understand. If you develop mission critical applications in the future you should consider incorporating some of the following improvements More error-checking routines should be included. The sub-task queues and answers should be written to disk for applications which take a long time to complete . months or even years . If the client computer crashes for any reason it can recover from the disk and resume the process. It is possible that a server computer will crash after it .

TỪ KHÓA LIÊN QUAN