2017 © Pedro Peláez
 

library concurrency-mongo

some concurrency solution library with MongoDB

image

satoruk/concurrency-mongo

some concurrency solution library with MongoDB

  • Friday, December 28, 2012
  • by satoruk
  • Repository
  • 1 Watchers
  • 1 Stars
  • 20 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Build Status, (*1)

concurrency-mongodb

MongoDBを使った並列処理のライブラリです., (*2)

素のPHP自体はマルチスレッド、マルチプロセスに対応していないので 多重起動、サーバのクラスタリングを組んだ場合に利用できるようになっています., (*3)

JobQueue

ジョブキューイングのライブラリ群, (*4)

ResourcePool

排他的なリソース管理, (*5)

MongoDB上の構造

  • JobQueue_${name}
    • _id : object. ObjectID
    • value : any types. this is a job value.
    • priority : integer. 0 is most high priority. defult is 50
    • resolution :
    • opid : Operation ID
    • lockExpiredAt : lock expired at
    • lockBy : sets the locked uuid

ロック戦略

悲観的排他制御にてロックを行っています., (*6)

以下はロックの手順です., (*7)

利用するフィールド - JobQueue_${name}.lockExpiredAt - ロック有効期限 MondoDB内の時間で判定 - JobQueue_${name}.lockBy - ロックをかけたuuid, (*8)

lockExpiredAt以内に処理が終わらなかった場合、再処理されます., (*9)

Project setup

For Developer

開発環境の構築手順, (*10)

$ git clone git://github.com/satoruk/php-concurrency-mongodb.git concurrency-mongodb
$ cd concurrency-mongodb
$ curl -s https://getcomposer.org/installer | php -- --install-dir=bin
$ ./bin/composer.phar install --dev
$ ./bin/phpcs --config-set default_standard PSR2

Testing

$ ./bin/phpunit

The Versions

28/12 2012

0.1.x-dev

0.1.9999999.9999999-dev

some concurrency solution library with MongoDB

  Sources   Download

The Requires

 

The Development Requires

28/12 2012

0.1.1

0.1.1.0

some concurrency solution library with MongoDB

  Sources   Download

The Requires

 

The Development Requires

28/12 2012

dev-master

9999999-dev

some concurrency solution library with MongoDB

  Sources   Download

The Requires

 

The Development Requires

27/11 2012

0.1.0

0.1.0.0

  Sources   Download

The Requires

  • php >=5.3.0
  • pear-pear.apache.org/log4php/apache_log4php 2.2.*

 

The Development Requires