Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ※perform_asyncの箇所でSidekiqを経由する
- /api/v1/statuses/create
- ↓
- PostStatusService.new.call
- ↓
- ProcessMentionsService.new.call → (a)
- ProcessHashtagsService.new.call → タグとnsfwをパースしてstatusesへ設定
- LinkCrawlWorker.perform_async → FetchLinkCardService.new.call → OEmbed, OpenGraph処理
- DistributionWorker.perform_async → (b)
- Pubsubhubbub::DistributionWorker.perform_async → (c)
- (a) ProcessMentionsService.new.call
- ↓×mention数
- リモートのユーザでローカルにアカウント情報がまだ無い場合: FollowRemoteAccountService.new.call
- ローカルの場合: NotifyService.new.call → Redis.current.publish, InlineRenderer.render(@notification, @recipient, 'api/v1/notifications/show')
- リモートの場合: NotificationWorker.perform_async → SendInteractionService.new.call → OStatus2::Salmon.new.post
- (b) DistributionWorker.perform_async
- ↓
- FanOutOnWriteService.new.call
- ↓
- FeedManager.instance.push ×1 → (d)
- FeedInsertWorker.perform_async ×ローカルフォロワー数 → FeedManager.instance.push → (d)
- InlineRenderer.render(status, nil, 'api/v1/statuses/show') ×1
- Redis.current.publish ×ハッシュタグ数+LTL+FTL
- (d) FeedManager.instance.push(この時点で×1+ローカルフォロワー数)
- ↓
- PushUpdateWorker.perform_async
- ↓
- InlineRenderer.render(status, account, 'api/v1/statuses/show')
- Redis.current.publish
- (c) Pubsubhubbub::DistributionWorker.perform_async
- ↓ ×リモートフォロワーが居るサーバ数
- Pubsubhubbub::DeliveryWorker.perform_async → HTTP.post → 相手サーバへ
Advertisement
Add Comment
Please, Sign In to add comment