Changes between Version 2 and Version 3 of NativeGateway
- Timestamp:
- Oct 19, 2010, 1:09:11 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
NativeGateway
v2 v3 1 1 = Gateway User Guide = 2 2 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 BinaryWSprotocol and eRAI/eRPI interfaces and full HTTP RAI/RPI to the SENSEI System.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 CoAP protocol and eRAI/eRPI interfaces and full HTTP RAI/RPI to the SENSEI System. 4 4 5 SENSEI System (RU, RD) <----http://nodeX/-----> SENSEI Gateway <------ bws://-----> WSAN Island (node1, node2 ...)5 SENSEI System (RU, RD) <----http://nodeX/-----> SENSEI Gateway <------coap://-----> WSAN Island (node1, node2 ...) 6 6 7 7 See the [wiki:Gateway Gateway Developer Guide] for more detailed information on building, features and development. 8 9 == Download the Package == 10 11 The 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] 8 14 9 15 == Running the Gateway == … … 53 59 Nodes 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). 54 60 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 bwsmessage POSTed to /rpi must contain the string:61 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 CoAP message POSTed to /rpi must contain the string: 56 62 57 63 {{{ … … 104 110 === eRAI Interface === 105 111 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 binaryWSrequest.112 Requests 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. 107 113 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 binaryWSrequest header. This feature is not yet supported.114 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 CoAP request header. This feature is not yet supported. 109 115 110 116 Sensor 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. 111 117 112 113 == Testing the Gateway ==114 115 Go to the binaryWS_test tool script directory:116 117 cd ../binaryWS_test/scripts118 119 First register a fake resource description with:120 121 ./rpi_client_publishRD.sh ::1122 123 You should see the plug-in receive the registration, then the Gateway will do124 an HTTP post automatically to the RD (currently over IPv4 to the RD running on125 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.exi130 131 You can make an RAI request from the gateway by going to e.g.132 133 http://localhost:8000/localhost/s/temp134 118 135 119 == Performance == … … 137 121 The 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. 138 122 139 The Gateway is stable under maximum load and has a mean response time of 1.65 ms (Sensei Plugin including BinaryWSto ::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.123 The 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. 140 124