# essenecefor 流れ ## アプリのインストール時 ```plantuml entity ai_platform as ap entity cloud_function as gcf entity cloud_storage as gcs entity web_back as wb entity web_front as wf entity shopify_server as ss wf -> wb : インストール時の\n認証リクエスト activate wb wb -> ss : webhookの作成 activate ss wb -> ss : bulk処理の作成 wb -> wf : ローディング中のページを返す deactivate wb activate wf ss -> ss : bulk処理の実行 ss -> wb : bulk処理の終了通知 activate wb wb -> ss : download urlの問い合わせ ss -> wb : download url deactivate ss note over gcs { "store": "ストア名", "url": "ダウンロードURL" } end note wb -> gcf : データ分析リクエスト deactivate wb activate gcf gcf -> ap : データ分析リクエスト deactivate gcf activate ap ap -> ap : データ分析の実行 loop cloud_storageにデータが生成されるまでポーリング(3秒に一回程度) wf -> wb : 結果取得リクエスト activate wb wb -> gcs : 結果取得リクエスト activate gcs end ap -> gcs : 結果の保存 deactivate ap gcs -> wb : 分析結果 deactivate gcs wb -> wf : 分析結果 deactivate wb wf -> wf : 分析結果の表示 ``` ## データ分析の定期実行(1日に1回) ```plantuml entity ai_platform as ap entity cloud_function as gcf entity cloud_storage as gcs entity web_back as wb entity shopify_server as ss wb -> ss : bulk処理の作成(定期実行) activate ss ss -> ss : bulk処理の実行 ss -> wb : bulk処理の終了通知 activate wb wb -> ss : download urlの問い合わせ ss -> wb : download url deactivate ss wb -> gcf : データ分析リクエスト deactivate wb gcf -> ap : データ分析リクエスト activate ap ap -> ap : データ分析の実行 ap -> gcs : 結果の保存 deactivate ap ``` ## インストール時以外のアプリページの読み込み ```plantuml entity ai_platform as ap entity cloud_storage as gcs entity web_back as wb entity web_front as wf wf -> wb : ページの読み込み wb -> wf : ローディング中のページを返す activate wf loop cloud_storageにデータが生成されるまでポーリング(3秒に一回程度) wf -> wb : 結果取得リクエスト activate wb wb -> gcs : 結果取得リクエスト activate gcs end ap -> gcs : 結果の保存\n(インストール時の実行、\n定期実行によるもの) gcs -> wb : 分析結果 deactivate gcs wb -> wf : 分析結果 deactivate wb wf -> wf : 分析結果の表示 deactivate wf ``` # ユーザのページ移動 ```plantuml entity "インストールページ" as install entity "/" as root entity "/auth" as auth entity "購入承認ページ" as subsc install -> root : インストールの実行 group 認証処理 root -> auth : 認証されていないので\nリダイレクト auth -> auth : afterAuth関数の実行\n(backend) auth -> root : 認証後のリダイレクト end group subscriptionの購入処理 root -> subsc : 購入ページへのリダイレクト subsc -> subsc : 購入処理 subsc -> root : 購入後のリダイレクト end ``` - 認証・購入が終わった後のサーバの再起動 - 認証のみが終わった後、購入承認ページにいる際のサーバの再起動
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up