Project Refactoring

Đang mở
#335 2 bình luận 4 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tái cấu trúc
Độ rõ ràng
Cần làm rõ
Mức độ hoạt động
Ít trao đổi
Công nghệ
csharp

Hướng nghiên cứu

Bắt đầu bằng cách xem xét branch handlers_refactor và hệ thống phân cấp message, tập trung vào các nhóm Client, Player, PlayerCli và Submessages chưa được port được liệt kê trong issue. Hoàn tất nghĩa là chuyển phần logic handler còn lại từ cấu trúc hướng parser sang tổ chức hướng message, nhưng issue không xác định các file hoặc test cụ thể.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement help wanted

Hi everyone,

as someone may know, together with @DDuarte, we started a process of general refactoring of WPP.
That's because this project has started to grow wildly in the latest years and since the increase in complexity of the protocols (and of the game in general) using this fundamental tool is becoming challenging.

Therefore we identified a couple of key steps in order to move to a more solid, efficient and manageable structure, so that we're able to satisfy the original feature request[1]:

1. Refactoring handlers

At the moment of this issue, the project is built upon a "parser-oriented" approach. This means that the interpretation logic is embedded in few and fat classes containing all the related methods, with multiple versions of the classes managing the different versions of the communication protocol.
We're planning to move to a "message-oriented" approach, in the sense that the interpretation logic is moved to many thin classes, of which everyone handles just a single opcode.
This step is really crucial: at the moment the handlers are heavily coupled and the whole logic of the program is built on side effects to objects, making the whole program almost impossible to test.
We have therefore structured a hierarchy of messages so that they are not put all together in one place but in small logical namespaces where updating one has no effects to the others.
Messages are divided into:

  • CliChat
  • Client
  • ClientConnection
  • Global
  • Other
  • Player
  • PlayerCli
  • Submessages
  • UserClient
  • UserRouterClient

As you can see, some of them have been already ported successfully, I've planned to complete all of them in the near future, except for "Client".. Since it is composed of nearly 1000 classes, help is really needed!!
Keep update on the handlers_refactor branch[2].

2. Abstracting serialization

Once obtained this change, we'll start exploiting it by building a more efficient parsing process that structures the data on a tree-based approach, in order to produce different, more mangeable outputs which will make it possible to filter and fast-search the packets needed, together with store the information in a more compact way (no more 1GB outputs). A reference can be found of the XML feature proposal [3].

3. Expanding Interfaces [to be extended]

Once the first two steps have been completed, more clear interfaces for input and outputs must be defined, in order to make this project exploitable by other programs, like web servers, databases, and classical cli programs.

4. Enhancing/Building UI [to be extended]

At the end of this very long journey, we expect to have a robust and efficient parser, which will be usable by developers to learn much more about how the game communication works and update the game much more frequently, maybe interacting by a GUI or a Web UI.

Comments and support are really appreciated. Updates will follow!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Ngôn ngữ chính
C#
Star
522
Fork
387
Merge trung bình
3 ngày 6 giờ
Pull request đã merge (30 ngày)
4

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TrinityCore/WowPacketParser

Tất cả issue của TrinityCore/WowPacketParser

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.