Download - Muhazam's

clappingknaveΛογισμικό & κατασκευή λογ/κού

14 Δεκ 2013 (πριν από 3 χρόνια και 8 μήνες)

105 εμφανίσεις

EEC4113

Data Communication &

Multimedia System

Chapter 12: Application Layer


Text
-
Based
Multimedia


by Muhazam Mustapha and contributions by class members,

October 2010

Learning Outcome


At the end of this chapter, the students are
expected to have the knowledge about


Type Declaration: File Formats, Headers,
MIME


Text Data Transfer: Web Services, RSS Feed


Web 2.0

Chapter Content


Type Declaration


Text Transfer


Web 2.0

Type Declaration

Text
-
Based Multimedia


Multimedia consists of huge files of
images, video and audio


However, there are tricks that enable
multimedia to be shared as text


The scheme involves transferring of links
and type declarations

Type Declaration


Files or data transfers that involves binary
data need some way to inform the reader
about its content


The scheme is called file formatting, which
involves 2 parts:


Header Information


Actual Data

Header Information


Also called metadata


The content of header explains the data
that follows it


For example, a JPEG image file may
include in its header about:


No. bits per pixel, or per color


Image horizontal and vertical dimension


Compression quality level

Header Information


Data communication also involves header
information


In protocols definition we often find
metadata proceeding the actual data


For example, in an HTTP transfer header,
we can include:


The type of data being transferred


The size of the data being transferred


The last modification date of the data, etc

RIFF Type


Resource Interchange File Format


Created by Microsoft and IBM for
standardizing file format definition


It starts with a text tag at the beginning


Then it follows by pairs of metadata and its
size in bytes


Example of file types defined using RIFF:
.WAV, .AVI, .CDR, etc

RIFF Type


Example of header definition in WAV file:


Byte Location

Size

Content


0

4

ChunkID: ‘RIFF’


4

4

ChunkSize


8

4

FormatID: ‘WAVE’


12

4

Subchunk1ID: ‘fmt’


16

4

Subchunk1Size: 16 for PCM format


. . .


. . .


MIME Type


Multi
-
purpose Internet Mail Extensions


It is type declaration of data, earlier meant
for email attachment, but now has been
used for web transfer as well


It consists of pairs of file extension and its
description


some examples:


.au

audio/basic


.html

text/html


.jpg

image/jpeg

Text
-
Based Transfer

Text Transfer


Text transfer over the internet nowadays
usually involves the standardized process
called web service


In its simplest form, web service is any
kind of information can be obtained by
referring to a URL


Normally web service refers to a text
information (not web site layout) obtained
from a URL


Two web service standards: SOAP, REST

SOAP


Simple Object Access Protocol


Also called RPC


Remote Procedure Call


It is an XML formatted data used to
transfer information in web service on
HTTP protocol


The standard definition is huge and
extensive involving:


Process model


Extensibility Model


Protocol Binding


Message Construct

SOAP


It consists of an envelope (surrounding
XML) and the data content


Even though it is extensive and hard to
learn, use of SOAP is easy and
transparent due to large support by
programming platforms like .NET, Zend
(PHP), J2EE (Java), etc

SOAP


Example:


POST /InStock HTTP/1.1

Host: www.example.org

Content
-
Type: application/soap+xml; charset=utf
-
8

Content
-
Length: nnn



<?xml version="1.0"?>

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap
-
envelope">


<soap:Header>


</soap:Header>


<soap:Body>


<m:GetStockPrice xmlns:m="http://www.example.org/stock">


<m:StockName>IBM</m:StockName>


</m:GetStockPrice>


</soap:Body>

</soap:Envelope>

REST


REpresentational State Transfer


SOAP’s simpler but competing standard
for web service and RPC provider


A web service conforming to REST
standard is called RESTful


Its calls resemble normal web address
linking


More popular in open source community


Examples of RESTful providers:
Amazon.com, Yahoo!, YouTube, eBay,
Facebook, etc

REST


Examples of RESTful calls:

(from URI of http://www.thomas
-
bayer.com/sqlrest/)


<resource>


<CUSTOMERList xlink:href="http://www.thomas
-
bayer.com/sqlrest/CUSTOMER/">CUSTOMER</CUSTOMERList>


<INVOICEList xlink:href="http://www.thomas
-
bayer.com/sqlrest/INVOICE/">INVOICE</INVOICEList>


<ITEMList xlink:href="http://www.thomas
-
bayer.com/sqlrest/ITEM/">ITEM</ITEMList>


<PRODUCTList xlink:href="http://www.thomas
-
bayer.com/sqlrest/PRODUCT/">PRODUCT</PRODUCTList>


</resource>

Text
-
Based Multimedia in
Practice (RSS Feed)

RSS Feed


RSS: Really Simple Syndication or Rich
Site Summary


It is called syndication because one web
site helps to promote the content of other
web sites

RSS Feed Slides contributed by:
MUHAMMAD DZULFAHMI BIN
MOHD DZULKIFRI,
MUHAMMAD FAUZAN BIN A RAHIM

RSS Feed


Has been around for more than a decade


Only recently the standard has been
embraced by bloggers, webmasters and
large news portals as a means of
distributing information, in a standardized
format


Defined standard for syndicating headlines
and other content


Constructed using XML or extensible
Markup Language, which is a markup
language similar to HTML

RSS Feed

Common uses:


Blogs



summaries of daily blog posts


Newsletters



synopses of newsletters
alerting users that a new newsletter is
available


Weather Alerts



notification of severe
weather


Press Announcements



new product
announcements


Specials or Discounts



weekly deals or
discount offers for customers


Calendars



listings of upcoming events,
deadlines or holidays

RSS Feed

Common industry uses:


Service Industry



notification of viruses or
security alerts


Real Estate



listings of open houses or new
homes on the market


Schools



homework listings


Restaurants



lunch or dinner specials


Law Enforcement



announce sexual
predators in area

RSS Feed

Subscription:


RSS Feed can be obtained from the website
that provides them


The provider will have the specific instruction
to get the script to be inserted into the web
pages by the web master of the website that
subscribes from them


Example of RSS Feed script provided by
Google (GModules):


<script
src="http://gmodules.com/ig/ifr?url=http://feeds.labnol.org/lab
nol&amp;synd=open&amp;w=320&amp;h=200&amp;title=&a
mp;border=%23ffffff%7C3px%2C1px+solid+%23999999&am
p;output=js">

</script>

RSS Feed

Screen shot:

RSS Feed
sponsored link

Web 2.0

Web 2.0


Presumed the next generation of web
content


Web 2.0 are webs having the following
features:


Visitors can actively contribute to content


Extensive use of web services and API


Extensive use of templates


Extensive use of authoring tools online


Dynamic content by web programs

Web 2.0


Examples of Web 2.0 are:


Facebook


YouTube


Twitter


Blogs


Wikis


One particularly impressive work done by
Google to integrate almost all Web 2.0
features into one application is Google
Wave


Google Wave


Google Wave is an online software
application product from Google


Google Wave is designed as a new
Internet communications platform


hosted XML documents that allow
seamless and low latency concurrent
modifications


It was first announced at the Google I/O
conference on May 27, 2009.


On May 19, 2010, Google Wave was
released to the general public.

Google Wave Slides contributed by:
MOHD RAHIMI BIN ABDULLAH,
MUHAMMED NAFEESH BIN ABDUL RAHMAN

Google Wave


Snapshot

Google Wave


Google Wave API


Extensions:

Build robot extensions to
automate common tasks or build gadget
extensions to provide a new way for users to
interact


Embed:

Make your site more collaborative by
dropping in a wave

Google Wave


Extensions:


Gadgets:

A gadget is an application users
can participate with, many of which are built
on Google’s OpenSocial platform. A good
comparison would be iGoogle gadgets or
Facebook applications


Robots:

Robots are automated participants
within a wave. They can talk with users and
interact with waves. They can provide
information from outside sources (i.e. Twitter,
stock quotes, etc.).


The latest version of robots API is 2.0

Google Wave


Protocol


Google Wave provides federation using an
extension of XMPP, the open Wave
Federation Protocol


Being an open protocol, anyone can use it to
build a custom Wave system and become a
wave provider