SlideShare uma empresa Scribd logo
1 de 15
Baixar para ler offline
An application framework
to distribute work
Presenter: Biswajit Maji, Mindfire Solutions
Date: 9/04/2014
Add it to your project
Presenter: Biswajit Maji, Mindfire Solutions
OCP – Oracle certified
professional developer
About Me
Skills : Mysql, php, jQuery, html,
VCS(svn, git), Webservices, Linux
Connect Me:
Facebook: https://www.facebook.com/biswajitmaji.tech
LinkedIn: http://www.linkedin.com/profile/view?id=133902574
Google+: https://plus.google.com/105085556902166170611/
Contact Me:
Email: biswajitm@mindfiresolutions.com / biswajitmaji.tech@gmail.com
Skype: mfsi_biswajitm
Presenter: Biswajit Maji, Mindfire Solutions
AGENDA
 A short description of Gearman
 Some real time problem we face
 Installing Gearman Server
 Installing PHP API
 Gearman Worker code
 Gearman Client code
 Few most used Gearman client methods
 Demo
Presenter: Biswajit Maji, Mindfire Solutions
A short description of Gearman
Open source application framework
To distribute appropriate computer tasks to multiple computers
So large tasks can be done more quickly
Load balancing
Parallel and asynchronous work
Scales well
Architecture-based workload distributing
Fault tolerance using multiple server.
It is an application framework to distribute work
Presenter: Biswajit Maji, Mindfire Solutions
Some real time problem we face
 Sending bulk email
 Image resizing
 Watermarking
 Jobs using other language
http://opentechlovers.wordpress.com/2013/12/17/ba
ckground-processes-how-dangerous-it-could-be/
Problem we face in real time
Presenter: Biswajit Maji, Mindfire Solutions
Installing Gearman Server
in linux box
As usual
sudo apt-get install gearman-job-server
Start gearman server:
sudo gearmand -d
The -d (--daemon) option causes the server to detach
from the shell and run in the background.
Want to know all available options:
Gearmand -h [ --help ]
Install gearman tool
sudo apt-get install gearman-tools
All available option
gearman -h
Presenter: Biswajit Maji, Mindfire Solutions
Installing php api
If want to use pecl for installing gearman
sudo apt-get install php-pear
It may not be needed if following other way to install gearman php api.
apt-get install libgearman-dev // used to configure internally
apt-get install php5-dev // this is needed for phpize
Install api
pecl install gearman
Finally add this in php.ini file
extension="gearman.so"
Presenter: Biswajit Maji, Mindfire Solutions
Gearman Worker code
# Create our worker object.
$gmworker= new GearmanWorker();
# Add default server (localhost).
$gmworker->addServer();
# Register function "reverse" with the server.
$gmworker->addFunction("reverse", "reverse_fn");
Presenter: Biswajit Maji, Mindfire Solutions
Gearman Client code
# Create our client object.
$gmclient= new GearmanClient();
# Add default server (localhost).
$gmclient->addServer();
# Send reverse job
$result = $gmclient->do("reverse", "Hello!");
Presenter: Biswajit Maji, Mindfire Solutions
Few most used Gearman Client methods
addServer("10.0.0.2", 7003)
addServers("10.0.0.1,10.0.0.2:7003")
$client->addTask(string $function_name , string $workload [, mixed
&$context [, string $unique ]]);
$client->runTasks();
$client->addTaskBackground();
$client->addTaskHigh();
setCompleteCallback — Set a function to be called on task completion
setCreatedCallback — Set a callback for when a task is queued
setExceptionCallback — Set a callback for worker exceptions
setFailCallback — Set callback for job failure
setWarningCallback — Set a callback for worker warnings
Presenter: Biswajit Maji, Mindfire Solutions
DEMO
Presenter: Biswajit Maji, Mindfire Solutions
References
http://gearman.org/
http://blog.zitec.com/2011/parallel-processing-with-php-and-gearman/
http://www.phpclasses.org/blog/post/108-Distributing-PHP-processing-with-G
http://www.cirello.org/2012/05/scalable-architecture-with-gearman-job-server/
http://in3.php.net/manual/en/book.gearman.php
Presenter: Biswajit Maji, Mindfire Solutions
Question and
Answer
Presenter: Biswajit Maji, Mindfire Solutions
Thank
you
www.mindfiresolutions.com
https://www.facebook.com/MindfireSolutions
http://www.linkedin.com/company/mindfire-solutions
http://twitter.com/mindfires

Mais conteúdo relacionado

Mais procurados

Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!Abdelrahman Omran
 
Front end workflow with yeoman
Front end workflow with yeomanFront end workflow with yeoman
Front end workflow with yeomanhassan hafez
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitAtlassian
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in DjangoLakshman Prasad
 
AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"💻 Javier Garza
 
Ten Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsTen Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsAtlassian
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012Phil Leggetter
 
How to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onHow to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onAtlassian
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the WebJana Moudrá
 
Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanaceMichelle Castillo
 
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...Tracy Lee
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011dimakovalenko
 
Bringing Server Add-ons to the Cloud and Back Again
Bringing Server Add-ons to the Cloud and Back AgainBringing Server Add-ons to the Cloud and Back Again
Bringing Server Add-ons to the Cloud and Back AgainAtlassian
 

Mais procurados (20)

Akamai-as-Code with The Washington Post
Akamai-as-Code with The Washington PostAkamai-as-Code with The Washington Post
Akamai-as-Code with The Washington Post
 
10 things you can do at the edge
10 things you can do at the edge10 things you can do at the edge
10 things you can do at the edge
 
Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!Laravel & google cloud platform do mix​!
Laravel & google cloud platform do mix​!
 
Yeoman
YeomanYeoman
Yeoman
 
Front end workflow with yeoman
Front end workflow with yeomanFront end workflow with yeoman
Front end workflow with yeoman
 
Manage Your Akamai-as-Code with Terraform
Manage Your Akamai-as-Code with TerraformManage Your Akamai-as-Code with Terraform
Manage Your Akamai-as-Code with Terraform
 
Building Faster With Your Team's UI Kit
Building Faster With Your Team's UI KitBuilding Faster With Your Team's UI Kit
Building Faster With Your Team's UI Kit
 
Web Development in Django
Web Development in DjangoWeb Development in Django
Web Development in Django
 
AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"AWS re:Invent "The secrets to building and delivering amazing apps at scale"
AWS re:Invent "The secrets to building and delivering amazing apps at scale"
 
Let's Program The Cloud
Let's Program The CloudLet's Program The Cloud
Let's Program The Cloud
 
Ten Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-onsTen Battle-Tested Tips for Atlassian Connect Add-ons
Ten Battle-Tested Tips for Atlassian Connect Add-ons
 
What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012What Developers Want - Developers Want Realtime - BAPI 2012
What Developers Want - Developers Want Realtime - BAPI 2012
 
Speed = $$$
Speed = $$$Speed = $$$
Speed = $$$
 
How to Build a Better JIRA Add-on
How to Build a Better JIRA Add-onHow to Build a Better JIRA Add-on
How to Build a Better JIRA Add-on
 
Firebase for the Web
Firebase for the WebFirebase for the Web
Firebase for the Web
 
Word press sites maintenanace
Word press sites maintenanaceWord press sites maintenanace
Word press sites maintenanace
 
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
AngularJS RTP Slides - Angular 2 Demo #ngtattoo with Angular CLI, Newest New ...
 
Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011Selenium and Cucumber Selenium Conf 2011
Selenium and Cucumber Selenium Conf 2011
 
Bringing Server Add-ons to the Cloud and Back Again
Bringing Server Add-ons to the Cloud and Back AgainBringing Server Add-ons to the Cloud and Back Again
Bringing Server Add-ons to the Cloud and Back Again
 
WordPress in 90 minutes
WordPress in 90 minutesWordPress in 90 minutes
WordPress in 90 minutes
 

Destaque

Distributed work with Gearman
Distributed work with GearmanDistributed work with Gearman
Distributed work with GearmanDominik Jungowski
 
MapReduce Using Perl and Gearman
MapReduce Using Perl and GearmanMapReduce Using Perl and Gearman
MapReduce Using Perl and GearmanJamie Pitts
 
Gearman Introduction
Gearman IntroductionGearman Introduction
Gearman IntroductionGreen Wang
 
Jack Cross Tree Sculptures
Jack Cross Tree SculpturesJack Cross Tree Sculptures
Jack Cross Tree SculpturesSuzanneBurton
 
Global english
Global englishGlobal english
Global englishalejandra
 
Khanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionKhanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionJavaScript Meetup HCMC
 
Gearman, from the worker's perspective
Gearman, from the worker's perspectiveGearman, from the worker's perspective
Gearman, from the worker's perspectiveBrian Aker
 
Hep Y Bir Thday Eva Vi Viana
Hep Y Bir Thday  Eva  Vi VianaHep Y Bir Thday  Eva  Vi Viana
Hep Y Bir Thday Eva Vi Vianasukiandi
 

Destaque (9)

Distributed work with Gearman
Distributed work with GearmanDistributed work with Gearman
Distributed work with Gearman
 
MapReduce Using Perl and Gearman
MapReduce Using Perl and GearmanMapReduce Using Perl and Gearman
MapReduce Using Perl and Gearman
 
Gearman Introduction
Gearman IntroductionGearman Introduction
Gearman Introduction
 
Jack Cross Tree Sculptures
Jack Cross Tree SculpturesJack Cross Tree Sculptures
Jack Cross Tree Sculptures
 
Global english
Global englishGlobal english
Global english
 
Khanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solutionKhanh-Nguyen - Gearman - distributed process solution
Khanh-Nguyen - Gearman - distributed process solution
 
Gearman
GearmanGearman
Gearman
 
Gearman, from the worker's perspective
Gearman, from the worker's perspectiveGearman, from the worker's perspective
Gearman, from the worker's perspective
 
Hep Y Bir Thday Eva Vi Viana
Hep Y Bir Thday  Eva  Vi VianaHep Y Bir Thday  Eva  Vi Viana
Hep Y Bir Thday Eva Vi Viana
 

Semelhante a Gearman Add To Your Project

Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestJoshua Warren
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineMichele Orselli
 
Using PHP with IBM Bluemix
Using PHP with IBM BluemixUsing PHP with IBM Bluemix
Using PHP with IBM Bluemixvvaswani
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsJoe Ferguson
 
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamJoe Ferguson
 
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the ProxyCloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the ProxyMaki Toshio
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsJoe Ferguson
 
Automated Server Administration for DevSecOps
Automated Server Administration for DevSecOpsAutomated Server Administration for DevSecOps
Automated Server Administration for DevSecOpsAarno Aukia
 
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
AMIMOTO: WordPress + Amazon Web Services Hands-on PARISAMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
AMIMOTO: WordPress + Amazon Web Services Hands-on PARISKel
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php PresentationAlan Pinstein
 
Building with Firebase
Building with FirebaseBuilding with Firebase
Building with FirebaseMike Fowler
 
You don’t know js about share point – hugh wood
You don’t know js about share point – hugh woodYou don’t know js about share point – hugh wood
You don’t know js about share point – hugh woodHugh Wood
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoDEVCON
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialWidoyo PH
 
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattlegarrett honeycutt
 
Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017ylefebvre
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Fabrice Bernhard
 
Php Development Stack
Php Development StackPhp Development Stack
Php Development Stackshah_neeraj
 

Semelhante a Gearman Add To Your Project (20)

Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
 
Deploy a PHP App on Google App Engine
Deploy a PHP App on Google App EngineDeploy a PHP App on Google App Engine
Deploy a PHP App on Google App Engine
 
Using PHP with IBM Bluemix
Using PHP with IBM BluemixUsing PHP with IBM Bluemix
Using PHP with IBM Bluemix
 
Wordpress as a framework
Wordpress as a frameworkWordpress as a framework
Wordpress as a framework
 
ZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small TeamsZendCon 2015 - DevOps for Small Teams
ZendCon 2015 - DevOps for Small Teams
 
Midwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small teamMidwest PHP 2017 DevOps For Small team
Midwest PHP 2017 DevOps For Small team
 
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the ProxyCloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
Cloud Foundry Day in Tokyo Lightning Talk - Cloud Foundry over the Proxy
 
Madison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small TeamsMadison PHP 2015 - DevOps For Small Teams
Madison PHP 2015 - DevOps For Small Teams
 
Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
Automated Server Administration for DevSecOps
Automated Server Administration for DevSecOpsAutomated Server Administration for DevSecOps
Automated Server Administration for DevSecOps
 
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
AMIMOTO: WordPress + Amazon Web Services Hands-on PARISAMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
AMIMOTO: WordPress + Amazon Web Services Hands-on PARIS
 
Lean Php Presentation
Lean Php PresentationLean Php Presentation
Lean Php Presentation
 
Building with Firebase
Building with FirebaseBuilding with Firebase
Building with Firebase
 
You don’t know js about share point – hugh wood
You don’t know js about share point – hugh woodYou don’t know js about share point – hugh wood
You don’t know js about share point – hugh wood
 
Progressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent ConventoProgressive Web Apps by Millicent Convento
Progressive Web Apps by Millicent Convento
 
Easy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & MercurialEasy Web Project Development & Management with Django & Mercurial
Easy Web Project Development & Management with Django & Mercurial
 
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
2014-11-11 Multiple Approaches to Managing Puppet Modules @ Puppet Camp Seattle
 
Plugin development demystified 2017
Plugin development demystified 2017Plugin development demystified 2017
Plugin development demystified 2017
 
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
Adopt DevOps philosophy on your Symfony projects (Symfony Live 2011)
 
Php Development Stack
Php Development StackPhp Development Stack
Php Development Stack
 

Mais de Mindfire Solutions (20)

Physician Search and Review
Physician Search and ReviewPhysician Search and Review
Physician Search and Review
 
diet management app
diet management appdiet management app
diet management app
 
Business Technology Solution
Business Technology SolutionBusiness Technology Solution
Business Technology Solution
 
Remote Health Monitoring
Remote Health MonitoringRemote Health Monitoring
Remote Health Monitoring
 
Influencer Marketing Solution
Influencer Marketing SolutionInfluencer Marketing Solution
Influencer Marketing Solution
 
ELMAH
ELMAHELMAH
ELMAH
 
High Availability of Azure Applications
High Availability of Azure ApplicationsHigh Availability of Azure Applications
High Availability of Azure Applications
 
IOT Hands On
IOT Hands OnIOT Hands On
IOT Hands On
 
Glimpse of Loops Vs Set
Glimpse of Loops Vs SetGlimpse of Loops Vs Set
Glimpse of Loops Vs Set
 
Oracle Sql Developer-Getting Started
Oracle Sql Developer-Getting StartedOracle Sql Developer-Getting Started
Oracle Sql Developer-Getting Started
 
Adaptive Layout In iOS 8
Adaptive Layout In iOS 8Adaptive Layout In iOS 8
Adaptive Layout In iOS 8
 
Introduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/MacIntroduction to Auto-layout : iOS/Mac
Introduction to Auto-layout : iOS/Mac
 
LINQPad - utility Tool
LINQPad - utility ToolLINQPad - utility Tool
LINQPad - utility Tool
 
Get started with watch kit development
Get started with watch kit developmentGet started with watch kit development
Get started with watch kit development
 
Swift vs Objective-C
Swift vs Objective-CSwift vs Objective-C
Swift vs Objective-C
 
Material Design in Android
Material Design in AndroidMaterial Design in Android
Material Design in Android
 
Introduction to OData
Introduction to ODataIntroduction to OData
Introduction to OData
 
Ext js Part 2- MVC
Ext js Part 2- MVCExt js Part 2- MVC
Ext js Part 2- MVC
 
ExtJs Basic Part-1
ExtJs Basic Part-1ExtJs Basic Part-1
ExtJs Basic Part-1
 
Spring Security Introduction
Spring Security IntroductionSpring Security Introduction
Spring Security Introduction
 

Último

Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 

Último (20)

Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 

Gearman Add To Your Project

  • 1. An application framework to distribute work Presenter: Biswajit Maji, Mindfire Solutions Date: 9/04/2014 Add it to your project
  • 2. Presenter: Biswajit Maji, Mindfire Solutions OCP – Oracle certified professional developer About Me Skills : Mysql, php, jQuery, html, VCS(svn, git), Webservices, Linux Connect Me: Facebook: https://www.facebook.com/biswajitmaji.tech LinkedIn: http://www.linkedin.com/profile/view?id=133902574 Google+: https://plus.google.com/105085556902166170611/ Contact Me: Email: biswajitm@mindfiresolutions.com / biswajitmaji.tech@gmail.com Skype: mfsi_biswajitm
  • 3. Presenter: Biswajit Maji, Mindfire Solutions AGENDA  A short description of Gearman  Some real time problem we face  Installing Gearman Server  Installing PHP API  Gearman Worker code  Gearman Client code  Few most used Gearman client methods  Demo
  • 4. Presenter: Biswajit Maji, Mindfire Solutions A short description of Gearman Open source application framework To distribute appropriate computer tasks to multiple computers So large tasks can be done more quickly Load balancing Parallel and asynchronous work Scales well Architecture-based workload distributing Fault tolerance using multiple server. It is an application framework to distribute work
  • 5. Presenter: Biswajit Maji, Mindfire Solutions Some real time problem we face  Sending bulk email  Image resizing  Watermarking  Jobs using other language http://opentechlovers.wordpress.com/2013/12/17/ba ckground-processes-how-dangerous-it-could-be/ Problem we face in real time
  • 6. Presenter: Biswajit Maji, Mindfire Solutions Installing Gearman Server in linux box As usual sudo apt-get install gearman-job-server Start gearman server: sudo gearmand -d The -d (--daemon) option causes the server to detach from the shell and run in the background. Want to know all available options: Gearmand -h [ --help ] Install gearman tool sudo apt-get install gearman-tools All available option gearman -h
  • 7. Presenter: Biswajit Maji, Mindfire Solutions Installing php api If want to use pecl for installing gearman sudo apt-get install php-pear It may not be needed if following other way to install gearman php api. apt-get install libgearman-dev // used to configure internally apt-get install php5-dev // this is needed for phpize Install api pecl install gearman Finally add this in php.ini file extension="gearman.so"
  • 8. Presenter: Biswajit Maji, Mindfire Solutions Gearman Worker code # Create our worker object. $gmworker= new GearmanWorker(); # Add default server (localhost). $gmworker->addServer(); # Register function "reverse" with the server. $gmworker->addFunction("reverse", "reverse_fn");
  • 9. Presenter: Biswajit Maji, Mindfire Solutions Gearman Client code # Create our client object. $gmclient= new GearmanClient(); # Add default server (localhost). $gmclient->addServer(); # Send reverse job $result = $gmclient->do("reverse", "Hello!");
  • 10. Presenter: Biswajit Maji, Mindfire Solutions Few most used Gearman Client methods addServer("10.0.0.2", 7003) addServers("10.0.0.1,10.0.0.2:7003") $client->addTask(string $function_name , string $workload [, mixed &$context [, string $unique ]]); $client->runTasks(); $client->addTaskBackground(); $client->addTaskHigh(); setCompleteCallback — Set a function to be called on task completion setCreatedCallback — Set a callback for when a task is queued setExceptionCallback — Set a callback for worker exceptions setFailCallback — Set callback for job failure setWarningCallback — Set a callback for worker warnings
  • 11. Presenter: Biswajit Maji, Mindfire Solutions DEMO
  • 12. Presenter: Biswajit Maji, Mindfire Solutions References http://gearman.org/ http://blog.zitec.com/2011/parallel-processing-with-php-and-gearman/ http://www.phpclasses.org/blog/post/108-Distributing-PHP-processing-with-G http://www.cirello.org/2012/05/scalable-architecture-with-gearman-job-server/ http://in3.php.net/manual/en/book.gearman.php
  • 13. Presenter: Biswajit Maji, Mindfire Solutions Question and Answer
  • 14. Presenter: Biswajit Maji, Mindfire Solutions Thank you