Ce diaporama a bien été signalé.
Nous utilisons votre profil LinkedIn et vos données d’activité pour vous proposer des publicités personnalisées et pertinentes. Vous pouvez changer vos préférences de publicités à tout moment.
GearmanBundle
SymfonyCon Warsaw Edition
@Mmoreram
Bafactory, Barcelona
GearmanBundle
Providing Gearman support on your SF2 projects
<?php
namespace AcmeAcmeBundleWorkers;
!

/**
* My simple Acme Class
*/
class AcmeClass
{
/**
* My simple acme class metho...
<?php
namespace AcmeAcmeBundleWorkers;
!

use MmoreramGearmanBundleDriverGearman;
!

/**
* @GearmanWork(name=“myworker”)
*...
$ php app/console gearman:workers:list
!

	 @Worker: AcmeAcmeBundleWorkersAcmeClass
	 callablename: myworker
	 Jobs:
	 	 -...
$ php app/console gearman:worker:execute myworker
Supervisord

WorkerWorker
Worker
Worker
Worker Worker
$this
->getContainer()
->get(‘gearman')
->doJob(‘myworker’, ‘value’);
<?php
namespace AcmeAcmeBundleWorkers;
!

use MmoreramGearmanBundleDriverGearman;
!

/**
* @GearmanWork(name=“myworker”)
*...
Dependencies? W
AAS
(Worker as a service)
–Concept invented by me, like a boss…
<?php
namespace AcmeAcmeBundleWorkers;
!

use MmoreramGearmanBundleDriverGearman;
!

/**
* @GearmanWork(name=“myworker”, s...
<?php
namespace AcmeAcmeBundleWorkers;
!

use SymfonyComponentDependencyInjectionContainerAwareInterface;
use MmoreramGear...
What else?

Many features available for developers
Improving day by day all code, adding features and
resolving issues
50 ...
I encourage you to use Queues

And that you use GearmanBundle :)
Moltes Gràcies,
Thanks!
Prochain SlideShare
Chargement dans…5
×

Gearman bundle, Warszawa 2013 edition

1 441 vues

Publié le

Publié dans : Technologie
  • Soyez le premier à commenter

Gearman bundle, Warszawa 2013 edition

  1. 1. GearmanBundle SymfonyCon Warsaw Edition
  2. 2. @Mmoreram Bafactory, Barcelona
  3. 3. GearmanBundle Providing Gearman support on your SF2 projects
  4. 4. <?php namespace AcmeAcmeBundleWorkers; ! /** * My simple Acme Class */ class AcmeClass { /** * My simple acme class method */ public function action() { ! } }
  5. 5. <?php namespace AcmeAcmeBundleWorkers; ! use MmoreramGearmanBundleDriverGearman; ! /** * @GearmanWork(name=“myworker”) */ class AcmeClass { /** * @GearmanJob */ public function action(GearmanJob $job) { // Do some stuff } }
  6. 6. $ php app/console gearman:workers:list ! @Worker: AcmeAcmeBundleWorkersAcmeClass callablename: myworker Jobs: - #1 name: action callablename: myworker~action
  7. 7. $ php app/console gearman:worker:execute myworker
  8. 8. Supervisord WorkerWorker Worker Worker Worker Worker
  9. 9. $this ->getContainer() ->get(‘gearman') ->doJob(‘myworker’, ‘value’);
  10. 10. <?php namespace AcmeAcmeBundleWorkers; ! use MmoreramGearmanBundleDriverGearman; ! /** * @GearmanWork(name=“myworker”) */ class AcmeClass { /** * @GearmanJob */ public function action(GearmanJob $job) { $workload = $job->workload(); } }
  11. 11. Dependencies? W AAS (Worker as a service) –Concept invented by me, like a boss…
  12. 12. <?php namespace AcmeAcmeBundleWorkers; ! use MmoreramGearmanBundleDriverGearman; ! /** * @GearmanWork(name=“myworker”, service=“worker.myworker”) */ class AcmeClass { /** * @GearmanJob */ public function action(GearmanJob $job) { $workload = $job->workload(); } }
  13. 13. <?php namespace AcmeAcmeBundleWorkers; ! use SymfonyComponentDependencyInjectionContainerAwareInterface; use MmoreramGearmanBundleDriverGearman; ! /** * @GearmanWork(name=“myworker”, service=“worker.myworker”) */ class AcmeClass instanceof ContainerAwareInterface { /** * @GearmanJob */ public function action(GearmanJob $job) { $workload = $job->workload(); } }
  14. 14. What else? Many features available for developers Improving day by day all code, adding features and resolving issues 50 daily downloads ( Not as popular as Symfony packages… ) Platinum medal on SensioLabs Insight
  15. 15. I encourage you to use Queues And that you use GearmanBundle :)
  16. 16. Moltes Gràcies, Thanks!

×