A Rusty Go at Channels

Jun 24, 2018 - 8 minutes
Channels Channels are a useful concurrency primitive that enable separate processes to safely communicate without the need for explicit synchronization. The term processes is used here to loosely describe independent threads of execution within a program. This can be an OS level thread or a runtime level thread. Channels can be seen as a pipe to connect these processes and allow them to share memory with one another. For example a program could spawn any number of processes along with a channel to transmit results that it gathers. Read more ...

Rust Redis Modules

Jan 21, 2018 - 5 minutes
Redis Modules with Rust With newer versions of Redis, the modules API lets users extend Redis’ already powerful functionality. To quote the Redis website: Redis modules make possible to extend Redis functionality using external modules, implementing new Redis commands at a speed and with features similar to what can be done inside the core itself. The module API is defined in a single header file with the main goal of writing them in C but also allowing for any language with C bindings. Read more ...

Rust In 2018

Jan 10, 2018 - 3 minutes
Rust in 2018 This short post is a reflection on Rust in 2017 and some ideas I would love to see in 2018 written in the spirit of this blog post. I will keep things brief and try not to repeat what others have already shared. There have been many wonderful ideas that makes me even more enthusiastic about Rust so I hope that I can add to the excitement with a few of my own. Read more ...

Cleaner Go

Mar 6, 2017 - 4 minutes
Large code bases can become increasingly complex to manage as you add more code while also refactoring what is there already. Even with diligent code reviews, it is easy to gloss over common programming mistakes. Sometimes code can be written in a simpler way. Or perhaps a recent refactor left a few functions in that are no longer used. Luckily the go tool includes a sub-command that will examine Go source and report suspicious lines based on heuristics that the compiler will not catch. Read more ...

REST in Rust

Jun 14, 2016 - 3 minutes
Writing a simple REST app in Rust If you have ever worked with HTTP in Rust, you have probably referred to the hyper crate. Hyper provides a safe abstraction over HTTP and offers both a client and server type. It is also the foundation for frameworks such as Iron and Nickel. One of the coolest things about hyper is that its server can be started with anything that implements the Handler trait. Read more ...