Skip to content

Instantly share code, notes, and snippets.

View jaymecd's full-sized avatar

Nikolai Zujev jaymecd

View GitHub Profile
@jaymecd
jaymecd / default.vcl
Last active August 29, 2015 14:15 — forked from benclark/default.vcl
backend default {
.host = "127.0.0.1";
.port = "8080";
.connect_timeout = 600s;
.first_byte_timeout = 600s;
.between_bytes_timeout = 600s;
}
acl purge {
"localhost";

This is my response to an email asking about Domain-Driven Design in golang project.

Thank you for getting in touch. Below you will find my thoughts on how golang works with DDD, changing it. This is merely a perception of how things worked out for us in a single project.

That project has a relatively well-known domain. My colleagues on this project are very knowledgeable, thoughtful and invested in quality design. The story spelled out below is a result of countless hours spent discussing and refining the approach.

Conclusions could be very different, if there was a different project, team or a story-teller.

Short story

@jaymecd
jaymecd / main.go
Last active August 29, 2015 14:16 — forked from abdullin/main.go
package main
import (
"fmt"
"net/http"
)
var queue chan string
var joblist []string
@jaymecd
jaymecd / CR_LF.md
Last active August 29, 2015 14:16 — forked from nickleefly/CR_LF.md

Permalink

danielmiessler.com | study | crlf

If you're like I used to be, you always have trouble remembering the difference between how Windows and Linux terminate lines in text files. Does Windows add the extra stuff, or does Linux? What exactly is the extra stuff? How do I get the stuff out?

Well, hopefully by the end of this you'll be taken care of once and for all.

The Characters

Last Friday, Jonathan Worthington and I (Carl Mäsak) decided to get our feet
wet with CQRS and event sourcing. The toy project we settled on: a simple but
realistic web site for two-player board games.
In this post, I summarize how things went.
## Architect meets domain expert
Since there were only the two of us, I took the role of the domain expert, and
Jonathan took the role of the architect. He expertly teased a model out of

##Reactive System Design Links

#Articles and Papers

Resilient Architectures for the cloud

Slide - Introduction

Ask these questions:

  • How many of you have deployed your applications for the cloud?
  • Have you ever had any downtown out of something you didn't do?
@jaymecd
jaymecd / nodecqrs.js
Last active August 29, 2015 14:17 — forked from janderit/nodecqrs.js
function UserWasCreated(id, name){
this.Event = arguments.callee.name;
this.UserId=id;
this.Name=name;
}
function UserWasRenamed(id, name){
this.Event = arguments.callee.name;
this.UserId=id;

HAProxy + Consul vs VulcanD + EtcD

HAProxy/Consul

  • Pro: Both are production ready
  • Pro: Can handle any throughput we will see
  • Pro: More feature rich
    1. Healthchecks
    2. DNS and HTTP API available to map endpoints
    3. Lots of service discovery built in
  • Pro: Solution could be used in more than one place (bld/prod/etc..)
- What do Etcd, Consul, and Zookeeper do?
- Service Registration:
- Host, port number, and sometimes authentication credentials, protocols, versions
numbers, and/or environment details.
- Service Discovery:
- Ability for client application to query the central registry to learn of service location.
- Consistent and durable general-purpose K/V store across distributed system.
- Some solutions support this better than others.
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state.
- Centralized locking can be based on this K/V store.