SlideShare uma empresa Scribd logo
1 de 10
PHP
Push Notification System
Mohammed S Shurrab
CTO, Datrios.com
CTO, UnitOne.ps
Pull vs Push!

Pull

Push
Architecture
Requirements


Back-end



Mosquitto server (http://mosquitto.org/)



Node.js (http://nodejs.org/)


Socket.io module (npm install socket.io)



Zeparser module (npm install zeparser)



MQTTClient (https://github.com/yilun/node_mqtt_client)



Front-end



Sockit.IO (http://cdnjs.com/libraries/socket.io/)



jQuery (http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js)
Client code

1. Connect to the node.js server through soket.io (L:5)
2. Subscribe to some topic(s) (L:10)
3. Listen to any notification for these topics (L:7-9)
Node.js code (1/3)

1. include the required modules (L:1-5)
2. Specify the web socket port (L:5)
3. Connect to the MQTT server (L:6)
Node.js code (2/3)

1. Listening to a successful socket connection (L:8)
1. Listening to a subscribing request from the client (L:9-13)
1. Filtering the web socket data based on the topics (L:11)
2. Listening to a notify request from the server (L:15-18)
Node.js code (3/3)

1. Listening to a new notification from the MQQT server (L:21)
1. Sent these notification through the web socket (L:23-25)
2. Listening to a successful connection with the MQTT server and sent a test
notification every 5 seconds (L:29-33)
DEMO
Php push notifications

Mais conteúdo relacionado

Mais procurados

Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta
Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta
Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta Dwie Cahya
 
Hyster c177 (h3.00 xl europe) forklift service repair manual
Hyster c177 (h3.00 xl europe) forklift service repair manualHyster c177 (h3.00 xl europe) forklift service repair manual
Hyster c177 (h3.00 xl europe) forklift service repair manualjfjkskekfsmem
 
Bundled Tube Structure
Bundled Tube StructureBundled Tube Structure
Bundled Tube StructureErsa Sitompul
 
Wisma Rubber Lee Analysis
Wisma Rubber Lee AnalysisWisma Rubber Lee Analysis
Wisma Rubber Lee AnalysisEric Lo
 
สาระสำคัญ สำหรับที่จอดรถยนต์
สาระสำคัญ สำหรับที่จอดรถยนต์สาระสำคัญ สำหรับที่จอดรถยนต์
สาระสำคัญ สำหรับที่จอดรถยนต์Narasak Sripakdee
 
Dewan Tunku Canselor compilation
Dewan Tunku Canselor compilationDewan Tunku Canselor compilation
Dewan Tunku Canselor compilationCarlson Ko
 
Architectural Comprehensive Design Report
Architectural Comprehensive Design ReportArchitectural Comprehensive Design Report
Architectural Comprehensive Design ReportLimSiewNi
 
Rencana Infrastruktur Kampung Akuarium
Rencana Infrastruktur Kampung AkuariumRencana Infrastruktur Kampung Akuarium
Rencana Infrastruktur Kampung AkuariumNurlina Y.
 
Cnh2 petaling jaya civic centre
Cnh2   petaling jaya civic centreCnh2   petaling jaya civic centre
Cnh2 petaling jaya civic centre杉 江紫
 
Struktur Interspasial
Struktur InterspasialStruktur Interspasial
Struktur InterspasialRatna Dhani
 
presentacion instalacion de agua.pdf
presentacion instalacion de agua.pdfpresentacion instalacion de agua.pdf
presentacion instalacion de agua.pdftestgrupocomex
 
Prestressed concrete baru
Prestressed concrete baruPrestressed concrete baru
Prestressed concrete baruKartina Sazali
 
Kemang village residences
Kemang village residences Kemang village residences
Kemang village residences bossgunawan
 
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.Aditya Yudi Kurniawan
 
Ccc case study report taylor's university
Ccc case study report taylor's universityCcc case study report taylor's university
Ccc case study report taylor's universityKohSungJie
 

Mais procurados (20)

Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta
Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta
Survey Analisis Utilitas Pasar Beringharjo, Yogyakarta
 
Analisis arah angin
Analisis arah anginAnalisis arah angin
Analisis arah angin
 
Hyster c177 (h3.00 xl europe) forklift service repair manual
Hyster c177 (h3.00 xl europe) forklift service repair manualHyster c177 (h3.00 xl europe) forklift service repair manual
Hyster c177 (h3.00 xl europe) forklift service repair manual
 
Bundled Tube Structure
Bundled Tube StructureBundled Tube Structure
Bundled Tube Structure
 
Wisma Rubber Lee Analysis
Wisma Rubber Lee AnalysisWisma Rubber Lee Analysis
Wisma Rubber Lee Analysis
 
Disposiciones de las ntc
Disposiciones de las ntcDisposiciones de las ntc
Disposiciones de las ntc
 
kelompok 6.pptx
kelompok 6.pptxkelompok 6.pptx
kelompok 6.pptx
 
Lyon satolas station
Lyon satolas stationLyon satolas station
Lyon satolas station
 
สาระสำคัญ สำหรับที่จอดรถยนต์
สาระสำคัญ สำหรับที่จอดรถยนต์สาระสำคัญ สำหรับที่จอดรถยนต์
สาระสำคัญ สำหรับที่จอดรถยนต์
 
Dewan Tunku Canselor compilation
Dewan Tunku Canselor compilationDewan Tunku Canselor compilation
Dewan Tunku Canselor compilation
 
Architectural Comprehensive Design Report
Architectural Comprehensive Design ReportArchitectural Comprehensive Design Report
Architectural Comprehensive Design Report
 
Rencana Infrastruktur Kampung Akuarium
Rencana Infrastruktur Kampung AkuariumRencana Infrastruktur Kampung Akuarium
Rencana Infrastruktur Kampung Akuarium
 
Cnh2 petaling jaya civic centre
Cnh2   petaling jaya civic centreCnh2   petaling jaya civic centre
Cnh2 petaling jaya civic centre
 
Utilitas bangunan
Utilitas bangunanUtilitas bangunan
Utilitas bangunan
 
Struktur Interspasial
Struktur InterspasialStruktur Interspasial
Struktur Interspasial
 
presentacion instalacion de agua.pdf
presentacion instalacion de agua.pdfpresentacion instalacion de agua.pdf
presentacion instalacion de agua.pdf
 
Prestressed concrete baru
Prestressed concrete baruPrestressed concrete baru
Prestressed concrete baru
 
Kemang village residences
Kemang village residences Kemang village residences
Kemang village residences
 
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.
CULTURAL CENTRE & TRANSIT ORIENTED DEVELOPMENT. LEBAK BULUS, JAKARTA.
 
Ccc case study report taylor's university
Ccc case study report taylor's universityCcc case study report taylor's university
Ccc case study report taylor's university
 

Destaque

Push notifications
Push notificationsPush notifications
Push notificationsDale Lane
 
E content mohammed shurrab
E content   mohammed shurrabE content   mohammed shurrab
E content mohammed shurrabMohammed Shurrab
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSocketsRoland M
 
OWD - Push Notification Server Architecture [DEVCON1_2012]
OWD - Push Notification Server Architecture [DEVCON1_2012]OWD - Push Notification Server Architecture [DEVCON1_2012]
OWD - Push Notification Server Architecture [DEVCON1_2012]Fernando Sela
 
REST is not enough: Using Push Notifications to better support your mobile cl...
REST is not enough: Using Push Notifications to better support your mobile cl...REST is not enough: Using Push Notifications to better support your mobile cl...
REST is not enough: Using Push Notifications to better support your mobile cl...Juan Gomez
 
Push vs pull Advantages & Disadvantages
Push vs pull Advantages & DisadvantagesPush vs pull Advantages & Disadvantages
Push vs pull Advantages & DisadvantagesSwapnil Gharde
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push NotificationsMike Willbanks
 
Study on Lean Manufacturing Process in Garments Production
Study on Lean Manufacturing Process in Garments ProductionStudy on Lean Manufacturing Process in Garments Production
Study on Lean Manufacturing Process in Garments ProductionMomin Uddin
 
Rich Internet Applications
Rich Internet ApplicationsRich Internet Applications
Rich Internet ApplicationsYoussef Shaath
 

Destaque (14)

Push notifications
Push notificationsPush notifications
Push notifications
 
Open Graph Protocol 2.0
Open Graph Protocol 2.0Open Graph Protocol 2.0
Open Graph Protocol 2.0
 
02 eContent
02 eContent02 eContent
02 eContent
 
E content mohammed shurrab
E content   mohammed shurrabE content   mohammed shurrab
E content mohammed shurrab
 
Pushing the web — WebSockets
Pushing the web — WebSocketsPushing the web — WebSockets
Pushing the web — WebSockets
 
Push notifications
Push notificationsPush notifications
Push notifications
 
OWD - Push Notification Server Architecture [DEVCON1_2012]
OWD - Push Notification Server Architecture [DEVCON1_2012]OWD - Push Notification Server Architecture [DEVCON1_2012]
OWD - Push Notification Server Architecture [DEVCON1_2012]
 
Push Notification
Push NotificationPush Notification
Push Notification
 
REST is not enough: Using Push Notifications to better support your mobile cl...
REST is not enough: Using Push Notifications to better support your mobile cl...REST is not enough: Using Push Notifications to better support your mobile cl...
REST is not enough: Using Push Notifications to better support your mobile cl...
 
Push vs pull Advantages & Disadvantages
Push vs pull Advantages & DisadvantagesPush vs pull Advantages & Disadvantages
Push vs pull Advantages & Disadvantages
 
Push Notification
Push NotificationPush Notification
Push Notification
 
Mobile Push Notifications
Mobile Push NotificationsMobile Push Notifications
Mobile Push Notifications
 
Study on Lean Manufacturing Process in Garments Production
Study on Lean Manufacturing Process in Garments ProductionStudy on Lean Manufacturing Process in Garments Production
Study on Lean Manufacturing Process in Garments Production
 
Rich Internet Applications
Rich Internet ApplicationsRich Internet Applications
Rich Internet Applications
 

Semelhante a Php push notifications

All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS ExpressDavid Boyer
 
Building an inflight entertainment system controller in twisted
Building an inflight entertainment system controller in twistedBuilding an inflight entertainment system controller in twisted
Building an inflight entertainment system controller in twistedDavid Novakovic
 
Remote code execution in restricted windows environments
Remote code execution in restricted windows environmentsRemote code execution in restricted windows environments
Remote code execution in restricted windows environmentsBorja Merino
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDNOpenStack Korea Community
 
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDNSungman Jang
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSocketsGonzalo Ayuso
 
Pushing Data from S7-1200 to Cloud
Pushing Data from S7-1200 to CloudPushing Data from S7-1200 to Cloud
Pushing Data from S7-1200 to CloudDMC, Inc.
 
Owin e o Projeto Katana
Owin e o Projeto KatanaOwin e o Projeto Katana
Owin e o Projeto KatanaAndre Carlucci
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPagesCsaba Kiss
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQICS
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Julien Vermillard
 
Presentation Lfoppiano Pycon
Presentation Lfoppiano PyconPresentation Lfoppiano Pycon
Presentation Lfoppiano PyconLuca Foppiano
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For MindstormsAdaCore
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with SystemcMarc Engels
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketMauricio "Maltron" Leal
 

Semelhante a Php push notifications (20)

All aboard the NodeJS Express
All aboard the NodeJS ExpressAll aboard the NodeJS Express
All aboard the NodeJS Express
 
Building an inflight entertainment system controller in twisted
Building an inflight entertainment system controller in twistedBuilding an inflight entertainment system controller in twisted
Building an inflight entertainment system controller in twisted
 
Remote code execution in restricted windows environments
Remote code execution in restricted windows environmentsRemote code execution in restricted windows environments
Remote code execution in restricted windows environments
 
5.node js
5.node js5.node js
5.node js
 
soft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.jssoft-shake.ch - Hands on Node.js
soft-shake.ch - Hands on Node.js
 
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
[OpenStack 하반기 스터디] Interoperability with ML2: LinuxBridge, OVS and SDN
 
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
20151222_Interoperability with ML2: LinuxBridge, OVS and SDN
 
Nodejs and WebSockets
Nodejs and WebSocketsNodejs and WebSockets
Nodejs and WebSockets
 
Pushing Data from S7-1200 to Cloud
Pushing Data from S7-1200 to CloudPushing Data from S7-1200 to Cloud
Pushing Data from S7-1200 to Cloud
 
Owin e o Projeto Katana
Owin e o Projeto KatanaOwin e o Projeto Katana
Owin e o Projeto Katana
 
mqttvsrest_v4.pdf
mqttvsrest_v4.pdfmqttvsrest_v4.pdf
mqttvsrest_v4.pdf
 
Websocket technology for XPages
Websocket technology for XPagesWebsocket technology for XPages
Websocket technology for XPages
 
(C)NodeJS
(C)NodeJS(C)NodeJS
(C)NodeJS
 
Network-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQNetwork-Connected Development with ZeroMQ
Network-Connected Development with ZeroMQ
 
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
Iot Conference Berlin M2M,IoT, device management: one protocol to rule them all?
 
Node js introduction
Node js introductionNode js introduction
Node js introduction
 
Presentation Lfoppiano Pycon
Presentation Lfoppiano PyconPresentation Lfoppiano Pycon
Presentation Lfoppiano Pycon
 
GNAT GPL For Mindstorms
GNAT GPL For MindstormsGNAT GPL For Mindstorms
GNAT GPL For Mindstorms
 
Digital design with Systemc
Digital design with SystemcDigital design with Systemc
Digital design with Systemc
 
Enhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocketEnhancing Mobile User Experience with WebSocket
Enhancing Mobile User Experience with WebSocket
 

Último

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 

Último (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Php push notifications

  • 1. PHP Push Notification System Mohammed S Shurrab CTO, Datrios.com CTO, UnitOne.ps
  • 4. Requirements  Back-end  Mosquitto server (http://mosquitto.org/)  Node.js (http://nodejs.org/)  Socket.io module (npm install socket.io)  Zeparser module (npm install zeparser)  MQTTClient (https://github.com/yilun/node_mqtt_client)  Front-end  Sockit.IO (http://cdnjs.com/libraries/socket.io/)  jQuery (http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js)
  • 5. Client code 1. Connect to the node.js server through soket.io (L:5) 2. Subscribe to some topic(s) (L:10) 3. Listen to any notification for these topics (L:7-9)
  • 6. Node.js code (1/3) 1. include the required modules (L:1-5) 2. Specify the web socket port (L:5) 3. Connect to the MQTT server (L:6)
  • 7. Node.js code (2/3) 1. Listening to a successful socket connection (L:8) 1. Listening to a subscribing request from the client (L:9-13) 1. Filtering the web socket data based on the topics (L:11) 2. Listening to a notify request from the server (L:15-18)
  • 8. Node.js code (3/3) 1. Listening to a new notification from the MQQT server (L:21) 1. Sent these notification through the web socket (L:23-25) 2. Listening to a successful connection with the MQTT server and sent a test notification every 5 seconds (L:29-33)