DOCS:deviceshadow - #7
Conversation
🔗 関連するNotionタスク状態: 進行中 |
Summary of ChangesHello @Koonosuke, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! このプルリクエストは、AWS IoT Device Shadowの概念と関連するサービス間の連携を説明する新しいドキュメントを追加します。主な変更は、デバイスからWebアプリケーションへのデータフローを示すMermaidフローチャートの導入であり、これによりシステムのアーキテクチャとDevice Shadowの機能が明確に視覚化されます。 Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
ドキュメントの追加ありがとうございます。MermaidでAWSのアーキテクチャ図を追加されたのですね。
1点、ファイル名が devicesshadow.md となっていますが、deviceshadow.md のタイポ(typo)ではないでしょうか?ご確認いただけると幸いです。
また、図の内容について1点フィードバックがあります。現在の図では、データの流れを示す矢印の向きが、注釈で説明されているデバイス制御のシナリオと一致していないように見受けられます。これにより、読者が混乱する可能性があるため、修正案を提案させていただきました。詳細はコメントをご確認ください。
| flowchart LR | ||
| %% 左:デバイス、右:Webアプリ | ||
| device["Device\nPower: OFF"] | ||
| web["Web Application"] | ||
|
|
||
| %% 中央:AWS Cloud | ||
| subgraph cloud["AWS Cloud"] | ||
| direction LR | ||
| shadow["Device Shadow"] | ||
| core["AWS IoT Core"] | ||
| lambda["AWS Lambda"] | ||
| apigw["Amazon API Gateway"] | ||
| end | ||
|
|
||
| %% 接続 | ||
| device --> shadow | ||
| shadow --> core | ||
| core --> lambda | ||
| lambda --> apigw | ||
| apigw --> web | ||
|
|
||
| %% メモ | ||
| note right of apigw | ||
| 電源をONせよ | ||
| end note | ||
|
|
||
| note bottom of shadow | ||
| 差分を管理 | ||
| desired: "Power": "ON" | ||
| reported: "Power": "OFF" | ||
| delta: "Power": "ON" | ||
| end note | ||
|
|
||
| %% 色付け(AWSアイコンの色に寄せる) | ||
| classDef iot fill:#E6F1FB,stroke:#2667B2,color:#0A1F44; | ||
| classDef lambda fill:#FFF4E5,stroke:#F58536,color:#3C1E00; | ||
| classDef apigw fill:#FDEDEC,stroke:#D63A2F,color:#5C0F0A; | ||
| class device,shadow,core iot; | ||
| class lambda lambda; | ||
| class apigw apigw; |
There was a problem hiding this comment.
この図は、Device Shadow を用いたデバイス制御の仕組みを説明することを意図していると拝見しました。注釈にある desired, reported, delta の状態は、まさにDevice Shadowの核心的な機能を示しています。
しかし、現在の図に描かれている矢印のフロー (device --> shadow --> ... --> web) は、デバイスからWebアプリケーションへの状態報告フローのように見え、Webアプリケーションからデバイスを制御する(例:「電源をONせよ」)というシナリオとは逆向きになっています。このため、図と注釈の間に矛盾が生じており、読者が混乱する可能性があります。
Webアプリケーションからデバイスを制御するフローをより明確に表現するために、図の構成を変更することを提案します。これにより、制御コマンドの流れが直感的に理解できるようになります。
flowchart LR
%% 左:Webアプリ、右:デバイス
web["Web Application"]
device["Device\nPower: OFF"]
%% 中央:AWS Cloud
subgraph cloud["AWS Cloud"]
direction LR
apigw["Amazon API Gateway"]
lambda["AWS Lambda"]
core["AWS IoT Core"]
shadow["Device Shadow"]
end
%% 接続
web --> apigw
apigw --> lambda
lambda --> core
core --> shadow
shadow --> device
%% メモ
note on web
電源をONせよ
end note
note bottom of shadow
差分を管理
desired: "Power": "ON"
reported: "Power": "OFF"
delta: "Power": "ON"
end note
%% 色付け(AWSアイコンの色に寄せる)
classDef iot fill:#E6F1FB,stroke:#2667B2,color:#0A1F44;
classDef lambda fill:#FFF4E5,stroke:#F58536,color:#3C1E00;
classDef apigw fill:#FDEDEC,stroke:#D63A2F,color:#5C0F0A;
class device,shadow,core iot;
class lambda lambda;
class apigw apigw;
概要
その他