- How to effectively compose your business logic
- Slim your aggregates with Event Sourcing!
- Architecture Weekly Webinar #8 - Slim down your aggregates!
- Straightforward Event Sourcing with TypeScript and NodeJS
- Process Managers Made Simple - Chris Condron - EventSourcing 2021
- Architecture Weekly Wbinar #3 - Implementing Distributed Processes
- Saga and Process Manager - distributed processes in practice
- [Event-driven distributed processes by example](https://event-driven.io/en/event_driven_distributed_processes_by_exam
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"size": 0, | |
"query": { | |
"match": { | |
"event": "generate_docx" | |
} | |
}, | |
"aggs":{ | |
"dedupe_event_by_factfind" : { | |
"terms":{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const propOrSelf = R.curry((prop, value) => R.when( | |
R.propSatisfies(R.complement(R.isNil), prop), | |
R.prop(prop) | |
)(value)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { compose, lifecycle } from 'recompose'; | |
import { connect } from 'react-redux'; | |
import { getSomeState } from '../selectors'; | |
import { doSomething } from '../actions'; | |
export default compose( | |
connect( | |
(state) => ({ | |
auth: getSomeState(state), | |
}), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '2' | |
services: | |
service-one: | |
image: nginx:1.9 | |
volumes: | |
- ./service1:/usr/share/nginx/html/ | |
ports: | |
- "3001:80" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/^(?!\s*$)-?(0|[1-9]\d*)?(\.\d+)?$/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import R from 'ramda'; | |
const safeNumber = | |
R.when( | |
R.test(/^(?!\s*$)-?(0|[1-9]\d*)?(\.\d+)?$/), | |
Number | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import R from 'ramda'; | |
const capitalize = | |
R.converge( | |
R.concat, | |
[ | |
R.compose( | |
R.toUpper, | |
R.head | |
), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ObjectID } = require('mongodb'); | |
const moment = require('moment'); | |
const thisWeek = moment().startOf('isoWeek').unix(); | |
const cursor = db.collection('records').aggregate( | |
{ | |
$project: { | |
thisWeek: { | |
$cond: { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { ObjectID } = require('mongodb'); | |
const moment = require('moment'); | |
const thisWeek = moment().startOf('isoWeek').unix(); | |
const week = yield db.collection('records').find({ | |
_id: { | |
$gt: ObjectID.createFromTime(thisWeek) | |
} | |
}).count(); |
NewerOlder