SlideShare a Scribd company logo
1 of 17
Aug 2020
Donghu Kim
Push Notification with ONS and FCM
2 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Architecture
Mobile DeviceApp Server
Firebase Cloud
Messaging
Oracle
Functions
Oracle
Notifications
3 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Architecture
Mobile DeviceApp Server
Firebase Cloud
Messaging
Oracle
Functions
Oracle
Notifications
4 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Creating and Adding an app to Firebase Cloud Messaging
5 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Architecture
Mobile DeviceApp Server
Firebase Cloud
Messaging
Oracle
Functions
Oracle
Notifications
6 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Building and Deploying a function to OCI
You can refer to the below links.
• https://github.com/MangDan/oracle-functions-graalvm-handson (Korean)
• https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm(Official
Guide)
1. Installing and Setting up the OCI-CLI
• https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm
2. Install Fn Project
• https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsinstallfncli.htm
3. Creating an Fn Project CLI Context
• https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatefncontext.htm
4. Creating a function application
• https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatingapps.htm
5. Creating, Deploying, and Invoking a Function
• https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatingfirst.htm
7 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Function Example (node.js)
Source: https://github.com/mangdan/oci-functions/tree/master/
const fdk=require('@fnproject/fdk');
const admin=require('firebase-admin');
const serviceAccount = require('./path/to/fcn-test-d468e-firebase-adminsdk-91ox1-e86d9984ce.json’); // replace your firebase admin
sdk json file
var app = admin.initializeApp({
credential: admin.credential.cert(serviceAccount),
databaseURL: 'https://fcn-test-d468e.firebaseio.com'
});
const fcm = admin.messaging();
fdk.handle(async function(input){
console.log(input.message.notification);
const payload = {
notification: input.message.notification,
data: input.message.data,
token: input.message.token
};
const response = await fcm.send(payload);
return "successfully sent message:" + response;
})
8 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Architecture
Mobile DeviceApp Server
Firebase Cloud
Messaging
Oracle
Functions
Oracle
Notifications
9 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Creating a Oracle Notification Topic and Subscription
Navigation: OCI Console – Application Integration > Notifications
1. Create Topic 2. Create Subscription
Protocol: fucntions
Function Application: push-notification-for-ons-app
Function: push-notification-for-ons-func
10 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Publish a Message using console UI
Navigation: OCI Console – Application Integration > Notifications > Select topic > publish message
Publish Message Message Format
{
"message": {
"notification": {
"title": "TitleTest",
"body": "Sample message for Android endpoints"
},
"data": {
"picture": "https://i.imgur.com/bY2bBGN.jpg",
"link": "https://example.com"
},
"token":
"dENbszoqxqI:APA91bGfazCIFLCqMBI9Tsb5f9oGkvkeykz70NULzI-
OTaFBqhzwTPt2SPS2tDfm-
V2O9lJsfYk5gKYppqJksFl5CqOtubeIwpJ4_zSwPzm15erTkfM6iQsIycrYfgt
sWDNPzF3y-nbv"
}
}
11 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Architecture
Mobile DeviceApp Server
Firebase Cloud
Messaging
Oracle
Functions
Oracle
Notifications
12 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Sample Node.js Server Application to publish a message to topic
async function pushMessage(message) {
// logger.log('info', `runShippingExtractionJob for ${JSON.stringify(input)} for file ${objectName}`)
auth.RESTversion = '/20181201';
parameters.method = 'POST';
parameters.topicId = 'ocid1.onstopic.oc1.ap-seoul-1.aaaaaaaajapefqh6ujbz7v4d2hkpjal7lfwfad7mnpr6eznkvrumjrgtjswa'; // Please replace your topic ocid
parameters.path = 'messages';
parameters.body = message;
notifications.topic.publish(auth, parameters, callback);
return;
}// pushMessage
var message = {
"message": {
"notification": {
"title": "TitleTest",
"body": "Sample message for Android endpoints"
},
"data": {
"picture": "https://i.imgur.com/bY2bBGN.jpg",
"link": "https://example.com"
},
"token": "dENbszoqxqI:APA91bGfazCIFLCqMBI9Tsb5f9oGkvkeykz70NULzI-OTaFBqhzwTPt2SPS2tDfm-
V2O9lJsfYk5gKYppqJksFl5CqOtubeIwpJ4_zSwPzm15erTkfM6iQsIycrYfgtsWDNPzF3y-nbv”. // please replace your application token
}
};
// call
pushMessage({ title: "Push notification test", body: JSON.stringify(message)})
publishMessage.js
Source:
https://github.com/MangDan/oci-api/tree/master/javascript
https://github.com/MangDan/oci-api/blob/master/javascript/services/notifications/examples/publishMessage
13 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Test Sample Node.js Server Application
1. Download Sample Source
• git clone https://github.com/MangDan/oci-api.git
2. Run node.js
• cd ./oci-api/api/javascript/services/notifications/examples
• node publishMessage.js
3. Monitoring a topic and functions
• OCI Console > Application Integration > Notification > Select a Topic from list > Metrics
• OCI Console > Developer Services > Functions > Select a function application > Metrics
14 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Demo
1. Run a node.js
2. Notification Metrics 3. Functions Metrics
15 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
Demo
4. Firebase Cloud Messaging Report 5. Notification Message on your device
16 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted
References
https://github.com/MangDan/oci-api/tree/master/javascript/services/notifications/examples (Server
Application example to publish a message to a topic)
https://github.com/MangDan/oci-functions/tree/master/push-notification-for-ons (Functions example to send
a message to FCM)
https://github.com/MangDan/oracle-functions-graalvm-handson (Functions Hands-On Guide, Korean)
https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm (Functions
Official Guide, English)
https://docs.cloud.oracle.com/en-us/iaas/api/#/en/notification/20181201/NotificationTopic/PublishMessage
(Notification PublishMessage REST API)
Push notification with ons and fcm

More Related Content

What's hot

Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Vietnam Open Infrastructure User Group
 
Heat - keep the clouds up
Heat - keep the clouds upHeat - keep the clouds up
Heat - keep the clouds upKiran Murari
 
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...Vietnam Open Infrastructure User Group
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterBalasubramanian Kandasamy
 
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s ClustersDeploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s ClustersSyah Dwi Prihatmoko
 
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...Vietnam Open Infrastructure User Group
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1Kalkey
 
Terraform day 3
Terraform day 3Terraform day 3
Terraform day 3Kalkey
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudConor Svensson
 
My early experience with Mirantis OpenStack 6.0
My early experience with Mirantis OpenStack 6.0My early experience with Mirantis OpenStack 6.0
My early experience with Mirantis OpenStack 6.0Guy Tel-Zur
 
Guide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationGuide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationRob Linton
 
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...Altoros
 
An Introduction into Bosh | anynines
An Introduction into Bosh | anynines An Introduction into Bosh | anynines
An Introduction into Bosh | anynines anynines GmbH
 
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...Vietnam Open Infrastructure User Group
 
Introduction of tomcat
Introduction of tomcatIntroduction of tomcat
Introduction of tomcatKalkey
 
10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should KnowAngel Borroy López
 

What's hot (20)

Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
Meetup 23 - 01 - The things I wish I would have known before doing OpenStack ...
 
Heat - keep the clouds up
Heat - keep the clouds upHeat - keep the clouds up
Heat - keep the clouds up
 
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...
OpenStack QA Tooling & How to use it for Production Cloud Testing | Ghanshyam...
 
Docker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB ClusterDocker Compose Setup for MySQL InnoDB Cluster
Docker Compose Setup for MySQL InnoDB Cluster
 
Cooling Tower
Cooling TowerCooling Tower
Cooling Tower
 
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s ClustersDeploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
Deploy Prometheus - Grafana and EFK stack on Kubic k8s Clusters
 
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
Packaging Strategy for Community Openstack and Implementation Reference | Hoj...
 
Terraform day 1
Terraform day 1Terraform day 1
Terraform day 1
 
Terraform day 3
Terraform day 3Terraform day 3
Terraform day 3
 
Cloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring CloudCloud Native Microservices with Spring Cloud
Cloud Native Microservices with Spring Cloud
 
OpenStack Heat
OpenStack HeatOpenStack Heat
OpenStack Heat
 
My early experience with Mirantis OpenStack 6.0
My early experience with Mirantis OpenStack 6.0My early experience with Mirantis OpenStack 6.0
My early experience with Mirantis OpenStack 6.0
 
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony LinAnsible Automation - Enterprise Use Cases | Juncheng Anthony Lin
Ansible Automation - Enterprise Use Cases | Juncheng Anthony Lin
 
Guide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormationGuide - Migrating from Heroku to AWS using CloudFormation
Guide - Migrating from Heroku to AWS using CloudFormation
 
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...
Taking Cloud to Extremes: Scaled-down, Highly Available, and Mission-critical...
 
An Introduction into Bosh | anynines
An Introduction into Bosh | anynines An Introduction into Bosh | anynines
An Introduction into Bosh | anynines
 
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...
Unrevealed Story Behind Viettel Network Cloud Hotpot | Đặng Văn Đại, Hà Mạnh ...
 
Introduction of tomcat
Introduction of tomcatIntroduction of tomcat
Introduction of tomcat
 
Upgrading to Alfresco 6
Upgrading to Alfresco 6Upgrading to Alfresco 6
Upgrading to Alfresco 6
 
10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know10 Tips Every New Developer in Alfresco Should Know
10 Tips Every New Developer in Alfresco Should Know
 

Similar to Push notification with ons and fcm

Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudRamnivas Laddad
 
Implementing API Facade using WSO2 API Management Platform
Implementing API Facade using WSO2 API Management PlatformImplementing API Facade using WSO2 API Management Platform
Implementing API Facade using WSO2 API Management PlatformWSO2
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementJoel W. King
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminarcontest-theta360
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSAOracle Korea
 
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...VMware Tanzu
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfAmazon Web Services
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316Jupil Hwang
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009Roland Tritsch
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfAmazon Web Services
 
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseSDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseVMware Tanzu
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootVMware Tanzu
 
How to deploy machine learning models into production
How to deploy machine learning models into productionHow to deploy machine learning models into production
How to deploy machine learning models into productionDataWorks Summit
 
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...Dave Delay
 
CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps2005
 
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Amazon Web Services
 
Policy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentPolicy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentVMware Tanzu
 
Oracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenOracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenluisw19
 
10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기DongHee Lee
 

Similar to Push notification with ons and fcm (20)

Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Implementing API Facade using WSO2 API Management Platform
Implementing API Facade using WSO2 API Management PlatformImplementing API Facade using WSO2 API Management Platform
Implementing API Facade using WSO2 API Management Platform
 
Integrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud managementIntegrating Ansible Tower with security orchestration and cloud management
Integrating Ansible Tower with security orchestration and cloud management
 
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 RICOH THETA x IoT Developers Contest : Cloud API Seminar RICOH THETA x IoT Developers Contest : Cloud API Seminar
RICOH THETA x IoT Developers Contest : Cloud API Seminar
 
SpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSASpringBoot and Spring Cloud Service for MSA
SpringBoot and Spring Cloud Service for MSA
 
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
Simple Data Movement Patterns: Legacy Application to Cloud-Native Environment...
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
Microservices with kubernetes @190316
Microservices with kubernetes @190316Microservices with kubernetes @190316
Microservices with kubernetes @190316
 
RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009RESTful Services and Distributed OSGi - 04/2009
RESTful Services and Distributed OSGi - 04/2009
 
Breaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdfBreaking the Monolith road to containers.pdf
Breaking the Monolith road to containers.pdf
 
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and ConcourseSDLC for Pivotal Platform powered by Spring Initializr and Concourse
SDLC for Pivotal Platform powered by Spring Initializr and Concourse
 
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring BootSpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
SpringOne Tour: Deliver 15-Factor Applications on Kubernetes with Spring Boot
 
How to deploy machine learning models into production
How to deploy machine learning models into productionHow to deploy machine learning models into production
How to deploy machine learning models into production
 
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
IBM Connect 2014 - AD205: Creating State-of-the-Art Web Applications with Dom...
 
CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015CloudOps CloudStack Days, Austin April 2015
CloudOps CloudStack Days, Austin April 2015
 
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
Mythical Mysfits: Monolith to Microservices with Docker and Fargate - MAD305 ...
 
DevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDKDevCon5 (July 2014) - Acision SDK
DevCon5 (July 2014) - Acision SDK
 
Policy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy AgentPolicy Enforcement on Kubernetes with Open Policy Agent
Policy Enforcement on Kubernetes with Open Policy Agent
 
Oracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heavenOracle Code Capgemini: API management & microservices a match made in heaven
Oracle Code Capgemini: API management & microservices a match made in heaven
 
10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기10thMeetup-20190420-REST API Design Principles 되새기기
10thMeetup-20190420-REST API Design Principles 되새기기
 

Recently uploaded

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
 
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
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
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
 
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
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
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
 
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
 

Recently uploaded (20)

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
 
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
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
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
 
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...
 
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
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
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
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
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
 
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
 
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 🔝✔️✔️
 

Push notification with ons and fcm

  • 1. Aug 2020 Donghu Kim Push Notification with ONS and FCM
  • 2. 2 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Architecture Mobile DeviceApp Server Firebase Cloud Messaging Oracle Functions Oracle Notifications
  • 3. 3 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Architecture Mobile DeviceApp Server Firebase Cloud Messaging Oracle Functions Oracle Notifications
  • 4. 4 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Creating and Adding an app to Firebase Cloud Messaging
  • 5. 5 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Architecture Mobile DeviceApp Server Firebase Cloud Messaging Oracle Functions Oracle Notifications
  • 6. 6 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Building and Deploying a function to OCI You can refer to the below links. • https://github.com/MangDan/oracle-functions-graalvm-handson (Korean) • https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm(Official Guide) 1. Installing and Setting up the OCI-CLI • https://docs.cloud.oracle.com/en-us/iaas/Content/API/SDKDocs/cliinstall.htm 2. Install Fn Project • https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionsinstallfncli.htm 3. Creating an Fn Project CLI Context • https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatefncontext.htm 4. Creating a function application • https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatingapps.htm 5. Creating, Deploying, and Invoking a Function • https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Tasks/functionscreatingfirst.htm
  • 7. 7 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Function Example (node.js) Source: https://github.com/mangdan/oci-functions/tree/master/ const fdk=require('@fnproject/fdk'); const admin=require('firebase-admin'); const serviceAccount = require('./path/to/fcn-test-d468e-firebase-adminsdk-91ox1-e86d9984ce.json’); // replace your firebase admin sdk json file var app = admin.initializeApp({ credential: admin.credential.cert(serviceAccount), databaseURL: 'https://fcn-test-d468e.firebaseio.com' }); const fcm = admin.messaging(); fdk.handle(async function(input){ console.log(input.message.notification); const payload = { notification: input.message.notification, data: input.message.data, token: input.message.token }; const response = await fcm.send(payload); return "successfully sent message:" + response; })
  • 8. 8 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Architecture Mobile DeviceApp Server Firebase Cloud Messaging Oracle Functions Oracle Notifications
  • 9. 9 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Creating a Oracle Notification Topic and Subscription Navigation: OCI Console – Application Integration > Notifications 1. Create Topic 2. Create Subscription Protocol: fucntions Function Application: push-notification-for-ons-app Function: push-notification-for-ons-func
  • 10. 10 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Publish a Message using console UI Navigation: OCI Console – Application Integration > Notifications > Select topic > publish message Publish Message Message Format { "message": { "notification": { "title": "TitleTest", "body": "Sample message for Android endpoints" }, "data": { "picture": "https://i.imgur.com/bY2bBGN.jpg", "link": "https://example.com" }, "token": "dENbszoqxqI:APA91bGfazCIFLCqMBI9Tsb5f9oGkvkeykz70NULzI- OTaFBqhzwTPt2SPS2tDfm- V2O9lJsfYk5gKYppqJksFl5CqOtubeIwpJ4_zSwPzm15erTkfM6iQsIycrYfgt sWDNPzF3y-nbv" } }
  • 11. 11 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Architecture Mobile DeviceApp Server Firebase Cloud Messaging Oracle Functions Oracle Notifications
  • 12. 12 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Sample Node.js Server Application to publish a message to topic async function pushMessage(message) { // logger.log('info', `runShippingExtractionJob for ${JSON.stringify(input)} for file ${objectName}`) auth.RESTversion = '/20181201'; parameters.method = 'POST'; parameters.topicId = 'ocid1.onstopic.oc1.ap-seoul-1.aaaaaaaajapefqh6ujbz7v4d2hkpjal7lfwfad7mnpr6eznkvrumjrgtjswa'; // Please replace your topic ocid parameters.path = 'messages'; parameters.body = message; notifications.topic.publish(auth, parameters, callback); return; }// pushMessage var message = { "message": { "notification": { "title": "TitleTest", "body": "Sample message for Android endpoints" }, "data": { "picture": "https://i.imgur.com/bY2bBGN.jpg", "link": "https://example.com" }, "token": "dENbszoqxqI:APA91bGfazCIFLCqMBI9Tsb5f9oGkvkeykz70NULzI-OTaFBqhzwTPt2SPS2tDfm- V2O9lJsfYk5gKYppqJksFl5CqOtubeIwpJ4_zSwPzm15erTkfM6iQsIycrYfgtsWDNPzF3y-nbv”. // please replace your application token } }; // call pushMessage({ title: "Push notification test", body: JSON.stringify(message)}) publishMessage.js Source: https://github.com/MangDan/oci-api/tree/master/javascript https://github.com/MangDan/oci-api/blob/master/javascript/services/notifications/examples/publishMessage
  • 13. 13 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Test Sample Node.js Server Application 1. Download Sample Source • git clone https://github.com/MangDan/oci-api.git 2. Run node.js • cd ./oci-api/api/javascript/services/notifications/examples • node publishMessage.js 3. Monitoring a topic and functions • OCI Console > Application Integration > Notification > Select a Topic from list > Metrics • OCI Console > Developer Services > Functions > Select a function application > Metrics
  • 14. 14 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Demo 1. Run a node.js 2. Notification Metrics 3. Functions Metrics
  • 15. 15 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted Demo 4. Firebase Cloud Messaging Report 5. Notification Message on your device
  • 16. 16 Confidential – © 2019 Oracle Internal/Restricted/Highly Restricted References https://github.com/MangDan/oci-api/tree/master/javascript/services/notifications/examples (Server Application example to publish a message to a topic) https://github.com/MangDan/oci-functions/tree/master/push-notification-for-ons (Functions example to send a message to FCM) https://github.com/MangDan/oracle-functions-graalvm-handson (Functions Hands-On Guide, Korean) https://docs.cloud.oracle.com/en-us/iaas/Content/Functions/Concepts/functionsoverview.htm (Functions Official Guide, English) https://docs.cloud.oracle.com/en-us/iaas/api/#/en/notification/20181201/NotificationTopic/PublishMessage (Notification PublishMessage REST API)