- Logging system
- Message queue
- O/R mapping layer
- ETL
- Job scheduler / work queue
Starting with some form of a monolith and ending up with a set of microservices.
If you don’t end up regretting your early technology decisions, you probably overengineered.
In the idea phase: What problem are we trying to solve?
- Find a business model
- Find a product market fit
- Acquire our first customers
This is where DI frameworks can help. A DI framework generally provides two pieces of functionality:
- A mechanism for “providing” new components. In a nutshell, this tells the DI framework what other components you need to build yourself (your dependencies) and how to build yourself once you have those components.
- A mechanism for “retrieving” built components.
A DI framework generally builds a graph based on the “providers” you tell it about and determines how to build your objects. This is very hard to understand in the abstract, so let’s walk through a moderately-sized example.
This file contains hidden or 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
// Reference: https://ultimatecourses.com/blog/redux-typescript-store | |
export class Store { | |
private subscribers: Function[]; | |
private reducers: { [key: string]: Function }; | |
private state: { [key: string]: any }; | |
constructor(reducers = {}, initialState = {}) { | |
this.subscribers = []; | |
this.reducers = reducers; |
api = API and documentation
chatbots = telegram, facebook and slack chatbots
cli = codenation cli, used by developers to run the challenges
cmd = utils and fixtures
core = Go core packages, used by all the project
docs = source code of internal docs (hosted at Github Pages) frontend = Vue.js project and templates used by Sam
infra = configuration files used by staging and production servers lambda = lambda functions
research = Python notebooks and other research assets
sam = cli tool used by us to generate pages, include challenges and other admin tasks
This file contains hidden or 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 eventMethod = window.addEventListener ? 'addEventListener' : 'attachEvent' | |
const messageEvent = eventMethod === 'attachEvent' ? 'onmessage' : 'message' | |
const EVENTS = { | |
eventName(){} | |
} | |
window[eventMethod](messageEvent, event => { | |
if (event.data.serviceId === SERVICE_ID && EVENTS[event.data.name]) { | |
EVENTS[event.data.name](event) |
This file contains hidden or 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
// 1. async / await | |
import axios from 'axios'; | |
async function getData() { | |
const result = await axios.get('https://dube.io/service/ping'); | |
const data = result.data; | |
console.log('data', data); | |
return data; |
$ npm install -g serverless
$ serverless config credentials --provider aws --key xxxxxxxxxxxxxx --secret xxxxxxxxxxxxxx
$ serverless create --template aws-nodejs --path my-service
$ serverless deploy -v
$ serverless invoke -f hello -l