end-to-end cloud: oracle java cloud, oracle mobile cloud service, oracle maf, and oracle jet

65
1 End-to-End Cloud: JCS, MCS, MAF and JET Andrejus Baranovskis, Oracle ACE Director, Red Samurai Consulting

Upload: andrejusb

Post on 14-Jan-2017

3.595 views

Category:

Internet


7 download

TRANSCRIPT

Page 1: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

1

End-to-End Cloud: JCS, MCS, MAF and JET

Andrejus Baranovskis, Oracle ACE Director, Red Samurai Consulting

Page 2: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

2About UsOracle Experts Team

• Oracle Fusion Middleware Partner Community Award for Outstanding ACM/BPM Contribution 2015 • Oracle Fusion Middleware Innovation Award Winner 2010 • SOA Partner Community Award for Outstanding Contribution Across the World 2010 • 2010 Enterprise 2.0 Blazer: Enterprise 2.0 Leader Award

ADF, JET, MAF, Cloud, BPM, ACM, SOA, WebCenter, WebLogic

Page 3: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

3

Demo Demo Demo

Application Container Cloud QuestionsUse Case Overview

Mobile ApplicationFramework

ADF BC REST andJava Cloud Service

Agenda

Mobile Cloud Service

JavaScript Extension Toolkit

Page 4: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

4

USE CASE OVERVIEWOracle Cloud Services for Warehouse.

Page 5: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

5ChB Jelly HouseStartup Candy Company

Supply manager is responsible to request warehouse stock update. Gets notification when stock goes below minimum threshold

Stock Supply

Production manager is responsible to log warehouse stock usage.

Production

Producing and selling natural jelly candies. Production process requires warehouse stock shortage tracking. Based in Lithuania, EU.

About

Page 6: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

6Application FlowWarehouse Process

Use Stock 01

Threshold 02

Notification 03

Order Stock 04

Production takes stock. JET

application calls MCS REST service to log

stock usage.

JET/MAF & MCS/ACC

Stock is below threshold. MCS

checks condition and sends

notification.

MCS

MCS sends notification.

Manager receives notification, data is

synchronized.

JET/MAF & MCS

Order stock by calling MCS REST

service. Third party invoice data is

updated through ADF BC REST on JCS

JET/MAF & MCS/JCS/ACC

Page 7: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

7Technology UsedOracle Cloud and Development Tools

01JCS

02MCS

03ACC

Handling REST services for mobile interface. API Node.js implementation. MCS DB.

Mobile

Running JET Web app, OAuth security, reuse of MCS REST services.

Web app

Integrating with third party HR DB and invoice data.

ADF BC REST

Accessing MCS REST services through mobile.

Deployed to device. Same code as JET.

Mobile access05JET Hybrid

Alternative mobile access, depends on company

skillset.

Mobile access06MAF

Accessing MCS REST services through Web.

Web access04JET

Page 8: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

8Cloud Services Interaction FlowUse Case Explanation

DbaaS JCS

ADF

BC

REST

REST

CONNECTOR

MCSREST

ENDPOINTSECURITY

Token Security

API Node.js

DB Connector Notifications

Storage Location

Google/Apple

OAuth

OAuth

JET

JET Hybrid or MAF

Page 9: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

9JET InterfaceRunning on ACC (Application Container Cloud)

User responsible for candy production logs stock usage. JET application.

CANDY PRODUCTION

Page 10: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

10JET Hybrid InterfaceApplication running on mobile device

Secured by OAuth and MCS Backend. Can be secured by custom secure token.

Security

Consumes MCS REST services and subscribes to notifications raised by MCS custom API.

REST Services and Notifications

JET Hybrid is JET application wrapped into Cordova and deployed to mobile device.

Cordova

User responsible for candy stock supply updates stock numbers.

CANDY STOCK SUPPLY

Page 11: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

11

USE CASE DEMOOracle Cloud Services for Warehouse.

Page 12: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

12

ADF BC REST & JCS Backend Data Management and Java Cloud Service.

Page 13: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

13DbaaS ConfigurationDatabase Cloud

Accessible by public IP. Provides DB admin tools.DB CLOUD MACHINE ACCESS

Provides automatic backup. DB backup option is required for WebLogic 12.2.1 Cloud instance configuration.

BACKUP

Page 14: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

14DbaaS BackupCloud Storage Container – REST API

curl -i -X GET -H "X-Storage-User: Storage-redsamurai:[email protected]" -H "X-Storage-Pass: *Password*" https://redsamurai.storage.oraclecloud.com/auth/v1.0

HTTP/1.1 200 OKdate: 1472150723577X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1X-Storage-Token: AUTH_tkf83371940961d6a9b1776819e71440d1X-Storage-Url: https://em2.storage.oraclecloud.com/v1/Storage-redsamurai

1. AUTHENTICATION TOKEN

curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371940961d6a9b1776819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSDBContainer

curl -i -X PUT -H "X-Auth-Token: AUTH_tkf83371360961d6a9b17f9819e71440d1" https://em2.storage.oraclecloud.com/v1/Storage-redsamurai/RSJCSContainer

2. CREATE STORAGE CONTAINER

Page 15: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

15JCS ConfigurationJava Cloud

Can be created in Enterprise Manager Fusion Middleware Control 12c

JDBC DATA SOURCE

Accessible by public IPPUBLIC IP

Use cloud storage container to configure WLS backup.

BACKUP

Page 16: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

16ADF BC RESTDevelopment

Page 17: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

17ADF BC RESTADF Security – token authentication & authorization

Page 18: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

18ADF BC RESTDeployment on JCS

Frank Nimphius, Oracle PM – “Keep in mind that businesses don't start from scratch when a new technology or a new trend arrives. ADF BC REST is (in my opinion) the easiest and most effective option for creating powerful and flexible REST services based on SQL queries” http://bit.ly/2cf5lAP

ADF 12.2.1 BC REST

Page 19: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

19

MOBILE CLOUD SERVICE Mobile Data.

Page 20: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

20Mobile Cloud ServiceOverview

Page 21: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

21ConnectorsADF BC REST Configuration

Page 22: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

22ConnectorsRules and Security Tokens

Page 23: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

23ConnectorsNode.js and custom API

Page 24: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

24ConnectorsSimplifies REST Calls for Mobile Clients

Page 25: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

25Custom APIMobile Logic

Page 26: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

26Custom APIREST Endpoints

Page 27: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

27Custom APIREST Endpoints

Page 28: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

28Custom APISecurity

Page 29: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

29Custom APISecurity

Page 30: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

30Custom APIImplementation with Node.js

Page 31: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

31Custom APIImplementation with Node.js

Page 32: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

32Custom APIMCS DB API

INSERT GET MERGE

Page 33: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

33Custom APIMCS Connector API

Page 34: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

34Custom APIMCS Notification API

Page 35: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

35Mobile BackendDiagnostics

Page 36: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

36Mobile BackendLog from Custom API – Useful for Debugging

Page 37: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

37Mobile BackendCross-origin Resource Sharing (CORS) Configuration

Page 38: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

38

JET JavaScript Extension Toolkit.

Page 39: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

39JETFocus Areas

02

01

03

04

MCS OAuthInstructions to use MCS OAuth in JET.

MCS RESTInstructions to consume MCS REST services in JET.

MCS NotificationsInstructions to register and receive MCS notifications in JET.

JET and JET HybridImplementation principles. JavaScript and HTML is reused in JET and JET Hybrid.

Page 40: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

40Create JET Hybrid ApplicationMobile Application As Easy As 1, 2, 3

npm -g install cordova This should be done first time only. npm is the default package manager for the JavaScript runtime environment Node.js

INSTALL CORDOVA

yo oraclejet:hybrid redsamuraiwarehouse --appId=com.warehouse --appName="redsamuraiwarehouse" --template=navbar --platforms=android Yeoman runs as a command-line interface written for Node.js and which combines generating a starter template, managing dependencies

CREATE JET HYBRID APPLICATION

grunt build --platform=android Grunt is a JavaScript task runner BUILD

grunt serve --platform=android --browser --disableLiveReload=trueRUN IN BROWSER

grunt serve --platform=android --destination=deviceRUN ON DEVICE AS APPLICATION

Page 41: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

41JET Hybrid ApplicationApplication Structure

Page 42: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

42JET ImplementationIndex Page – Dynamic Blocks

Page 43: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

43JET ImplementationApplication Controller – Defines Router and Modules

Page 44: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

44JET ImplementationChart – HTML and JS

Page 45: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

45JET ImplementationGauge – HTML and JS

Page 46: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

46JET SecurityMobile Cloud Service OAuth Integration – Download MCS SDK

Page 47: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

47JET SecurityMobile Cloud Service OAuth Integration – Backend Wrapper and Keys

Page 48: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

48JET SecurityMobile Cloud Service OAuth Integration – Login

Page 49: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

49JET SecurityMobile Cloud Service OAuth Integration – Login

Page 50: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

50JET SecurityMobile Cloud Service OAuth Integration – Network Monitor

Page 51: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

51JET REST CallSecure Mobile Cloud Service REST GET Invocation

Page 52: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

52JET REST CallSecure Mobile Cloud Service REST PATCH Invocation

Page 53: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

53JET REST CallSecure Mobile Cloud Service REST Invocation – Network Monitor

Page 54: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

54JET and NotificationsMobile Cloud Service Notifications – Register Push Clients

Page 55: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

55JET and NotificationsMobile Cloud Service Notifications – MCS UI

Page 56: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

56JET and NotificationsRegister Device for MCS Push

ADD CORDOVA PUSH PLUGIN

cordova plugin add phonegap-plugin-push --variable SENDER_ID="455522940425"

Page 57: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

57

Application Container CloudJET in the Cloud.

Page 58: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

58Application Container CloudCreate and Package JET Application

Run express YourAppName, Node.js must be installed

GENERATE EMPTY NODE.JS APPLICATION

Navigate to YourAppName folder and run npm install to add dependencies

ADD DEPENDENCIES

Copy JET implementation code into YourAppName public folder

JET IMPLEMENTATION

Add manifest.json file and create zip archiveJET PACKAGING

Page 59: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

59Application Container CloudDeploy JET Application

Page 60: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

60Application Container CloudDeploy JET Application

Page 61: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

61

MAF Mobile Application Framework.

Page 62: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

62MAF and MCS IntegrationMAF MCS Utility Application

Execute REST calls from MAF and pass security headers

SIMILAR INTEGRATION PRINCIPLES AS FOR JET HYBRID

More complex application testing and debugging process comparing to JET HybridREQUIRES MOBILE SIMULATOR TO TEST CODE

Example is available for download from OTNMAF MCS UTILITY IS AVAILABLE WITH MCS INTEGRATION EXAMPLE

When there are no JavaScript developers in the teamWHEN TO USE MAF

Page 63: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

63

QUESTIONSLearn More.

Page 64: End-to-End Cloud: Oracle Java Cloud, Oracle Mobile Cloud Service, Oracle MAF, and Oracle JET

64

Sample code for JET Hybrid and OAuth

authentication against MCS.

OAuthExample of JET on

Application Container Cloud.

ACCSample code for JET

calling MCS REST service.

MCS RESTSample code for MCS Connector calling ADF

BC REST service.

MCS ConnectorSample code for JET Hybrid to register for

MCS notification.

Notifications