Spring School on Integrated Operational Problems May 14-16, 2018, - - PowerPoint PPT Presentation

spring school on integrated operational problems may 14
SMART_READER_LITE
LIVE PREVIEW

Spring School on Integrated Operational Problems May 14-16, 2018, - - PowerPoint PPT Presentation

Spring School on Integrated Operational Problems May 14-16, 2018, Troyes, France PLAN Introduction (15-30 minutes) C++ (1 hour) The Clarke and Wright algorithm 1rst session Modifying the CAW and testing it Adding your own strategy to the CAW


slide-1
SLIDE 1

Spring School on Integrated Operational Problems May 14-16, 2018, Troyes, France

1

Pierre Bomel & Marc Sevaux Université de Bretagne Sud, Lab-STICC, Lorient, France, 2018

PLAN Introduction (15-30 minutes) C++ (1 hour) The Clarke and Wright algorithm Modifying the CAW and testing it Adding your own strategy to the CAW How to debug ? JSON (30 minutes) Understanding the role of the JSON files Adding two new algorithms to the CAW PHP (30 minutes) Adding a new problem to the web-site Conclusion will be yours ! 2nd session 1rst session

slide-2
SLIDE 2

Spring School on Integrated Operational Problems May 14-16, 2018, Troyes, France

2

Introduction What is a web service for operational problems ?

slide-3
SLIDE 3

What is a web-service ?

3

This is an Internet-based remote computing service. This is a client/server application, The client does RPCs which means "remote procedure calls". There a client and a server.

slide-4
SLIDE 4

What is a web-service ?

4

With the "magic of Internet", a service is executed at a given IP address, which can be any (even the computer where the client resides = localhost). There a client Client IP and a server Server IP function A() { … B(params); … } function B(params) { … … }

slide-5
SLIDE 5

What is a web-service ?

5

// the caller function A() { … call B() at serverIP with IO params … } // the callee function B(params)// the service { … … } main() // the server { for(;;) { wait for call (on a port number) get functionID switch (functionID) case functionB: get params of B call B() send results to caller break case ... … } }

slide-6
SLIDE 6

What is a web-service ?

6

You already know and use a lot of such services There a client and a server. FTP email ping web surfing ... ftpd mail servers ping server HTTP server ...

slide-7
SLIDE 7

What is a web-service ?

7

To work, a web-service ABSOLUTELY NEEDS a server → a HTTP server and a client → a web browser Web browser HTTP server

slide-8
SLIDE 8

What is web-specific ? URL, HTTP and HTML

8

URL = http://labsticc.univ-ubs.fr/WS4RP /var/www/html/RPWS/index.html 1 2 index.html 3

slide-9
SLIDE 9

URL ? Uniform Resource Locator

9

URL = http://labsticc.univ-ubs.fr/WS4RP What protocol = HTTP This is an IP port number What computer = labsticc.univ-ubs.fr This is an IP address obtained via the DNS. DNS(URL) → IP address DNS is another remote service !!!! Path = WS4RP => Location of service "inside the private file-system

  • f the HTTP server"
slide-10
SLIDE 10

HTTP protocol/server ?

10

The apache server is a running process on the remote computer, associated with the HTTP protocol. Traditionally this is a process listening at port 80 It has been configured to map the "user’s path" = WS4RP to a file system local path = /var/www/html/RPWS When called by a browser, it searches for an index.html file. If found, it sends it back to the browser that will interpret its content. The browser interprets the index.html There is javascript (code) and CSS (look and feel) embedded into the HTML file. 2

slide-11
SLIDE 11

What does the javascript at client side ?

11

It collects and sends service-specific parameters to the server 1 It displays received service-specific results 3

slide-12
SLIDE 12

What happens on the server side again ?

12

PHP: receive call + params & convert network data to program data Call C++ (or any programing langage) Algorithm. 2

slide-13
SLIDE 13

// the caller function A() { … call B() at serverIP with IO params … } // the callee function B(params)// the service { … … } main() // the server { for(;;) { wait for call get functionID switch (functionID) case functionB: get params of B call B() send results to caller break case ... … } }

Let’s sum up What shall we do and where ?

13

localhost

YOUR CODE

slide-14
SLIDE 14

Spring School on Integrated Operational Problems May 14-16, 2018, Troyes, France

14

Pierre Bomel & Marc Sevaux Université de Bretagne Sud, Lab-STICC, Lorient, France, 2018

PLAN Introduction (15-30 minutes) C++ (1 hour) The Clarke and Wright algorithm Modifying the CAW and testing it Adding your own strategy to the CAW How to debug ? JSON (30 minutes) Understanding the role of the JSON files Adding two new algorithms to the CAW PHP (30 minutes) Adding a new problem to the web-site Conclusion will be yours ! 2nd session 1rst session