Presentation is loading. Please wait.

Presentation is loading. Please wait.

COMP3121 E-Business Technologies Richard Henson University of Worcester October 2011.

Similar presentations

Presentation on theme: "COMP3121 E-Business Technologies Richard Henson University of Worcester October 2011."— Presentation transcript:

1 COMP3121 E-Business Technologies Richard Henson University of Worcester October 2011

2 Week 2: Client-Server systems and E-commerce n Objectives:  Describe the client-server model  Explain what a communications protocol is and why comms protocols are so crucial for client- server networks  Understand the rationale for using server-end scripting, rather than having all the code on the client machine  Produce a working server script running on an IIS platform

3 Client/Server Networks n Server end:   access control to the network and its resources controlled by logon service   access to resources depends on user rights – assessed by logon data n Client-end:   user who wishes to access network resources server client

4 Why are networks so important? n Client-server connection only made when user requests information   therefore very efficient… n Client-server processes involve distributing computing  requires communication between processes n Any client-server systems must therefore:  communicate 100% effectively  use an entirely reliable set of protocols  TCP/IP has proven to be reliable set of communications protocols over many years

5 Why is knowledge of networks important? n Any worthwhile E- Business system usually works across:  at least two different systems  a digital link including the Internet client server Network(s)

6 Request and responses n n Organisation of application processing across a client-server network… n n Client:   requests services or information from another computer (e.g. the server) n n Server:   responds to the client's request by sending the results of the request back to the client computer

7 Request and responses client requests information server processes the request, sends a response back to the client

8 Internet Communications n Based on principles of client/server networking  EITHER Internet computer can “play” the role of client or the role of server  e.g.(1) A user in one university sends an email to a user in another university: »“A” client sends email to “B” server  (2) When a reply comes back… »“B” client sends email to “A” server

9 “Middleware” A layer(s) of SOFTWARE that sits between client and server Could “glue” together incompatible formats

10 More on Middleware n Middleware can join users to raw data and applications! n Attractions range around “future-proofing”  incompatible computing systems can co-operate and interact with each other – can be glued together to deliver applications to the user seamlessly  applications independent of the underlying network infrastructure  integration with legacy systems (protecting investment in older technology) n Gives organisations time to decide what to do with older systems  e.g. during w2k “panic”!

11 Bandwidth and Client/Server processes n Messages transferred between client and server via network

12 Bandwidth and Client/Server processes n Data transfer: the faster the better…  most effective on LANs - nowadays 1000 Mbits/sec or more  between connected Internet computers bandwidth needs to be as high as possible - 2 Mbits/sec upwards n Slow connections…  data takes longer to get through  so longer time to get a response back  server could even “time out”

13 Early Network Protocols n Challenge for client-server data to be RELIABLY transferred between Internet sites  one purpose of the protocol »detect errors and resend if necessary n Early model (TCP/IP)…  used in early days of Unix (1970s)  communication between nodes separated into four layers of abstraction, computerized through just 4 software layers: »Physical Network access layer »Internet layer – became IP protocol »Transport or Host-Host – became TCP protocol »Application layer – became FTP and SMTP

14 THE OSI seven layer model n In 1978, the network model expanded to SEVEN software layers  included a further three levels of abstraction from physical network through to screen display, this was the MINIMUM number OSI committee could agree on  helpful for efficient client-server communication across different networks, with different protocols n First used in the extended (7 layer…) TCP/IP protocol stack  remains to present day…

15 OSI-compliant Internet Protocols n When any OSI application layer file (e-mail message, HTML file, GIF file, URL request, and so forth) is sent from one place to another on the Internet…  at OSI level 4, the TCP protocol divides it into "chunks" or packets of an efficient size for routing through packet switching  At OSI Level 3: »packets are created and IP addresses are added »used in conjunction with packet-switching to navigate packets from source to destination across the physical network

16 How a message is “sent” PhysicalLayer Data link Layer NetworkLayer TransportLayer SessionLayer PresentationLayer ApplicationLayer PhysicalLayer Layer NetworkLayer TransportLayer SessionLayer PresentationLayer ApplicationLayer TransmitStation ReceiveStation AHDATA PHAHDATA SHPHAHDATA THSHPHAHDATA NHTHSHPHAHDATA LHNHTHSHPHAHDATALT DATAAH DATAAHPH DATAAHPHSH DATAAHPHSHTH DATAAHPHSHTHNH LTDATAAHPHSHTHNHLH Link

17 Preparation of data to send across the network n File/message “chunking” into packets…  TCP orders the file into units of data of a specific size containing header information (for routing) and the data itself  this allows packets to be routed between an origin and a destination on the Internet or any other packet-switched network

18 Packet Size & Management n Traditional TCP/IP used packets with 48 bytes data + 5 bytes header  latest implementations: e.g. 768 bytes + header n Large messages broken into many packets n Sometimes very small messages are combined and share a packet data header

19 Movement of Data by Packet-switching n IP protocol  addressing and routing the packet  each packet separately numbered n Individual packets for a given file may take different routes through the Internet n When all packets have arrived at their destination:  TCP at the receiving end reads the packet numbers  reassembles the packets into the correct order to recreate the original file

20 WWW-related Application Layer (layer 7) Protocols n FTP (file transfer protocol)  predates the www  used to upload/download files between user computer and the Internet »FTP client program contacts an FTP server »requests the transfer of a file »FTP server responds by transferring the file to the client n HTTP (hypertext transfer protocol)  Used, usually via the Internet: »to upload requests for web pages from a browser on a client computer to a web server »to download web pages from a web server to a browser on a client computer  Can also be used to send data between client and server

21 HTTP and HTML as “middleware” Web Browser (HTML page) Web Server (Server Script)

22 More about HTTP and Client- Server Computing n Client and server systems work right up to the application layer  communication therefore needs to function accordingly… n Tim Berners-Lee invented HTTP to facilitate web- based application layer communication n To allow client-server interaction, Tim designed HTTP to integrate well with his basic web page formatting language - HTML  HTML language GET command instructs the client process to get data for the server  HTML POST command sends client data either using an email protocol or using HTTP

23 Web Dynamic Client-Server Model (1) Server-Side Processing in a typical web-based client-server application: 1.HTML form on web browser collects data at the client end 2.HTTP enables the form data to be sent to a web server

24 Web Dynamic Client-Server Model (2)  3. web server processes the form data according to instructions on a server script called at the client end  4. output from processing stored temporarily on web server

25 Web Dynamic Client-Server model (3)  5. server script sends output back to browser with HTML code to create a structure to display the data (e.g. HTML table)  6. This gets even more complex when a database, and database programming, are also involved at the server end…

26 Introduction to Server-scripting n The following apply to ALL types of scripting…  real programming code is essential »note: HTML is a FORMATTING language, NOT a programming language  both client and server ends need to have links to programming code: »client end…embedded within a HTML page »server end… could be embedded or separate

27 Languages used for Server Scripting n Much has been tried since HTML became interactive in the early 1990s:  Can use an existing language in a completely separate file, which is already compiled and ready to go: »the original approach:.cgi »any language could in theory be used »in practice “C” was usually favoured  Can use an existing language embedded in a HTML file »The Microsoft.asp approach, using embedded VB source code »The Sun.jsp approach, using embedded Java (Script) source  Can invent a new scripting language that is “HTML-like” and easily embeds with HTML »Cold »Preprocessor Hypertext processing.php

28 Microsoft’s first attempt at server scripting… n In 1996, Microsoft introduced active server pages (asp)  hugely successful  soon became more popular than.cgi n However, in spite of the great success of asp, big problems were emerging…  by 2000, hackers were attacking Microsoft servers and finding many security holes in IIS »Microsoft only coped by offering hotfixes  further problem: used VB source code »if server not secure, code could be copied or compromised »Scripts could not be truly “object oriented”

29 ASP becomes ASP.NET n Microsoft’s new approach to server scripting for the new millennium…  building on asp principles  new system that used “intermediate language”, rather than source code on the server  much more difficult to hack n Security problems with VB…  out with the old (asp)  in with the new ( n New environment known as framework  ss many developers accustomed to VB/.asp this took awhile to catch on!

30 Alternative Scripting Languages n JSP n PHP n PERL n Cold Fusion

31 JSPs (Java Script Pages) n n Produced by Sun Microsystems   extension of the Java TM Servlet technologyJava TM Servlet technology n n According to Sun, Servlets:   “fit seamlessly into a Web server framework and can be used to extend the capabilities of a Web server with minimal overhead, maintenance, and support.” » »platform-independent » »100% pure Java » »enhanced performance » »separation of logic from display » »ease of administration » »extensibility into the enterprise

32 PHP files (Hypertext Pre-processor) n Originally designed for Linux-based systems  executed on a type of web server called Apache n Integrate well with a Linux database and a free-to-download SQL-supporting product called MySQL n Can now run happily on IIS  now getting very popular with non-Linux platforms n Can download the environment directly from the PHP website:  

33 PHPs (continued) “ free” n n Only for serious programmers n n Cut-and-paste code still needs an environment like Dreamweaver n n Popular with those who dislike Microsoft! n n Unix-based Servers running PHPs considered to be more secure against hackers than Windows 2000/IIS running asp   but on Windows 2003/IIS v6 is another matter…

34 PERL n Invented by Larry Wall in 1987 n Became popular as a web programming language in the late 1990s n Features of C but an interpreted language (like Java) n Not for programming novices…

35 Cold Fusion n n Originally produced by Altair with its own scripting language (CFML) for the Microsoft platform   arguably easier to use than asp n n Purchased by Macromedia in 2003 (Dreamweaver, Flash, Director, etc.)   Dreamweaver has good support for Cold Fusion scripting n n Now also available for the Java environment n n Macromedia itself now part of Adobe

36 Platforms for developing a website running server-scripts n Computer capable of supporting Windows XP/2003/Vista/7 or an equivalent operating system n TCP/IP protocol stack running on server

37 Basic Infrastructure Platform at the Web Server end n Typical networking server software:  Windows NT/2000/2003/2008 n Unix (many types; Linux increasing popularity) n Web Server software:  Internet Information Server  Apache n Broadband connection to the Internet n A Firewall to keep the server secure!

38 More typical Infrastructure to go online (existing local network) n EITHER Use the firewall computer as a router to separate the internal (local) network from the External (i.e. Internet) network  diverts data between the Internet and the local network  will only work if the network will need to be running an appropriate protocol nOR, if necessary, use a gateway »converts data into appropriate protocol and diverts it between the Internet and the local network »Can be used to link networks running different protocols

39 Firewall & Security matters n 1. Internal “client-server” computer network MUST be secure  Servers all correctly configured…  2. An appropriately configured Firewall or Proxy Server then makes sure that:  internal users do not access unauthorised sites  unauthorised remote Internet users do not access the local network

40 Putting the Secured network on-line n A digital connection is needed between the router/gateway and a computer connected to the Internet n PROVIDED THAT THE NETWORK IS SECURE, there is no need to worry about payment systems…  secure (VPN) Internet connections can be made to credit card authorisation and payment sites using “Merchant Server” software n Regular monitoring of the network is essential to ensure that unauthorised users are not trying to gain access

41 Web Hosting & ISPs n ISP = Internet Service provider  Two possible approaches: »ISP provides hosting and web space, B2C manages website »ISP provides hosting AND manages website n ISP will also provide:  all important IP address that will allow a presence on the Internet  the domain name that will allow other Internet users to find the website

42 Web Hosting and ISPs (Internet Service Providers) n Only the largest corporate enterprises are likely to be part of the Internet n Most businesses need to find a partner who will provide a link between the connection medium and the Internet that meets their needs  many ISPs available  “which to choose”?

43 Criteria for choosing a web host (apart from cost!) n How much…  web space?  bandwidth availability? n How can data be uploaded (which protocols)? n How do they provide/use URLs & domain names? n Which Server scripts & Databases are supported? n How can the remote site be managed

44 Exercise for Next Week n Search Google for web hosts  How many available?  How could you choose? n Use the following URL to compare web hosts and their offerings:  n Select criteria for an e-commerce hosting solution that fit with comparison data n Choose a suitable web host (server) for an e- commerce solution

45 Thanks for listening Thanks for listening

Download ppt "COMP3121 E-Business Technologies Richard Henson University of Worcester October 2011."

Similar presentations

Ads by Google