zhangru-ng / distributed-system

Course projects of COP5615 Fall 15: distributed algorithms implemented in Scala
0 stars 1 forks source link

[Scala_bitcoin] Add concurrency mechanism #1

Closed zhangru-ng closed 9 years ago

zhangru-ng commented 9 years ago
  1. Worker pool: When a new worker comes, add him to the worker pool
  2. Work pool: If there is idle worker in worker pool, ask for a job in work pool and assign to the worker.
zhangru-ng commented 9 years ago

Implemented 1.simple worker pool( Map: worker Id -> worker ActorRef & Map worker Id -> job Id) 2.work producer: produce unique work for workers

zhangru-ng commented 9 years ago

Number of workers = 2 * number of available processors. Use router on each machine to assign jobs to workers.