Lessons Learned: GoLang GORM – filtering associations

The problem Given the following code: type User struct { gorm.Model Username string Orders []Order } type Order struct { gorm.Model UserID uint Foobar string } The above Golang code defines a "Has Many" association, leading to a schema where a "User" "has many" "Orders", with the "user_id" key acting as a foreign key. How … Continue reading Lessons Learned: GoLang GORM – filtering associations

Python Pickling in the cloud (or how to get python to execute code it hasn’t seen yet)

Problem - What are we trying to solve? Let's assume you have the beginnings of a simple distributed system: You use redis as your event queueYou have a "master" python script that pickles a python class, and sends it to your redis queueYou have a "worker" python script that waits for a new event, unpickles … Continue reading Python Pickling in the cloud (or how to get python to execute code it hasn’t seen yet)