- bounded contextがあやふやな「悪いモノリス」と、契約のある「良いモノリス」とがある。
- 初期段階での性能差は低いが、前者はスケールの限界が早期に訪れ、後者は基本的には限界はほぼ無い。
- 前者の問題をマイクロサービスで解決しようとすると、分割された泥だんごができる。http://www.codingthearchitecture.com/2014/07/06/distributed_big_balls_of_mud.html
- m/sはReliabilityの問題を軽視してはいけない https://twitter.com/ircmaxell/status/1006631401603514368
- m/sはシステムを複雑にする。自動化やツールのための専門のスタッフが必要。 https://twitter.com/ircmaxell/status/908647840196513792
- 問題解決の鍵はbounded context。(=interface) これはm/sに優先する。
- HTTP APIにはmedia type / content-negotiation / json-schema (+hyper-scehma)などのhttp semanticsを。
- サービスのbounded contextを設計するのがAPIアーキテクト。示された「API構造」にシステムのbounded contextを設計して、ソフトウエア構造を与えるのが、ソフトウエアアーキテクト。
- APIはシステムのUI。APIアーキテクトはシステムUIデザイナー。
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
return function ( | |
string $context, | |
string $name, | |
string $ip, | |
int $port, | |
int $mode = SWOOLE_BASE, | |
int $sockType = SWOOLE_SOCK_TCP, | |
array $settings = ['worker_num' => 4] | |
) : int { | |
$http = new Server($ip, $port, $mode, $sockType); |
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
sudo apachectl stop` | |
sudo launchctl unload /System/Library/LaunchDaemons/org.apache.httpd.plist 2>/dev/null` |
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
array_map('unlink', glob("path/to/dir/*.php")); |
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
<?php | |
// @see https://en.wikipedia.org/wiki/Day_of_the_Programmer | |
if (date("z") + 1 === 256) { | |
echo "Happy Programmer's day !" . PHP_EOL; | |
} |
天佑ヲ保有シ萬世一系ノ皇祚ヲ踐メル大日本帝國天皇ハ昭ニ忠誠勇武ナル汝有眾ニ示ス
天からの恵み、助けを受け、万世一系の皇位を継ぐ私、大日本帝国天皇は、ここに忠誠勇武なる汝ら臣民に示す。
朕玆ニ米國及英國ニ對シテ戰ヲ宣ス朕カ陸海將兵ハ全力ヲ奮テ交戰ニ從事シ朕カ百僚有司ハ勵精職務ヲ奉行シ朕カ眾庶ハ各〻其ノ本分ヲ盡シ億兆一心國家ノ總力ヲ擧ケテ征戰ノ目的ヲ逹成スルニ遺算ナカラムコトヲ期セヨ
私はアメリカおよびイギリスに対し、宣戦を布告する。我が帝国の陸海将兵諸君は全力を奮い交戦に従事し、我が帝国のすべての政府関係者は職務に励んでこれに身を捧げ、我が帝国の庶民らはおのおのその本分を尽くし、すべての心をひとつにして、国家が総力を挙げこの戦争の目的を達成するための力とせよ。
Imperial Rescript on Surrender
朕深ク世界ノ大勢ト帝國ノ現狀トニ鑑ミ非常ノ措置ヲ以テ時局ヲ收拾セムト欲シ玆ニ忠良ナル爾臣民ニ吿ク
私は、世界の情勢と日本の現状を深く考え、緊急の方法でこの事態を収拾しようとし、忠実なるあなた方臣民に告げる。
After pondering deeply the general trends of the world and the actual conditions obtaining in Our Empire today, We have decided to effect a settlement of the present situation by resorting to an extraordinary measure.
朕ハ帝國政府ヲシテ米英支蘇四國ニ對シ其ノ共同宣言ヲ受諾スル旨通吿セシメタリ
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
Dear {{ name }}, | |
Thank you for contacting Turkish Airlines Customer Services and informing us about your experience. | |
Unfortunately it is not completely avoidable that this kind of events happen. Currently we are working on developing a solution for this issue. We are performing an upgrade our service channels to improve our infrastructure. Turkish Airlines' aim is always to improve and offer the best service. | |
In order to check necessary evaluation please create a booking without payment and inform us with a new feedback. | |
AsTurkish Airlines we sincerely apologize for the inconvenience that you have experienced. |
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
<?php | |
class AuthException extends \RuntimeException | |
{ | |
} | |
final class UserToken | |
{ | |
public $jwtToken; | |
// 他に必要なプロパティ |
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
Benchmarking 127.0.0.1 (be patient) | |
Completed 5000 requests | |
Completed 10000 requests | |
Completed 15000 requests | |
apr_socket_recv: Operation timed out (60) |