- 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 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 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 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 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; | |
} |
天佑ヲ保有シ萬世一系ノ皇祚ヲ踐メル大日本帝國天皇ハ昭ニ忠誠勇武ナル汝有眾ニ示ス
天からの恵み、助けを受け、万世一系の皇位を継ぐ私、大日本帝国天皇は、ここに忠誠勇武なる汝ら臣民に示す。
朕玆ニ米國及英國ニ對シテ戰ヲ宣ス朕カ陸海將兵ハ全力ヲ奮テ交戰ニ從事シ朕カ百僚有司ハ勵精職務ヲ奉行シ朕カ眾庶ハ各〻其ノ本分ヲ盡シ億兆一心國家ノ總力ヲ擧ケテ征戰ノ目的ヲ逹成スルニ遺算ナカラムコトヲ期セヨ
私はアメリカおよびイギリスに対し、宣戦を布告する。我が帝国の陸海将兵諸君は全力を奮い交戦に従事し、我が帝国のすべての政府関係者は職務に励んでこれに身を捧げ、我が帝国の庶民らはおのおのその本分を尽くし、すべての心をひとつにして、国家が総力を挙げこの戦争の目的を達成するための力とせよ。
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
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 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 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) |
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
<?php | |
// Should injections only do injections ? | |
// current - "get"Instance() | |
$injector = new Injector(new Bindings); | |
// get instance by interface name | |
$foo = $injector->getInstance(FooInterface::class); |