Implement abstract writer pattern for DGraph