Presentation on pWeb Home Agent

Download Report

Transcript Presentation on pWeb Home Agent

Home Agent Network
2
pWeb Demonstration
Network Architecture
HA
...
HA
HA
HA
...
HA
HA
HA
HA
HA
HA
HA
Plexus
Routing
...
HA
HA
HA
HA
HA
HA
HA
HA
HA
...
3
pWeb Demonstration
Home Agent Components
Device
Web
Portal
Message
Dispatcher
Thread
Processing Pending
Queue
Worker Threads
Messaging Interface
Crawler
Plexus TCP
Messaging API
DNS
Gateway
HTTP RESTful API
Home
Agent
Incoming
Message
Queue
Message Processor
HTTP Message Processor
(Mongoose Webserver)
Plexus TCP Message
Processor
Plexus Storage API
Local Storage
Outgoing
Message
Queue
Plexus
Index
Content
Meta
Link Cache
User
DB
Device
DB
pWeb Demonstration
Home Agent Functions
• Registration
• User
• Device
• Name Resolution
• Home agent alias
• Device name
• IP update from device
• Content meta update from device
• Provides device list to crawler
• Provides content list/device to crawler
4
5
pWeb Demonstration
Seq. Diagram for Name Resolution
Plexus Node
DNS
Gateway
HA
Message
Processor
HA
Local DB
Plexus
Node
Resolving
HA
DNS_REQUEST(name)
PLEXUS_INIT_GET(name)
SPLIT_HA_DEVICE(name)
if ha_name = node.ha_name
SERACH_NAME_DB(d_name)
PLEXUS_GET_REPLY(IP)
else
PLEXUS_GET(ha_name)
PLEXUS_GET_REPLY(ha_ip)
RETRIEVE(d_name)
RETRIEVE_REPLY(IP)
PLEXUS_GET_REPLY(IP)
PLEXUS_ROUTING(ha_name)
pWeb Demonstration
6
Prog. Language, interfaces, and 3rd party
libraries
• Code for home agent is done in a mix of C/C++
• Thread management module written in C
• All components are implemented in C++
• Interfaces
• With DNS gateway: over TCP
• With device: over HTTP
• With web portal: over HTTP
• Mongoose (implemented in C) is used as web server
• Sqlite3 used for persistent data storage
pWeb Demonstration
HA to HA Interface
• Control messages
• PEER_INIT
• PEER_CONFIG
• PEER_FORCE_LOG
• PEER_KEEP_ALIVE
• PEER_RT_UPDATE
• P2P messages
• GET
• GET_REPLY
• PUT
• PUT_REPLY
• PROACTIVE_CACHE
• RETRIEVE
• RETRIEVE_REPLY
7
pWeb Demonstration
HA to DNS Gateway Interface
• Uses two custom messages
• PEER_INITIATE_GET
• PEER_GET_REPLY
8
pWeb Demonstration
9
HA to Crawler Interface
• HA alias
• Neighbors
• Devices
• Owner
• Name
• Location
• Timestamp
• Description
• Device list with recently
content updates
pWeb Demonstration
10
HA to Device Interface
• RESTful API over HTTP
• Update IP and Port
• Homeagent(FQDN/Alias):20005/?method=update&name=<devi
cename.username>&port=<port-number>&ip=<ip>
• Update content meta
• Homeagent(FQDN/Alias):2005/?method=updatemeta&name=<d
evicename.username>&data=<content_meta_data>
pWeb Demonstration
11
HA to Web Portal Interface
• RESTful API over HTTP
• Check if user name exist?
• Homeagent(FQDN/Alias):20005/?method=existUsername&nam
e=<username>
• Register new user
• Homeagent(FQDN/Alias):20005/?method=registerUser&name
=<username>&password=<password>&email=<email>&Full_na
me=<Full_name>&Country=<Country>&Affiliation=<Affilia
tion>
• Authentication
• Homeagent(FQDN/Alias):20005/?method=authenticate&user
name=<username> &password=<password>
• Get all the devices of a user
• Homeagent(FQDN/Alias):20005/?method=getDeviceList&use
rname=<username>
pWeb Demonstration
12
HA to Web Portal Interface (Cont…)
• RESTful API over HTTP
• Modify device information
• Homeagent(FQDN/Alias):20005/?method=modifyDevice
&Oldname=<oldDevicename.username>&newName=<newDevicename
.username>&port=<port>&publicFolder=<publicFolder>&priva
teFolder=<privateFolder>
• Delete a device
• Homeagent(FQDN/Alias):20005/?method=deleteDevice&name=<d
evicename.username>
• Check if device name exist?
• Homeagent(FQDN/Alias):20005/?method=isavailable&name=<de
vicename.username>
• Register a new device:
• Homeagent(FQDN/Alias):20005/?method=register&name=<devic
ename.username>&port=<portnumber>&type=<device_type>&ip=
<ip>& os=<OS>&description=<description>&
ispublicly_indexed=<ispublicly_indexed>
pWeb Demonstration
Questions?
13