jafayer / DinoDNS

https://dinodns.dev
2 stars 0 forks source link

Improvement/correct timestamps #27

Closed jafayer closed 1 week ago

jafayer commented 1 week ago

See #25

This pull request introduces several enhancements and refactorings to improve the event handling system and network request processing. The key changes include the creation of a TypedEventEmitter class, updates to network handler interfaces, and the addition of request timing metadata.

Event Handling Improvements:

Network Handler Refactoring:

Example Update:

jafayer commented 1 week ago

Just a note that at some point the future we should probably find a way to do this more cleanly. Currently we're instantiating "request" timestamps when the Request object is created, then overriding them with the actual values that translate to the pre-data-event timestamps, representing network latency and deserialization. We may want to just allow the user to pass in timestamps to the request object?