2024: Domino Containers - The Next Step. News from the Domino Container commu...
Bluemix Paris Meetup - Optimization on Cloud (DOcloud) - 14 octobre 2015
1. Organisé par IBM France Lab
Optimization on Cloud
with Bluemix
14 octobre 2015
Organisateur : Yves Le Cléach, @ylecleach
Meetup #11
Hébergé par La Pépinière 27, startup incubator
1
2. #bluemix
Introduction à l’optimisation des applications – Domaines
d’application
par Amélie Hocquette, IBM Decision Optimization on Cloud and Center - Program
Manager, IBM France Lab
Design Thinking, concevoir une solution sur le Cloud
par Sophie de Bonis, UX Designer pour Decision Optimization on cloud, IBM
France Lab
Ecosystème social pour la communauté des développeurs
utilisateurs de Docloud
Par Catherine Chat, Chef de projet DOcloud Communauté & API, Technical Team
Leader, IBM France Lab
Présentation d'un service d'optimisation pour Bluemix
parJulian Payne, STSM - Solutions Architect and Chief Architect, Optimization
Offerings
2
Agenda
3. Pour créer un compte Bluemix,
c’est simple et gratuit 30 jours sans CB!
1. Entrer cette URL : http://ibm.biz/Meetup_Paris
2. Compléter les informations (email, password)
3. Valider votre compte (consulter votre boîte mail)
4. Se Connecter sur bluemix.net (email+password)
3
4. #bluemix
Articles, Slides, Formation, et des Resources
Site WordPress déployé dans Bluemix !
http://meetup-paris.mybluemix.net/
Site Web du Bluemix Paris Meetup
5. #bluemix
Introduction à l’optimisation des applications – Domaines
d’application
par Amélie Hocquette, IBM Decision Optimization on Cloud and Center - Program
Manager, IBM France Lab
Design Thinking, concevoir une solution sur le Cloud
par Sophie de Bonis, UX Designer pour Decision Optimization on cloud, IBM
France Lab
Ecosystème social pour la communauté des développeurs
utilisateurs de Docloud
Par Catherine Chat, Chef de projet DOcloud Communauté & API, Technical Team
Leader, IBM France Lab
Présentation d'un service d'optimisation pour Bluemix
parJulian Payne, STSM - Solutions Architect and Chief Architect, Optimization
Offerings
5
Agenda
7. Let’s play a game!
Build the most expensive but healthy and tasty burger !
• At least one, and no more than 5 items
• Use only whole ingredients (no half cheese!)
• Must contains :
o Less then 3000 mg of sodium
o Less than 150 grams of fat
o Less than 3000 calories
• Keep :
o Lettuce and ketchup the same
o Pickles and tomatoes the same
8. Solving a Business Problem via Modeling & Optimization
Business Problem
Mathematical Model
Solving Engine
Supply Chain Optimisation Programme
RASA Benefit Realisation Weekly Summary
-35
-25
-15
-5
5
15
25
35
2008Jan*
Feb*
Mar*
Apr*
w19
w20
w21
w22
w23
w24
w25
w26
w27
w28
w29
w30
w31
w32
w33
w34
w35
w36
w37
w38
w39
w40
w41
w42
w43
w44
w45
w46
w47
w48
w49
w50
w51
w52
ContributionRelativetoApr08QS61Baseline(£k)
Realised Benefit Missed Opportunity Actual ≠ QS61 or Optimal
Business Results
min cTx
s.t. Ax b
x integer
x1 = 3, x2 = 0, ...
Solution to
Mathematical Model
OR Specialist
Business
Expert
Evaluation
What are the key decisions?
What are the constraints?
What are the goals?
Modeling
is not data
driven
Linear programming
Mixed Integer Programming
Constraint programming
9. Making Essential Decisions Better & Faster
How to best allocateaircrafts and crews?
Inventory cost vs.customer
satisfaction?
Risk vs.potential reward?
Cost vs.carbon emission?
What to build,whereand when?
IBM Decision Optimization helps businesses
• Solve combinatorial problems that cannot
be solved efficiently otherwise.
• Create the best possible plans.
• Explore alternatives and understand
trade-off.
• Respond to changes in business operations.
• Get very high ROI.
11. Platform (DOC)
Optimization
Application Development Tools
Data
Server
Optim.
Server
CPLEX Concert API
Optimization Engines
Technologies (COS)
OPL
CPLEX
Optim.
CP
Optim.
Decision Optimization
on Cloud
What?
• Solve on cloud
• New : Self-
serve
• New : PAYG
How?
• Bluemix +
Softlayer
• Smart Cloud
Exchange
• DevOps
• 80%
homemade
Decision Optimization Portfolio
Future contribution to revenue.
12. #bluemix
Introduction à l’optimisation des applications – Domaines
d’application
par Amélie Hocquette, IBM Decision Optimization on Cloud and Center - Program
Manager, IBM France Lab
Design Thinking, concevoir une solution sur le Cloud
par Sophie de Bonis, UX Designer pour Decision Optimization on cloud, IBM
France Lab
Ecosystème social pour la communauté des développeurs
utilisateurs de Docloud
Par Catherine Chat, Chef de projet DOcloud Communauté & API, Technical Team
Leader, IBM France Lab
Présentation d'un service d'optimisation pour Bluemix
parJulian Payne, STSM - Solutions Architect and Chief Architect, Optimization
Offerings
1
Agenda
13. IBM Design Thinking
for Decision Optimization on Cloud
by Sophie de Bonis, UX Designer, IBM France Lab
15. “Good design is good business.”
Thomas Watson, IBM Chief Executive Officer, 1973
16. IBM Design Thinking is a framework
for delivering great experiences for our users.
Codified by IDEO
cofounders David
Kelley and Bill
Moggridge
Offers a new way to
think about problems
and their solutions
Grounded in empathy,
prototyping and radical
collaboration
The Stanford d.school is
the intellectual home of
design thinking
17. “Designers […] don’t have to search for a solution until
they have determined the real problem, and even then,
instead of solving that problem, they stop to consider
a wide range of potential solutions.
Only then will they finally converge upon their proposal.
This process is called “Design Thinking”.
Don Norman
“Rethinking Design Thinking” Core 77, 19 March 2013
18. “Designers […] don’t have to search for a solution until
they have determined the real problem, and even then,
instead of solving that problem, they stop to consider
a wide range of potential solutions.
Only then will they finally converge upon their proposal.
This process is called “Design Thinking”.
Don Norman
“Rethinking Design Thinking” Core 77, 19 March 2013
19. “Designers […] don’t have to search for a solution until
they have determined the real problem, and even then,
instead of solving that problem, they stop to consider
a wide range of potential solutions.
Only then will they finally converge upon their proposal.
This process is called “Design Thinking”.
Don Norman
“Rethinking Design Thinking” Core 77, 19 March 2013
20. During 3 days, Decision optimization Design camp
enabled the cross functional product team envision the
user experience and define 3 hills
Experience map
Empathy map
Hills definitionMockups
21. • Oscar works in the Operations Research
department
• Oscar develops OPL model that improves
delivery times, while reducing costs and
emissions
• Denise works in the IT department.
• She needs to integrate Oscar’s model
in an application using DOcloud
services
• She needs to develop a quick
prototype and then move the solution
to the Cloud
Oscar
Operations Research Expert
Denise
Application Developer
Decision Optimization on cloud Personas
22. In one day Denise can extend her application to
invoke a solve service using an existing model,
in her chosen programming language, without
installing optim sw.
Hill
23. Playback with mockups help to share the vision with the all
team members and deliver the experience not just the
design
24. Creating epics (1 per hill) then stories and tasks…, using
personas systematically and including stories for the UI design.
Design ahead coding with UX designer discussing mockup with the
dev UI on feasibility and design choices.
Holding sprint reviews every 2 weeks with playback.
Design and development flow for DOcloud
25. 25
The experience-based approach aims to make each stage an offering that is
testable and has significant impact in the market, not just a bundle of
features.
On cloud first impression is particularly important.
Each delivery must be a complete experience
26. Sponsor users involvement during the
development is a key point in the design
thinking
Home page
Explore
Doc/Java/Java
API example
Java library IDE Java example
API key &
base URL
Get Started(Register)
Docloud
Onboarding
Get started
Get API kay &
base URL
IDE
Get Started Java example
Get API key &
base URL
IDE
Sample project
/ trucking
sample
IDE
Home page Get Started
OPL model
input and
output
API key &
base URL
Java Client
API
Java example
REST API
/REST
example
Create the job
Curl
commands
Create the jobGet resultsJob Status
REST API
References
doc
Dev center
homepage
Try it for Free (Register) DropSOlve
(Get API key
& base url)
Dev center
homepage
(Account 404)
Dev Center
homepage
Sample
project
IDE
User testing with the “thinking aloud” method is
a nice way to highlight usability issue and provide relevant
feedback for a cloud solution
How users get started with
DOcloud API ?
User1 User2
27. Design is never done
and the good news is that the cloud allows
continuous delivery
28. The cloud, a specific way to address the user
On cloud, users need ways to
contact the service,
Discuss questions,
be informed,
evaluate the service, …
It’s an important part of the
experience.
29. IBM Design Thinking approach
explained in 6 mn
https://www.youtube.com/watch?v=pXtN4y3O35M
Want to learn more?
The IBM Design web site
http://www.ibm.com/design/
Including the IBM design Language !
Credits / slide 2 : Photo Gilles d’Andrea / slide 12 : Illustrations inspired from Ariadna Font Llitjos
30. #bluemix
Introduction à l’optimisation des applications – Domaines
d’application
par Amélie Hocquette, IBM Decision Optimization on Cloud and Center - Program
Manager, IBM France Lab
Design Thinking, concevoir une solution sur le Cloud
par Sophie de Bonis, UX Designer pour Decision Optimization on cloud, IBM
France Lab
Ecosystème social pour la communauté des développeurs
utilisateurs de Docloud
Par Catherine Chat, Chef de projet DOcloud Communauté & API, Technical Team
Leader, IBM France Lab
Présentation d'un service d'optimisation pour Bluemix
parJulian Payne, STSM - Solutions Architect and Chief Architect, Optimization
Offerings
3
Agenda
32. Denise
Application Developer
In one day Denise can extend her application
to invoke a solve service using an existing
model, in her chosen programming language,
without installing optim sw.
33. Un point d’entrée unique
• Par où commencer pour
avoir une clé pour jouer
avec l’API
• Explorer et tester l’API en
REST, Java et Python
• Obtenir du support et
réponses à mes questions
• Et plus encore…DOcloud Developer
Community
http://developer.ibm.com/
docloud/
52. Pour en savoir plus…
DOcloud News
http://developer.ibm.com/docloud/blog/
Blog des développeurs DOcloud !
DOcloud Developer Community
http://developer.ibm.com/docloud/
Point d’entrée des développeurs DOcloud !
53. #bluemix
Introduction à l’optimisation des applications – Domaines
d’application
par Amélie Hocquette, IBM Decision Optimization on Cloud and Center - Program
Manager, IBM France Lab
Design Thinking, concevoir une solution sur le Cloud
par Sophie de Bonis, UX Designer pour Decision Optimization on cloud, IBM
France Lab
Ecosystème social pour la communauté des développeurs
utilisateurs de Docloud
Par Catherine Chat, Chef de projet DOcloud Communauté & API, Technical Team
Leader, IBM France Lab
Présentation d'un service d'optimisation pour Bluemix
parJulian Payne, STSM - Solutions Architect and Chief Architect, Optimization
Offerings
5
Agenda
54. IBM Decision Optimization on Cloud
Using Decision Optimization in Bluemix
Julian Payne Architect IBM Optimization Products
55. Agenda
1. Introduction to the Decision Optimization Service
2. Creating an Optimization Model
3. Using the Decision Optimization REST API in a Bluemix Application
4. Overview of the Decision Optimization Service Architecture
59. Agenda
1. Introduction to the Decision Optimization Service
2. Creating an Optimization Model
3. Using the Decision Optimization REST API in a Bluemix Application
4. Overview of the Decision Optimization Service Architecture
63. Agenda
1. Introduction to the Decision Optimization Service
2. Creating an Optimization Model
3. Using the Decision Optimization REST API in a Bluemix Application
4. Overview of the Decision Optimization Service Architecture
66. Simple REST API
.java
.js
…
.py
.cpp
• The REST API is simple
• HTTP URL to access resources (jobs, attachments)
• JSON data to control the service
• Input attachments (model, data) are streamed to DOcloud
• Output attachments (solution) are streamed back to the client
• The REST API is polyglot
• Can be directly used in many languages and platforms
• Predefined clients for Java and Python
DOcloud Servers
REST API (JSON)
67. Understanding the Integration Principles
DOcloud Servers
Benefits:
Automate the execution of your optimization problems without deploying and
maintaining any of the optimization libraries
Free up application resources and get solutions asynchronously
Solve more demanding problems by using large configurations
Application,
models and data
Create a job, send the
model and data
Submit and monitor
the job
Get the results and
the logs
API
69. Using the JSON Format for Input Data
tuple spoke {
key string name;
int minDepTime; // Earliest departure time at spoke
int maxArrTime; // Latest arrival time at spoke
};
{spoke} Spokes = ...;
{string} SpokeIds = {s.name | s in Spokes};
spoke Spoke[SpokeIds] = [s.name : s | s in Spokes];
Truck.mod
{
"Parameters": {
"maxTrucks": 100,
"maxVolume": 5000
},
"Hubs": [
{ "name": "G" },
{ "name": "H" }
],
"Spokes": [
{ "name": "A",
"minDepTime": 360,
"maxArrTime": 1080 },
{ "name": "B",
"minDepTime": 400,
"maxArrTime": 1150 },
….
}
Input data in JSON
• JSON format replaces .dat for integration
• Easier to generate and parse
• Object property mapped to a tuple value
• Collection property mapped to a tuple sets
• Support of tuple values and tuple sets only
• Values (numbers, strings) must be added to tuple/tuple sets
• OPL arrays can be built by transforming tuple sets
• Easier to specify and exchange with SQL or NoSQL data
sources
70. Using the JSON Format for Output Data
….
// Number of trucks assigned to each route, for each truck type
tuple nbTrucksOnRouteRes {
key string spoke;
key string hub;
key string truckType;
int nbTruck;
}
{nbTrucksOnRouteRes} NbTrucksOnRouteRes =
{<r.spoke, r.hub, t, TruckOnRoute[r][t]> |
r in Routes, t in TruckTypeIds : TruckOnRoute[r][t] > 0};
Truck.mod
{
"NbTrucksOnRouteRes" : [ {
"spoke" : "A",
"hub" : "H",
"truckType" : "BigTruck",
"nbTruck" : 2
}, {
"spoke" : "B",
"hub" : "H",
"truckType" : "SmallTruck",
"nbTruck" : 1
}, ….
}
output data in JSON
•Post processing of tuple values and tuple sets must
be defined
•Tuple values and tuple sets are mapped to objects
and collections in the output JSON format
71. Trying the Java API for the First Time
// create the client
JobClient jobClient = JobClientFactory.createDefault(BASE_URL, APIKEY_CLIENTID);
// get the model and data
URL modFile = Application.class.getClassLoader().getResource(“truck.mod");
URL jsonFile = Application.class.getClassLoader().getResource(“data.json");
// build the job request
JobRequest request = jobClient.newRequest()
.input(“truck.mod", modFile)
.input(“data.json", jsonFile)
.output(new File("solution.json"))
.livelog(System.out)
.parameter(JobParameters.TIME_LIMIT, 3*60*1000)
.deleteOnCompletion(true)
.build();
// execute the request
JobExecutor executor = JobExecutorFactory.createDefault();
JobResponse response = executor.execute(request).get();
72. Green Truck Application Sample
https://github.com/IBMDecisionOptimization/DOcloud-GreenTruck-sample
73. Decision Optimization on Cloud as a user-defined service
•<plugin>
<groupId>org.cloudfoundry</groupId>
<artifactId>cf-maven-plugin</artifactId>
<executions>
<configuration>
<services>
<service>
<name>docloud</name>
<label>user-provided</label>
<userProvidedCredentials>
<url>${docloud.baseurl}</url>
<client_id>${docloud.apikey.clientid}</client_id>
</userProvidedCredentials>
</service>
. . .
•VCAP_SERVICES:
•{
• "user-provided": [
• {
• "name": "docloud",
• "label": "user-provided",
• "credentials": {
• "client_id": "api_df8e07fb-fbf2-4366-b593-xxxxxxxxxxxx",
• "url": "https://api-oaas.docloud.ibmcloud.com/job_manager/rest/v1/"
• }
• }
• ]
•}
Note: Decision Optimization is not yet in the Bluemix Service Catalog
74. Green Truck Application Sample
MongoDB
IBM Liberty
Server
DOcloud Servers
Cloud Application
Web Clients
1 Access the Input
Data 3 Create a job, send
the model and data
from MongoDB
4 Notify the server of
the job completion
using a Webhook
5 Get the solution and
store it in MongoDB
6 Notify the client with
WebSocket and
display the solution
•Architecture:
•MongoDB to store input data and solution as JSON documents
•Server based on lightweight IBM Liberty JEE server
•IBM Bluemix to deploy the server on the Cloud
•Webhook + WebSocket to notify the clients
•IBM Rave to display the solution diagrams
2 Push a button to
optimize
75. Deploying to the Cloud using IBM Bluemix
Deployable using supplied build file: mvn clean deploy
76. Agenda
1. Introduction to the Decision Optimization Service
2. Creating an Optimization Model
3. Using the Decision Optimization REST API in a Bluemix Application
4. Overview of the Decision Optimization Service Architecture
77. Job Workflow High Level Overview
Job Management
Subscription
Database
&
Object Storage
Authentication
Subscription(s)
Drop Solve
Oscar Model + Data
Results
Model + Data
Message
Queue
Job Processors
Results + logs
78. Scaling the (stateless) Applications
•You can specify in Bluemix how many instances of the application to run:
•Bluemix will provide the router and dispatch calls across the instances, in addition
instances are monitored by Bluemix and started if they crash
•The application should be stateless, persistent users session can be shared across
instances using the IBM Session Cache service:
87. #bluemix
Ecrire à : Cloud_Ecosystem@fr.ibm.com, en précisant votre nom, prénom
et adresse email.
Enseignant/personnel encadrant : code promo 12 mois (renouv.)
Etudiant : un code promo 6 mois (renouvelable)
Comment s'inscrire à Bluemix et utiliser son code promo ?
créer un compte Bluemix (30 jours de gratuité) :
https://ibm.biz/Meetup_Paris
Saisir le code avant la fin des 30 jours afin de prolonger la période de
12 mois (professeurs) ou 6 mois (étudiants)
Aide pour la saisie du code promo :
Dans Bluemix, cliquez sur le nombre de jours gratuits restant dans le coin supérieur droit et
cliquez ensuite sur Promo Code.
Copiez/collez le code et cliquez sur Apply. Rafraichissez la page afin de mettre àjour l'affichage
du nouveau nombre de jours gratuits.
Nouveautés sur l’offre Etudiants/Professeurs
Nouveau : sont également concernés par cette offre
• Club Informatiques
• Coding Schools
88. Et bien sur…
Essayez DOcloud pendant 30 jours gratuitement !
http://ibm.biz/trydocloud