JGN2plus Workshop on
P2P Overlay Platform PIAX and Live E!
~ APNG 10th Camp in Bangkok ~PIAX project team :Yoshimasa Ishi, Hirokazu Tanaka,Seiichi Kato, Yuuichi Teranishi
Osaka-University & NICT, Japan1

Another infrastructure for Sensor
NetworkServerToday’s Contents
1. Overview of PIAX
– idea, structure etc.

2. Install & SeCng
3. PracFcal work
– How to join in P2P network and get sensor data

4. IntroducFon of some applicaFon

http://piax.org/en• Integrates multiple P2P-based discovery functions
and mobile agent featuresStreamingNavigation

Reputation
Sharing

Shopping
Assistant

Recommendation

Various kind of applications
Mobile AgentsPIAX

P2P Overlay Network

Scalable Messaging
by P2P Overlay

Peer

Flexible Computing
by Mobile Agents

ProfilesReputations
Sensors

Contents

DevicesUsers

• Load balancing• Robustness• Ad-hocness• Asynchronusness
and so on.

Overlay
Network
PhysicalNetwork• Skip Graphs‒ Range queries• LL-Net‒ Geographical queries• DOLR‒ Attribute based queries (ALM)• DHT‒ Key-value based storages• Flooding‒ Arbitrary queries

PIAX Architecture as a middleware
Web Service

P2P Agent

Authentication Security

Search Messaging
Multi-Overlay
RPC
Overlay Transport
Physical Network

DHT
Plug inLL-Net
SkipGraph
Flooding呍呍Discovery RPC API
discoveryCall ( String query,String methodName,Object… args )‘query’-condition for P2P agent discovery(name, kind, location etc.)‘methodName’-name of method‘args’-argument for the method

discoveryCall (“$locaFon
inside rect(135,35,1,1)”,
ReportValues)

Discovery by LL-Net overlay
Not Matched

36°north

Not Matched

MatchedReturn

35°north
135°east
Starting
point

MatchedReturn136°east

discoveryCall

PIAX Overlay Test-bed on JGN2plus
X-Sensor

MultI-WSN Testbed

Sensor
Application PFSensor NW
Test-bed

PIAX Overlay Test-bed

JGN2plus Test-bed

Researcheson Overlay NW

Ubiquitous
Service PF

DistributedApplications,Services

Multiple Overlay
Distributed Data
Processing

Traffic Measurement
Virtual Storages
Virtual Networks

Live E! Distributed sensor data archive on PIAXP2P Overlay Networkby PIAX
Browse deployed sensors
on web browser

Live E! Agent on PIAXWeb I/F
SOAPPort

Sensor Data
Storage

Web I/F
SOAP…

20 PIAX Peers with Live E! sensors

Live E! Weather Sensor
StationSOAP I/FSensors:- Temperature- Humidity- Raindrop- Wind speed etc.

Practical Work
By
Hirokazu Tanaka
andYoshimasa Ishi

Please note…
• Local File Server URL:
http://203.159.26.64/PIAX/• For PIAX peer, Windows XP or Vista is
recommendedPreparation•

Check and configure your computer
environment
1. Please write down your IP address.
>ipconfig
Turn off firewall, or set up the firewall to accept
inbound packets to port 80 and 12367•Install JRE 5 (Java Runtime Environment 5.0)
1. Download JRE5 from the archive server(http://203.159.26.64/PIAX/).
2. Install JRE5.

Install the Application Package
1. Download a zip package of the application fromthe archive server(http://203.159.26.64/PIAX/).
2. Unzip the archive to “C:\LiveE_PIAX”(any directory name is OK.)
C:\LiveE_PIAX+ additional+ agclasses+ images+ lib+ uiclasspath.batclasspath.shlive-edb.prop

directory structureInstall PIAX package
1. Download PIAX from the archiveserver(http://203.159.26.64/PIAX/).
2. Unzip the zip archive to “C:\PIAX”.
3. Copy “C:\PIAX\piax-2.0.0-all.jar” package
to “C:\LiveE_PIAX\lib”.

Run the Application on Single Peer•

Starting up the single peer
1. Open a command prompt. Then, type following> C:> CD C:\LiveE_PIAX
2. Run classpath.bat to set Java classpath.
> classpath.bat
3. To Run the application, type following command.
> java org.piax.live_e.LiveE localhost [loc_x] [loc_y] [sensorID]
Set longitude of AIT, 100.61 to [loc_x].
Set latitude of AIT, 14.08 to [loc_y].
Set your [sensorID],like hongo.wide.ad.jp/WXT510/test/.

Run the Application on SinglePeer• Open http://localhost/ on your web browser.
You can see following map view.

Modify WL500g Communication Hostconfiguration•To upload sensor data to the agent, you needto modify the ASUS router’s cron configuration.
Modify cron configuration to change upload host to your PC.
> crontab –e*/1 * * * * /rom/livee/get_csv.sh /rom/livee/owwnogui > /tmp/data.csv*/1 * * * * sleep 52; killall owwnogui; /rom/livee/csv_to_temperature.sh/tmp/data.csv >> /tmp/temperature; /rom/livee/csv_to_winddir.sh/tmp/data.csv >> /tmp/winddir; /rom/livee/csv_to_windspeed.sh/tmp/data.csv >> /tmp/windspeed; rm /tmp/data.csv;/rom/livee/upload_data [IP address] services/DataUpload200703 [Your Sensor ID]
MDAwMDAwMDA= /tmp /rom/livee
5 * * * * ntpclient -h mail.hongo.wide.ad.jp -s

Set your PC's hostname or IP Address to [IP Address].
Set your sensor ID to [Your Sensor ID].

Data Upload Confirmation•Wait a few minutes until the router uploads sensor
data to your computer. By browsing http://localhost/on your PC, you can see a Temperature icon on themap.

•Click an icon on the map, then a balloon window isopened.

Agent configuration
1.
2.
3.

If you click ‘configure’ link in the balloon, the view moves
to agent configuration view
In this view, you can move and set peer location byclicking somewhere (your country!) on the map.
After you decide new location, click ‘OK’ button under themap.

‘configure’Run the Application on 20peers• Let’s challenge to share the sensor date over PIAX
Peer-to-Peer network
Type following command> java org.piax.live_e.LiveE 203.159.26.107
Before this you have to quite the single peer by typing ‘q’+<enter> on command prompt.

Run the Application on 20 peers• After start up, open “http://localhost/ ” on your browser.
You can see two types of icon. Sensor is running on
your Computer. If no yellow oval is displayed, thesensors is running on the other peer.

LiveE! Distributed Sensor Archiveon PIAXEnd of Presentation
See also http://www.piax.org/enForward query for key range of [1:3] from peer ‘110’

membershipvector
Key
Level 3
Level 2
Level 1
Level 0000
1100010001

110111

Definition of Location-ID
Not used

190-180-90180

320032

D
Query Target

B
QueryTarget

AA

C

B

C

D

Location-ID