パーフェクト Ruby on Rails第11章サービスオブジェクトを題材に、イミュータブルデータモデリングについてトーク。
- まず3つの"サービス"について整理
- レイヤードアーキテクチャでの独立したレイヤーとしてのサービス。ユースケースに近い。トランザクションスクリプト的。
- ドメインサービス。エンティティや値オブジェクトとして表現するのが不自然なドメインオブジェクトの表現。
- 分散システムにおける分散ノードの提供する責務。マイクロサービスのサービス。
#!/bin/sh | |
## Requires openssl, nodejs, jq | |
header=' | |
{ | |
"kid": "12345", | |
"alg": "RS256" | |
}' | |
payload=' | |
{ | |
"iss": "https://example.com", |
#!/bin/bash | |
# This script is used to convert the output from "phpunit --coverage-text" | |
# into a markdown formatted table. It parses the coverage data, | |
# then generates a table with class names, statement counts, misses, and coverages. | |
# The output is designed to be easily readable and suitable for inclusion in | |
# markdown-based documents or reports. | |
# Ignore output until reaching coverage report | |
while IFS= read -r line |
パーフェクト Ruby on Rails第11章サービスオブジェクトを題材に、イミュータブルデータモデリングについてトーク。
#!/bin/sh | |
## https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#adding-a-job-summary | |
repo_url=https://github.com/your-user-id/your-repository/blob | |
branch=master | |
coverage report | sed "1,3 s/-\+/--|--|--|--/g" | \ | |
sed "/-\{3\}/d"| \ | |
sed "0,/TOTAL*/ s/ \+/|/g" | \ | |
sed "0,/TOTAL*/ s/^/|/g" | \ | |
sed "0,/TOTAL*/ s/$/|/g" | \ | |
sed "1i # Test Coverage" | \ |
8. AWS Aurora、GCP Spannerへ辿り着くまでのDBの進化
Episode 370: Chris Richardson on Microservice Patterns
マイクロサービスパターンの著者がゲスト。
Episode 377: Heidi Howard on Distributed Consensus
Flexbile Paxosの考案者がゲスト。分散合意についてトーク。
Alex Petrov on Database Storage Engines
Database Internals: A Deep Dive into How Distributed Data Systems Workの著者がゲスト。書籍の内容をもとに、データベースの内部についてトーク。
ヒアドキュメントは変数がパースされる. Nowdocはされない. const属性の定数の代入にNowdocを使える.
unset()で変数の割当を解除すると、それ以後その変数を参照したとき "未定義の変数"としてエラー(Notice)が発生するのに対し、nullの代入された変数は 変数としては定義しているものとして扱われる.
(float)'15.33foo'
-> 15.33
が返る