项目作者: uretgec

项目描述 :
Simple queue worker for Redis push lists
高级语言: JavaScript
项目地址: git://github.com/uretgec/sync-queue-worker.git
创建时间: 2021-06-27T21:39:06Z
项目社区:https://github.com/uretgec/sync-queue-worker

开源协议:

下载


Sync Queue Worker

For admin panel background service
For data sync to multiple clients

How to work

  1. example/clint.worker.js
  2. --> Redis
  3. --> one by one client sent to per SyncDataItem (rpush the sync queue list)
  1. example/client.peer.js
  2. --> HTTP Server - Allow Only POST Method

  1. sync.queue.worker.js (FIFO)
  2. --> Redis
  3. --> checked queue is blocked
  4. --> llen the sync queue list
  5. --> blocked queue
  6. --> lpop SyncDataItem one by one while maximum limit not exceeded
  7. --> events data collected the background process
  8. --> SyncDataItem has been posted by sync url with HTTP Post method
  9. --> request process not response or timeout, SyncDataItem rpush the queue list again
  10. --> Finally when queue list was empty, collected stats send to publish the slack notify channel
  11. --> queue process kill by itself
  1. notify.slack.js
  2. --> Redis
  3. --> notify channel subscribed
  4. --> when message received from channel, stats data sent to Slack Channel immediately with HTTP Post method