jtieri / habbgo

Habbo Hotel emulation implemented in Go.
5 stars 1 forks source link

Rename Handlers & Composers #5

Closed jtieri closed 2 years ago

jtieri commented 3 years ago

Make the packet handlers/composers have naming that is more aligned with the Habbo client source code

emansom commented 3 years ago

Command (incoming) and Message (outgoing). This is what the source code of the client names it.

The architecture paper by Aapo further dwells in to this, eleborating that most client->server is RPC esque, where as server->client is more PubSub broadcast esque.

emansom commented 3 years ago

The handler pattern was introduced into the community by JoeH (with Thor) and later Nillus (with Woodpecker V3) adopting the reactor pattern into their emulators.

Stockholm (Thor 2.0) further builds on this and introduces some reusable parser logic per incoming command.

It fits nicely as an extension, e.g. to group multiple incoming commands.

jtieri commented 2 years ago

Command (incoming) and Message (outgoing). This is what the source code of the client names it.

The architecture paper by Aapo further dwells in to this, eleborating that most client->server is RPC esque, where as server->client is more PubSub broadcast esque.

Gonna go for this change rn.

Even though it's not conventional Go formatting, I think I will name the functions for both commands and messages to be ALLCAPS and try to retain the names from the Habbo source code.

The handler pattern was introduced into the community by JoeH (with Thor) and later Nillus (with Woodpecker V3) adopting the reactor pattern into their emulators.

Stockholm (Thor 2.0) further builds on this and introduces some reusable parser logic per incoming command.

It fits nicely as an extension, e.g. to group multiple incoming commands.

Good stuff here! This is the type of information I want to archive as part of the wiki for this project too. HH private server scene has had one of the richest histories out of any private server gaming community.