27
NETWORK CENTRIC NETWORK CENTRIC COMPUTING COMPUTING (With included EMBEDDED (With included EMBEDDED SYSTEMS) SYSTEMS)

NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Embed Size (px)

Citation preview

Page 1: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

NETWORK CENTRIC NETWORK CENTRIC COMPUTINGCOMPUTING

(With included EMBEDDED (With included EMBEDDED SYSTEMS)SYSTEMS)

Page 2: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Network Centric ComputingNetwork Centric Computing

• A Web Browser to provide a Universal Client• Users have a consistent and Familiar User

Interface• A Browser can launch many types of

applications and read many types of documents• This can be accomplished on different operating

systems/platforms and is independent of where the applications or documents are stored

Page 3: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

PC Web ConnectionsPC Web Connections

• The PC with web browser connects to Internet via modem (RS232, USB or Ethernet)

• The RS232 and USB would be telephone connections either via landline or mobile

• Ethernet would be cable or broadband telephone or in some cases via satellite

Page 4: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Simplified Web Operation(1)Simplified Web Operation(1)

• All devices connected to the web have a unique number called the IP address and may have an alphanumeric hostname

• IP is short for the Internet Protocol that makes it possible for different computers with different hardware and operating system to communicate

• A network of computers, or Hosts, connected by the Internet Protocol is called an Internet

• The data from the PC may seem to be a continuous stream but is broken up into smaller “chunks” called packets

Page 5: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Simplified Web Operation(2)Simplified Web Operation(2)

• The link between the PC with the browser and the host PC being called appears direct

• In reality the packets of data require many intermediate steps through routers, gateways and even other servers on the way to the other host PC

• The mechanism that controls all this is TCP, transmission Control Protocol

• The complete system is called TCP/IP as both protocols are needed for correct operation

Page 6: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

A Web based Embedded System A Web based Embedded System • This type of system uses conventional PCs with a Web

browser as user interfaces• Another PC, often part of a distributed embedded system, is

used for control and data capture• The key to this system is the use of a database which may

be on the control and data capture PC or a separate database server PC

• In either case the resulting captured data is stored in the database

• Any authorised user can have access to the data, via a server PC, which is searchable and manipulated as required, without direct access to the hardware

Page 7: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Typical Web Embedded SystemTypical Web Embedded System

Page 8: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Distributed Embedded SystemDistributed Embedded System

• NETIOM or similar system used for non time critical tasks as the use of web pages as data transfer is not fast.

• Microcontroller used for time critical tasks such as data collection from SPI or I2C sensors and PWM control of motors etc.

• Microcontroller programmed in ‘C’ with communications to PC via fast serial RS232 or USB

Page 9: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Control and Data Capture PCControl and Data Capture PC

• High level connection to user PCs via a server program connected to the Internet

• Connection to Database server also via Internet but server for this task in on the database server PC

• Connections to embedded system, distributed or otherwise, would probably use ‘C’

Page 10: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Database Server PCDatabase Server PC• Communicates over the Internet to the Control

and Data Capture PC, no User PC can access this directly

• All database queries are sent from the control and Data Capture PC and results are returned to the Data Capture PC

• The Control and Data Capture PC receives requests for information from User PCs and formulates them correctly for the Database Server PC

• Results from Database Server PC are returned correctly formulated to the User PC by the Control and Data Capture PC

Page 11: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Control and Data Capture PC Control and Data Capture PC TasksTasks

Page 12: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Control and Data Capture PC Control and Data Capture PC Task 1Task 1

Page 13: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Software for task 1Software for task 1

• The overall program would typically be written in something like PERL or PHP

• These are “glue” languages that are often used to create applications with many different elements

• PERL has modules to send SMS text messages, communicate with the internet and call system programs including those written in ‘C’. A user written task in ‘C’ could control and collect data

• Internet module could be used to update database after formatting data for database use

Page 14: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Data Collection and Control Data Collection and Control

• The code for this task is now totally separate and can be written using the most appropriate programming techniques

• The distributed embedded system could use FPGAs and even single board Computers if the task required that kind of processing power. In the case of a single board computer the interface would via ethernet

Page 15: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Software for task 2Software for task 2

Page 16: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Software for Task 2Software for Task 2• The user PC would send request as data in a form to

a PERL CGI file in the Control and Data Capture PC server

• This request would be coded as a Database query and sent using the web interface module in PERL to the database server

• The result from the database server, via the PERL web interface, would be coded as an answer for the User and sent as a reply to User PC from the PERL CGI file in the Control and Data Capture PC server

• The CGI file would terminate and a new execution would begin when another user request was received by the Control and Data Capture PC server

Page 17: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

FORM ExampleFORM Example

• The following form example runs as a web page and asks the user for a name. This is put in the variable user_name and sent with the name input to the CGI file that is given as the action for the form. The method called post is describing how the answers from the form have been encoded

• This method of data entry can be generated by the PERL web interface module so that the same CGI type files can be used for this data entry as well

Page 18: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

<html> <head> <title>A very simple form</title> </head>

<body> <p> <center> <h1>A VERY SIMPLE FORM</h1><br> </center> <br> <form method = "post" action = “www.edutronic.co.uk/cgi-bin/simple_form.cgi"> Please enter name: <input name = "user_name" type = "text" size = "12"><br> <input type = "submit" value = "SEND NOW"> </form> </p> </body></html>

Page 19: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

FORM as seen in browserFORM as seen in browser

Page 20: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

CGI FORM DECODE in PERLCGI FORM DECODE in PERL• A PERL module called CGI is used to decode the post

encoding method• The value from the FORM variable user_name is

stored in a PERL variable $user_name• An HTML web page is generated by PERL print

statements so that it can be displayed by a web browser

• The text message to be sent has the variable in it, and that is substituted by PERL as the text is sent to the Internet so it appears in the user message on the screen. These techniques are used in the PERL CGI of Task 2 to include the Database results in the message going back to the user PC

Page 21: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

#!/usr/bin/perl# cgi program to process a very simple form

use CGI;$foo = new CGI;

$user_name = $foo->param('user_name'); #get name from form

print "Content-type: text/html\n\n"; #output as an HTML file

print "<html>\n";print " <head>\n";print " <title>Response to simple_form input</title>\n";print " </head>\n";print "\n";print " <body>\n";print " <h1>Hello $user_name, welcome to an ELEC2630 Example!</h1>\n";print " </body>\n";print "</html>\n";

Page 22: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

RESPONSE as seen in browserRESPONSE as seen in browser

Page 23: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

User Interface SoftwareUser Interface Software

• The code called by the user is in the form of CGI programs

• The CGI code can be written to process user requests into queries for the database and return the data in the format that the user requires

Page 24: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

ConclusionsConclusions• The integration of web access with embedded

systems takes many forms and is a growth area at the moment

• This trend is helped by the increasing complexity of embedded devices, such as micro-controllers, made posible by advances in semiconductor technologies

• Many of the PCs in these systems would be using the LINUX operating system. The server would be APACHE. The Database is often MySQL and the “glue” language PERL or PHP.

• This is now so common that such a system is called a LAMP system for Linux Apache MySQL Perl or Php

Page 25: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

PERL example of Web UsePERL example of Web Use

Page 26: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

Screen Display Result from CGIScreen Display Result from CGI

Page 27: NETWORK CENTRIC COMPUTING (With included EMBEDDED SYSTEMS)

END OF PRESENTATION