- 予約周りの処理の改善
- 設計部分まで弄るのが出来なかった
- 小手先のコードの改善に頼っていた節がある
- DB力の無さを感じる。ここは僕の課題
api/users/:idをもっと改善したかった- めっちゃ重くない?このAPI・・・
https://www.martinfowler.com/articles/domain-oriented-observability.html の和訳
Observability は我々のソフトウェアシステムでは常に価値があり、クラウドやマイクロサービスにおいても以前そうです。 しかしながら、システムに追加するObservabilityは本質的に少々低レベルで技術的になりがちで、 多くの場合、様々なロギングやInstrumentation(ここではメトリクスの計測コード)や分析フレームワークへの複雑で冗長な呼び出しを コードベースに散らかす必要があるようです。 この記事では、この混乱を一掃し、ビジネスに関連するObservabilityをクリーンでテスト可能な方法で実現します。
- 簡単にエンドポイントはやしたい場合はこれ。github.com/aws/aws-lambda-go/events
- 内部routingしたいときとか複雑なのはやしたい場合はこれ
- http.NewServeMuxからhttp.HandlerFuncを導く方法
- handler := mux.ServeHTTP する
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
| @SpringBootTest | |
| public class いい感じのテスト_案1 { | |
| @TestConfiguration | |
| public static Config { | |
| @Bean | |
| @ConfigurationProperties | |
| ConfigProps configProps() {...} |
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
| #!/usr/bin/env node | |
| import 'source-map-support/register'; | |
| import {App, Stack} from '@aws-cdk/core'; | |
| import {Runtime, Code, Function} from "@aws-cdk/aws-lambda" | |
| import {ApiEventSource} from "@aws-cdk/aws-lambda-event-sources" | |
| const app = new App(); | |
| const stack = new Stack(app, "example-stack") |
この和訳メモは以下のリンク先の記事の和訳です。
マイクロサービス: クライアントサイドロードバランシング
プロダクションでのフェイルセーフ性を確保するために、同じアプリケーションを複数のインスタンスにデプロイします。 同じアプリケーションをホストする論理的なサーバ(ノード)のグループは Application Clusterを構成します。
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
| package com.github.wreulicke.resillient; | |
| import static org.assertj.core.api.Assertions.assertThat; | |
| import static org.assertj.core.api.Assertions.assertThatThrownBy; | |
| import java.time.Duration; | |
| import org.slf4j.Logger; | |
| import org.slf4j.LoggerFactory; |
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
| import java.nio.channels.*; | |
| import java.nio.file.*; | |
| import java.io.*; | |
| public class Test2 { | |
| public static void main() { | |
| try (FileChannel fc = FileChannel.open(Paths.get("Test.java"))) { | |
| fc.size(); | |
| } catch(IOException e) {} |