Changes between Version 2 and Version 3 of NativeGateway


Ignore:
Timestamp:
Oct 19, 2010, 1:09:11 PM (14 years ago)
Author:
zach
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NativeGateway

    v2 v3  
    11= Gateway User Guide =
    22
    3 The SENSEI Gateway is a Linux daemon which acts as a resource proxy between the SENSEI System and one or more WSAN Islands. This guide shows how to use, configure and test the Gateway. In addition to its own resources offered by the management and code update plugins, the Gateway acts as a resource proxy between embedded resources offered by WSAN nodes running the BinaryWS protocol and eRAI/eRPI interfaces and full HTTP RAI/RPI to the SENSEI System.
     3The SENSEI Gateway is a Linux daemon which acts as a resource proxy between the SENSEI System and one or more WSAN Islands. This guide shows how to use, configure and test the Gateway. In addition to its own resources offered by the management and code update plugins, the Gateway acts as a resource proxy between embedded resources offered by WSAN nodes running the CoAP protocol and eRAI/eRPI interfaces and full HTTP RAI/RPI to the SENSEI System.
    44
    5 SENSEI System (RU, RD) <----http://nodeX/-----> SENSEI Gateway <------bws://-----> WSAN Island (node1, node2 ...)
     5SENSEI System (RU, RD) <----http://nodeX/-----> SENSEI Gateway <------coap://-----> WSAN Island (node1, node2 ...)
    66
    77See the [wiki:Gateway Gateway Developer Guide] for more detailed information on building, features and development.
     8
     9== Download the Package ==
     10
     11The SENSEI Native Gateway is available here:
     12
     13[https://svn-batch.grid.pub.ro/svn/Sensei-Cookbook/SenseiGateway.tgz https://svn-batch.grid.pub.ro/svn/Sensei-Cookbook/SenseiGateway.tgz]
    814
    915== Running the Gateway ==
     
    5359Nodes publish their resource description to the Gateway upon initialization and periodically (before Expiration-Time). This is sent to the URL /rpi[0] ([0] refers to compressed URL code 0) on the gateway (port 61626).
    5460
    55 The gateway stores resource descriptions locally in /xml and supports fetching descriptions from an http:// URL (not yet implemented). Sensor nodes do not send full resource descriptions, but instead only a Document-Link to the description. The body of the bws message POSTed to /rpi must contain the string:
     61The gateway stores resource descriptions locally in /xml and supports fetching descriptions from an http:// URL (not yet implemented). Sensor nodes do not send full resource descriptions, but instead only a Document-Link to the description. The body of the CoAP message POSTed to /rpi must contain the string:
    5662
    5763{{{
     
    104110=== eRAI Interface ===
    105111
    106 Requests coming from the RAI interface are matched with registered URLs (registered from resource descriptions sent by nodes), and then as BinaryWS requests to the corresponding WSAN node and URL. The response is returned to the resource user. When caching is implemented a cache for each resource will be checked first before making a binaryWS request.
     112Requests coming from the RAI interface are matched with registered URLs (registered from resource descriptions sent by nodes), and then as CoAP requests to the corresponding WSAN node and URL. The response is returned to the resource user. When caching is implemented a cache for each resource will be checked first before making a CoAP request.
    107113
    108 Sensor nodes may also make binaryWS requests outside the WSAN island (proxied to HTTP) by including a full FQDN URL (www.example.com/test) in the URL field of the binaryWS request header. This feature is not yet supported.
     114Sensor nodes may also make binaryWS requests outside the WSAN island (proxied to HTTP) by including a full FQDN URL (www.example.com/test) in the URL field of the CoAP request header. This feature is not yet supported.
    109115
    110116Sensor nodes may send evenets without a subscription to a notification collector on the gateway by POSTing to /notify[1]. The evenet is POSTed to a default event collection service on the SENSEI Management Web-page. The body may be any O&M content or even text/plain.
    111117
    112 
    113 == Testing the Gateway ==
    114 
    115 Go to the binaryWS_test tool script directory:
    116 
    117 cd ../binaryWS_test/scripts
    118 
    119 First register a fake resource description with:
    120 
    121 ./rpi_client_publishRD.sh ::1
    122 
    123 You should see the plug-in receive the registration, then the Gateway will do
    124 an HTTP post automatically to the RD (currently over IPv4 to the RD running on
    125 the VM in Romania).
    126 
    127 Now try an RAI event to the plug-in notification collector:
    128 
    129 ./notify.sh ::1 content/temp.rdf_SCHEMA_BYTEALIGNED.exi
    130 
    131 You can make an RAI request from the gateway by going to e.g.
    132 
    133 http://localhost:8000/localhost/s/temp
    134118
    135119== Performance ==
     
    137121The performance of the Gateway is only reasonable buit without HAVE_DEBUG and HAVE_LOGGING are not defined in the Makefile. The debugging messages cause huge delays and even timeouts for requests under high load.
    138122
    139 The Gateway is stable under maximum load and has a mean response time of 1.65 ms (Sensei Plugin including BinaryWS to ::1) using the Apache Benchmark tool with arbitrary numbers of concurrent clients. The Gateway core uses a single thread, and therefore does serial handling of requests.
     123The Gateway is stable under maximum load and has a mean response time of 1.65 ms (Sensei Plugin including CoAP to ::1) using the Apache Benchmark tool with arbitrary numbers of concurrent clients. The Gateway core uses a single thread, and therefore does serial handling of requests.
    140124