In my small project of implementing a minimal DNS lookup utility in Go, I was trying to come up with a simplified logic of parsing the query response into a DNSPacket struct, which had the following structure:
type DNSPacket struct { Header *DNSHeader Questions *[]DNSQuestion Answers *[]DNSRecord Authorities *[]DNSRecord Additionals *[]DNSRecord } // initialize from Reader func (dr *DNSQuestion) FromBytes(reader *bytes.Reader) error { //... } func (dr *DNSRecord) FromBytes(reader *bytes.Reader) error { //.
Tag: go
In my previous post, I covered how I built a basic partition-tolerant broadcast system. While it did manage to perform correctly, it was not exactly performant. There was plenty of room for performance optimizations that could be done - this post covers them.
Efficiency Metrics Maelstrom, the underlying testbench for the challenge, provided a lot of metrics and charts that could be used to analyze the performance of my algorithm. Here are some of the key metrics:
Recently, I ran into an instresting challenge on distributed systems provided by Fly.io. After going through a laborious semester trying to get in touch with my inner Ninja of theory and implementation, I thought that it would be a good chance to check my understanding of the field.
Check out my repo for the actual implementation in Go! Part 1, 2: Echo / Unique ID Generation These parts were really about familiarizing oneself with the Maelstrom testbench, which the challenge utilizes to abstract basic node-level operations (send, sync/async rpc, etc.