Friday, October 13, 2017

Returning to Chimera

Introduction

Without going into excuses about my extended absence, I completed the login sequence for Chimera a few months back and then left it "as-is". This post is just to let you know that I started development on Chimera again. After speaking with a member of the development community, I got some revived interest in developing a Conquer Online server, for better or for worse.

Revision

When I left off, I had a serious performance problem with the packet system that I was struggling to find a clean solution for. When decoding client data, I used reflection and TQ's byte ordering rules to populate a packet structure. This resulted in roughly 300 ns per decode. My plan is to replace the reflection system with a stream system to reduce this time (will retest). Decoding would then be as simple as accepting a byte.Buffer as a packet.Reader, and then using methods to manually decode the structure. Something like this:

// Reader encapsulates a byte buffer, used by packet structures to dynamically
// decode client data using TQ Digital's byte ordering rules. The base buffer
// can be assigned directly from the client's data response.
type Reader struct {
    bytes.Buffer
}

I'd use the same interfaces that I did before, but have it pass the bytes.Buffer down from the server events rather than passing the byte array. When encoding, I'd do the same thing - returning a bytes.Buffer rather than an array (just to create another byte.Buffer again). Hopefully that makes sense.

Conclusion

Point being that I have interest to keep this project going and to make it more performant before really developing up Conquer's subsystems. I want to make this project as easy to develop for and understand as possible, and work with others in the community to develop tools and resources needed for Conquer development. The wiki is also back up if you'd like to contribute. Cheers.

No comments:

Post a Comment