This document discusses Yarn and its advantages over npm. It notes that Yarn uses yarn.lock files instead of npm-shrinkwrap.json files to lock down dependency versions. Yarn is also described as being faster, able to work offline by caching dependencies, and potentially more secure than npm with features like flat mode and module folders. The document suggests Yarn may handle dependencies and devDependencies differently than npm, and questions whether the yarn.lock file should be committed to source control.
The document discusses implementing an event-driven architecture using events instead of synchronous APIs. It explains that events decouple services by allowing them to communicate asynchronously through a centralized event routing system. This loose coupling makes services more independent and resilient, as failures in downstream services do not block upstream ones. It also improves scalability and maintainability by reducing dependencies between services. The document provides examples to illustrate how an event-driven system has less coupling between producers and consumers compared to a synchronous API approach.
The document discusses implementing an event-driven architecture using events instead of synchronous APIs. It explains that events decouple services by allowing them to communicate asynchronously through a centralized event routing system. This loose coupling makes services more independent and resilient, as failures in downstream services do not block upstream ones. It also improves scalability and maintainability by reducing dependencies between services. The document provides examples to illustrate how an event-driven system has less coupling between producers and consumers compared to a synchronous API approach.
IoT Devices Compliant with JC-STAR Using Linux as a Container OSTomohiro Saneyoshi
?
Security requirements for IoT devices are becoming more defined, as seen with the EU Cyber Resilience Act and Japan’s JC-STAR.
It's common for IoT devices to run Linux as their operating system. However, adopting general-purpose Linux distributions like Ubuntu or Debian, or Yocto-based Linux, presents certain difficulties. This article outlines those difficulties.
It also, it highlights the security benefits of using a Linux-based container OS and explains how to adopt it with JC-STAR, using the "Armadillo Base OS" as an example.
Feb.25.2025@JAWS-UG IoT
5. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
DX時代のシステム開発
? システム開発を「早く」したい
–「実装が早い」ことではない
–ユーザーへのフィードバックを早く
4
ユーザー
企画
実装
リリース
6. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
DX時代のシステム開発
? 何が「早さ」を阻害するのか?
–変更すべき部分は1ヶ所( )
–でも、「そこを変更すれば終わり」ではない
5
機能
A
機能
B
機能
C
7. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
DX時代のシステム開発
? 何が「早さ」を阻害するのか?
–影響調査?変更が、どこに影響するのか?
–回帰テスト?想定しない変更が起きないか?
? リグレッションテスト
–リリース調整?他の機能とリリースを合わせる
6
機能
A
機能
B
機能
C
8. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
DX時代のシステム開発
? 「機能間調整」が早さを阻害する
–変更作業そのものは?さな?数
–様々な調整作業に?数と期間がかかる
? コストもかかる
? 外注していれば?積もり、要員調達、受?テストも…
? モノリス(?枚岩)なシステムのデメリット
–機能間が密結合で、互いに依存する
7
9. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
? いかに機能間調整を無くすか?
–機能間の依存関係を低くすればいい
? 結合度を下げる、疎結合化する
–変更をしたら、他機能を気にすることなくリリース
? 影響調査不要、再帰テスト不要、リリース調整不要
DX時代のシステム開発
8
機能
A
機能
B
機能
C
11. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? 機能間を疎結合に保ちながらシステム全体を動
かすためのテクニック/テクノロジー群
–総称がマイクロサービスアーキテクチャ
? Microservices、MSA
10
?????
A
?????
B
?????
C
12. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? マイクロサービスの特性
–機能ごとにインスタンスを分ける
–機能ごとに開発チームを分ける
–機能特性にあわせて技術要素を選択する
–その開発チームで運?する
–機能間の連携は WebAPI を通じて?う
–機能間でデータベースを共有していない
–機能のリリースは無停?で?う
–連携先サービスがダウンしても稼働するようにする
–機能単位で再構築を?う
11
13. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? 機能ごとに分ける
–インスタンスを分ける
–開発チームを分ける
–技術要素は機能特性に合わせて選択する
–開発チームで運?する(継続開発)
12
?????A ?????B ?????C
???A ???B
開発 運? 開発 運?
技術 技術 技術
14. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? 機能を疎に連携させる≒変更を伝播させない
–WebAPIを通じて連携する
? ネットワークオーバーヘッドが?きいが明確になる
–データベースは共有しない
? 共有すると変更が伝播しやすくなる
13
?????A ?????B ?????C
DB A DB B DB C
15. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? 他機能に影響しない/依存しない
–無停?リリースを?う
? ブルーグリーンデプロイメント
–連携先サービスがダウンしても稼働する
? ?分で障害対策を?う
14
?????A
?????B
v1.0
?????B
v1.1
?????A ?????B障害
障害を伝播
させない
16. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
マイクロサービスとは
? ?きな機能変更に対応する
–機能を再構築する
? 機能単位で再構築することで、全体再構築を避ける
15
?????A
?????B
?????D
39. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
サービスを連携させる
? サービス間でのデータ分割を進める
–保守性?データの定義変更による影響↓
–性能?データアクセスの性能劣化による影響↓
–可?性?データアクセスの障害による影響↓
? サービス間でのデータ整合性との戦い
–分割していくほど整合性は弱くなる
? データの鮮度、整合されるまでの期間など
–どこまで許容できるのか?が?事な判断
38
40. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
データの分割
? RDBはうまく使う
–RDBの実績は硬いので、うまく利?する
–共有データベースパターンもオススメ
–既存のRDBの機能でも、いくつかの選択肢がある
? 詳細次ページ
–もちろん、デメリットは理解する
? 保守性、性能、可?性
39
41. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
データの分割
40
?????
A
モノリス
システム
共有
?????
A
モノリス
システム
ビュー
?????
A
モノリス
システム
レプリケーション
?????
A
モノリス
システム
ETL
42. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
データの分割
? APIによるサービス間連携
–?同期メッセージングを活?する
? 保守性、性能、可?性の観点でメリットは?きい
? ただし、エラー発?時に別ルートでの対応が必要
41
?????
A
?????
B
同期 ?同期
?????
A
?????
B
43. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
データ分割
? イベントソーシング
–データの状態ではなく、変更イベントを?同期に受
信することで擬似的にデータを共有する
–サービスBは「興味があるイベント」だけに対して処
理を?い、その結果を保持すれば良い
42
?????
A
?????
B
44. Copyright? Growth Architectures & Teams, Inc. All rights reserved.
データの分割
43
?い
多い
低い
少ない
????
連携
(ETL)
同期
API
データ量
?同期
API
同期性
?????
??????
DB
共有