Network centric computing.
Download
Report
Transcript Network centric computing.
NETWORK CENTRIC
COMPUTING
(With included EMBEDDED
SYSTEMS)
Network 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
PC 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
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
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
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
Typical Web Embedded System
Distributed 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
Control 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’
Database 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
Control and Data Capture PC
Tasks
Control and Data Capture PC
Task 1
Software 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
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
Software for task 2
Software 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
FORM 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
<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>
FORM as seen in browser
CGI 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
#!/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";
RESPONSE as seen in browser
User 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
Conclusions
• 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
PERL example of Web Use
Screen Display Result from CGI
END OF PRESENTATION