Hi anh, có phải Netty chuyên làm cho Game server k ạ, Netty sử dụgn TCP, UDP. Như vậy khi lượng truy cập lớn từ user Netty xử lý thế nào ạ
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Netty là 1 thư viện wrap lại của java I/O và java NIO, nó đơn thuần chỉ là 1 thư viện cung cấp giải pháp cho I/O chứ không phải là 1 thư viện chuyên cho game em nhé. Tuy nhiên là nó có thêm việc:
1. quản lý các channel đại diện cho các socket client kết nối đến server
2. cung cấp việc điều hướng dữ liệu theo chain of responsibility design pattern giúp cho lập trình viên đỡ phải quan tâm nhiều đến I/O. Tuy nhiên đối với mo hình broadcast dữ liệu, mô hình này không có tác dụng.
3. Nó cũng thêm các lợp tiện ích hư ByteBuf, hay cơ chế ByteBuf Pool, nhưng cũng ít được dùng
4. Việc lưu lượng truy cập lớn xử lý thế nào là do người sử dụng netty tự quyết định em ạ.