SlideShare une entreprise Scribd logo
1  sur  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

Contenu connexe

Tendances

Factors affecting the strength of reactive powder concrete rpc
Factors affecting the strength of reactive powder concrete rpcFactors affecting the strength of reactive powder concrete rpc
Factors affecting the strength of reactive powder concrete rpcIAEME Publication
 
MASS CONCRETE
MASS CONCRETEMASS CONCRETE
MASS CONCRETESATISH
 
Concrete in hot weather
Concrete in hot weather  Concrete in hot weather
Concrete in hot weather Ahmedmisurata
 
Steel fibers for reinforced concrete kasturi metal
Steel fibers for reinforced concrete   kasturi metalSteel fibers for reinforced concrete   kasturi metal
Steel fibers for reinforced concrete kasturi metalKasturi Metal
 
Maquinaria pavimentos de hormigón
Maquinaria pavimentos de hormigónMaquinaria pavimentos de hormigón
Maquinaria pavimentos de hormigónconstruccionpesada1
 
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPF
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPFExención por trabajos realizados en el extranjero - Art. 7 p) LIRPF
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPFAGM Abogados
 
308 92 standard practice for curing concrete (reapproved 1
308 92   standard practice for curing concrete (reapproved 1308 92   standard practice for curing concrete (reapproved 1
308 92 standard practice for curing concrete (reapproved 1MOHAMMED SABBAR
 
Estructuras en ambientes marinos
Estructuras en ambientes marinosEstructuras en ambientes marinos
Estructuras en ambientes marinosJenny Ramirez
 
Concrete cube casting and Testing.
Concrete cube casting and Testing.Concrete cube casting and Testing.
Concrete cube casting and Testing.QualityConstruction1
 
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCION
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCIONTecnologia de materiales ACEL EMPRESA DE CONSTRUCCION
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCIONCarlos Valverde
 

Tendances (20)

Factors affecting the strength of reactive powder concrete rpc
Factors affecting the strength of reactive powder concrete rpcFactors affecting the strength of reactive powder concrete rpc
Factors affecting the strength of reactive powder concrete rpc
 
Cement
CementCement
Cement
 
Silica fumes
Silica fumesSilica fumes
Silica fumes
 
Bill Of Quantities
Bill Of QuantitiesBill Of Quantities
Bill Of Quantities
 
Materiales de construcción
Materiales de construcciónMateriales de construcción
Materiales de construcción
 
MASS CONCRETE
MASS CONCRETEMASS CONCRETE
MASS CONCRETE
 
Concrete in hot weather
Concrete in hot weather  Concrete in hot weather
Concrete in hot weather
 
Challenges for Concrete - Karen Scrivener
Challenges for Concrete - Karen ScrivenerChallenges for Concrete - Karen Scrivener
Challenges for Concrete - Karen Scrivener
 
Steel fibers for reinforced concrete kasturi metal
Steel fibers for reinforced concrete   kasturi metalSteel fibers for reinforced concrete   kasturi metal
Steel fibers for reinforced concrete kasturi metal
 
Maquinaria pavimentos de hormigón
Maquinaria pavimentos de hormigónMaquinaria pavimentos de hormigón
Maquinaria pavimentos de hormigón
 
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPF
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPFExención por trabajos realizados en el extranjero - Art. 7 p) LIRPF
Exención por trabajos realizados en el extranjero - Art. 7 p) LIRPF
 
1. GENERALIDADES.pdf
1. GENERALIDADES.pdf1. GENERALIDADES.pdf
1. GENERALIDADES.pdf
 
Silica fume
Silica fumeSilica fume
Silica fume
 
308 92 standard practice for curing concrete (reapproved 1
308 92   standard practice for curing concrete (reapproved 1308 92   standard practice for curing concrete (reapproved 1
308 92 standard practice for curing concrete (reapproved 1
 
Estructuras en ambientes marinos
Estructuras en ambientes marinosEstructuras en ambientes marinos
Estructuras en ambientes marinos
 
Estructuras en concreto i
Estructuras en concreto iEstructuras en concreto i
Estructuras en concreto i
 
Concrete cube casting and Testing.
Concrete cube casting and Testing.Concrete cube casting and Testing.
Concrete cube casting and Testing.
 
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCION
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCIONTecnologia de materiales ACEL EMPRESA DE CONSTRUCCION
Tecnologia de materiales ACEL EMPRESA DE CONSTRUCCION
 
Ppt ggbs
Ppt ggbsPpt ggbs
Ppt ggbs
 
No finess concrete
No finess concreteNo finess concrete
No finess concrete
 

En vedette

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
 

En vedette (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
 

Similaire à 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
 

Similaire à 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
 

Dernier

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
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
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
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
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 

Dernier (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
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)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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...
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 

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)