home agent network. network architecture pweb demonstration 2 ha... plexus routing
TRANSCRIPT
Home Agent Network
pWeb Demonstration 2
Network Architecture
HA
HA HA
HA
HAHA
HA
HA
HA
HA HA
HA
HAHA
HA
HA
HA
HA HA
HA
HAHA
HA
HA
. . .
. . . . . .
. . .
PlexusRouting
pWeb Demonstration 3
Local Storage
Mes
sagi
ng In
terf
ace
Ple
xus
TC
P
Mes
sagi
ng A
PI
HT
TP
RE
ST
ful A
PI
Message ProcessorHTTP Message
Processor(Mongoose Webserver)
Plexus TCP Message Processor
Incoming Message Queue
Message Dispatcher Thread
Outgoing Message Queue
Link CachePlexus Index
Device DB
Worker Threads
Crawler
Device
Home Agent
Processing Pending Queue
Plexus Storage API
UserDB
ContentMeta
Home Agent Components
Web Portal
DNS Gateway
pWeb Demonstration 4
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
pWeb Demonstration 5
Seq. Diagram for Name Resolution
DNSGateway
HAMessageProcessor
PlexusNode
HALocal DB
ResolvingHA
DNS_REQUEST(name)
PLEXUS_INIT_GET(name)
SERACH_NAME_DB(d_name)
SPLIT_HA_DEVICE(name)
PLEXUS_GET_REPLY(IP)
PLEXUS_GET(ha_name) PLEXUS_ROUTING(ha_name)
Plexus Node
PLEXUS_GET_REPLY(ha_ip)
RETRIEVE(d_name)
RETRIEVE_REPLY(IP)
PLEXUS_GET_REPLY(IP)
if ha_name = node.ha_name
else
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 7
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
pWeb Demonstration 8
HA to DNS Gateway Interface• Uses two custom messages
• PEER_INITIATE_GET• PEER_GET_REPLY
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=<devicename.username>&port=<port-number>&ip=<ip>
• Update content meta • Homeagent(FQDN/Alias):2005/?method=updatemeta&name=<devicename.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&name=<username>
• Register new user • Homeagent(FQDN/Alias):20005/?method=registerUser&name=<username>&password=<password>&email=<email>&Full_name=<Full_name>&Country=<Country>&Affiliation=<Affiliation>
• Authentication• Homeagent(FQDN/Alias):20005/?method=authenticate&username=<username> &password=<password>
• Get all the devices of a user• Homeagent(FQDN/Alias):20005/?method=getDeviceList&username=<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>&privateFolder=<privateFolder>
• Delete a device• Homeagent(FQDN/Alias):20005/?method=deleteDevice&name=<devicename.username>
• Check if device name exist?• Homeagent(FQDN/Alias):20005/?method=isavailable&name=<devicename.username>
• Register a new device:• Homeagent(FQDN/Alias):20005/?method=register&name=<devicename.username>&port=<portnumber>&type=<device_type>&ip=<ip>& os=<OS>&description=<description>& ispublicly_indexed=<ispublicly_indexed>
pWeb Demonstration 13
Questions?