1 / 29

Programmation Internet et Intranet

Programmation Internet et Intranet . Stéphane Frénot INSA Lyon 1998 stephf@lisiflory.insa-lyon.fr. Déroulement du cours. Architectures C/S de données Java Langages de programmation Composants distribués Autres approches. INTRODUCTION. Internet. Réseau de réseaux

york
Download Presentation

Programmation Internet et Intranet

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Programmation Internetet Intranet Stéphane Frénot INSA Lyon 1998 stephf@lisiflory.insa-lyon.fr Stephf@lisiflory.insa-lyon.fr

  2. Déroulement du cours • Architectures • C/S de données • Java • Langages de programmation • Composants distribués • Autres approches Stephf@lisiflory.insa-lyon.fr

  3. INTRODUCTION Stephf@lisiflory.insa-lyon.fr

  4. Internet • Réseau de réseaux • Protocoles d’échange d’information • Bas niveau : TCP,IP ... • Haut niveau : SMTP, NNTP • RFC Stephf@lisiflory.insa-lyon.fr

  5. Protocoles C. Application C. Présentation C. Session C. Transport C. Réseau C. Liaison de données C. Physique Applications ftp telnet http gopher pop3 Transport tcp udp Réseau icmp ip igmp Liaison Interface physique arp rarp Stephf@lisiflory.insa-lyon.fr

  6. App Tra Rés Phy Protocole Trame Données Entête http Données Message applicatif Entête TCP Entête http Données Segment TCP Entête IP Entête TCP Entête http Données Datagramme IP (Packet) Deb Eth Entête IP Entête TCP Entête http Données Fin Eth Stephf@lisiflory.insa-lyon.fr

  7. Protocoles Serveur Client Requête Réponse • Simple • Publique • Portable Stephf@lisiflory.insa-lyon.fr

  8. Caractéristiques d’un protocole • Nom : Simple Mail Transfert Protocol • Rfc : 1830, 1845, 1846… (ftp://ftp.univ-lyon1.fr/pub/rfc) • Mode de fonctionnement : Connecté • Port de connexion : 25 • Commande / Requêtes : EXPN, QUIT, HELO... • Client : Eudora • Serveur : Sendmail Stephf@lisiflory.insa-lyon.fr

  9. Protocoles Applicatifs Exemples Stephf@lisiflory.insa-lyon.fr

  10. Fonctionnement d’un serveur • Démon • Ecoute sur un port • Accepte une connexion • Répond aux requêtes du client • Principe de lancement • Manuel • Inetd • Boot Stephf@lisiflory.insa-lyon.fr

  11. Exemple de connexion telnet ifhpserv 25 =>220 ifhpserv.insa-lyon.fr ESMTP Sendmail 8.7.1/8.6.9 ready at Sun, 11 Oct 1998 13:52:07 +0200 (METDST) EXPN stephane.frenot =>250 Stephane FRENOT <stephf@lisiflory.insa-lyon.fr> ------------------------------------------------------------------------------------ Programmes mis en œuvre : ? Stephf@lisiflory.insa-lyon.fr

  12. /etc/services tcpmux 1/tcp # rfc-1078 echo 7/tcp echo 7/udp discard 9/tcp sink null discard 9/udp sink null systat 11/tcp users daytime 13/tcp daytime 13/udp netstat 15/tcp chargen 19/tcp ttytst source chargen 19/udp ttytst source ftp-data 20/tcp ftp 21/tcp telnet 23/tcp smtp 25/tcp mail Stephf@lisiflory.insa-lyon.fr

  13. /etc/inetd.conf # Internet services syntax: # <service_name> <socket_type> <proto> <flags> <user> <server_pathname> <args> # # Ftp and telnet are standard Internet services. # ftp stream tcp nowait root /usr/etc/in.ftpd in.ftpd telnet stream tcp nowait root /usr/etc/in.telnetd in.telnetd # # Shell, login, exec, comsat and talk are BSD protocols. # shell stream tcp nowait root /usr/etc/in.rshd in.rshd # # Popper # pop3 stream tcp nowait root /usr/local/lib/popper popper -s -d -t /var/log/poplog Stephf@lisiflory.insa-lyon.fr

  14. Intranet Stephf@lisiflory.insa-lyon.fr

  15. Architecture WEB Stephf@lisiflory.insa-lyon.fr

  16. Le Web : l’architecture • Réseau de ressources d’information (89/93/94) • Clients de consultation • Navigateur, butineur, arpenteur, browser... • Netscape Communicator, Microsof Internet Explorer • Serveurs de documents • HTTP, démon HTTP, Serveur Web • Apache (www.apache.org), Microsoft IIS, Netscape, Cern => Consultation de documents Stephf@lisiflory.insa-lyon.fr

  17. Web : Architecture documentaire Stephf@lisiflory.insa-lyon.fr

  18. Principes d’échange des documents • Standardiser les échanges • Identifier de manière unique les documents • Standardiser les formats des documents • Connecter les documents dans un hypertexte Stephf@lisiflory.insa-lyon.fr

  19. HTTP/1.1 • Requêtes : • GET, HEAD, POST, (PUT) • Réponses : • 100 - 199 : Informatif : 100 Continue • 200 - 299 : Requête client réussie : 200 OK • 300 - 399 : Requête client redirigée : 301 Moved Permanently • 400 - 499 : Requête client incomplète : 408 Request Time-out • 500 - 599 : Erreur du serveur : 500 Internal Server Error • Entêtes : • Généraux : Cache-Control : no-cache ... • Client : User-Agent : mozilla 2.0 • Serveur : Retry-After : 260 • Entité : Content-Length : 821 Stephf@lisiflory.insa-lyon.fr

  20. Exemple HTTP • telnet lisiaix0 80 • >GET /index.html HTTP/1.0 • >User-Agent: libwww/2.12 • > • => HTTP/1.1 200 OK • => Date: Fri, 11 Feb 1998 18:30:27 GMT • => Server: Apache/1.2.4 • => Content-Length: 381 • => Content-Type: text/html • => • => <HTML> • => <BODY> • => Bonjour tout le monde .... • => </BODY> • => </HTML> Stephf@lisiflory.insa-lyon.fr

  21. Identification des ressources URI/URL méthode://machine:port/fichier[#ancre | ?paramètres] nom de la machine liste des paramètres (requêtes) méthode protoc. d'accès à la ressource file ress. locale ftp FTP http HTTP telnetTELNET gopherGOPHER waisWAIS newsNNTP 80 par défaut <1023 root 1023 < x < 65537 user nom du pointeur ds le doc. HTML Chemin d'accès (relat. ou absol.) Stephf@lisiflory.insa-lyon.fr

  22. Standardiser les formats : MIME • Fichiers de correspondance format/suffixe • Serveur : trouve l’emballage application/msword doc application/octet-stream bin dms lha lzh exe class audio/basic au snd chemical/x-pdb pdb xyz image/gif gif message/news multipart/mixed text/html html htm video/quicktime qt mov x-conference/x-cooltalk ice x-world/x-vrml wrl vrml • Client : trouver l’action à réaliser Interpréte la ressource (text/html, image/gif, plug-ins) Transmet la ressource à une application externe Demande à l’utilisateur Stephf@lisiflory.insa-lyon.fr

  23. Hypertexte de documents : HTML • HTML : HyperText Markup Langage 89 ? • "Langue maternelle de publication sur le Web que tous les ordinateurs doivent comprendre" • Publier des documents • Chaîner de l’information par des liens HT • Définir des formulaires de saisie • Inclure divers types ressources • DTD SGML • Définit la structure d’un document HTML • Les balises et leur organisation • Structures des balises d’un document HTML • Contenu des balises Stephf@lisiflory.insa-lyon.fr

  24. HTML Structure d'un document <Html> <Head> Information sur le document </Head> <Body> Document html </Body> </Html> --------------------------------------------------------- <!Element HTML (Head, Body)> <!Element Head pcdata> <!Element Body pcdata> Stephf@lisiflory.insa-lyon.fr

  25. HTML Les types de balises • Balises simples d'organisation : <br>, <hr> • Balise de formattage de texte : <b> </b>, <i> </i>, <center></center> • Balises logiques : <adresse>... <adresse>, <bloquote>...</bloquote>, <H1>...</H1> • Balises structurelles : <table> <tr> <td>,<ol> <li> • Balises paramétrées : <img src="logo.gif">,<a href= "index.html">,<p align="center"> • Appels de scripts clients :<script><applet><object> • Formulaires et champs de saisie de l'information : <form> <input> • Multidocuments ou document multicadre : <frameset> <frame> Stephf@lisiflory.insa-lyon.fr

  26. HTML Exemple <HTML> <HEAD> <META NAME="Author" CONTENT="sfrenot"> <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [fr] (Win95; I)[Netscape]"> <TITLE>Publications</TITLE> </HEAD> <BODY BACKGROUND="fond.jpg"> <IMG SRC="./logoinsa.gif" WIDTH=40 HEIGTH=40> Ceci est le texte du document il peut contenir des balises simples <I> en italique </I> <br><hr>des balises paramétrées <P align="center"> paragraphe centré</p> et des <A HREF="HTTP://www.insa-lyon.fr"> hyperliens </A> <table border=1><tr><td> et </td><td> un </td><td> tableau </td></tr> <tr><td colspan=3>+++++++++++++++++++++++</td></tr></table> </BODY> </HTML> Stephf@lisiflory.insa-lyon.fr

  27. HTML exemple Stephf@lisiflory.insa-lyon.fr

  28. Web : Architecture documentaire Stephf@lisiflory.insa-lyon.fr

  29. HTML Problèmes • HT • Qualité graphique des Serveurs • Standards inexistants • Pas de dynamique de fonctionnement • Principe de parse HTML lourd • Internet -> Professionnel (HTML fait “à la louche”) • Grosse concurrence • Sites fantômes Stephf@lisiflory.insa-lyon.fr

More Related