Research Article

A Multidomain Standards-Based Fog Computing Architecture for Smart Cities

Listing 1

Example of a POST request to create a new context entity representing a gas pipeline sensor. The entity consists of a type, an identifier and a set of context attributes (i.e. pressure, gas_velocity, gas_density and location), each of which is defined by a value, type and additional metadata.
POST http://CepheusBrokerAddress:1026/v2/entities
"type": "gas_pipeline_sensor",
"id": "101615A",
"pressure":
"value": 50,
"type": "double",
"metadata":
"unit":
"value": "bar"
}
}
},
"gas_velocity":
"value": 20.89,
"type": "double",
"metadata":
"unit":
"value": "m/s"
}
}
},
"gas_density":
"value": 0.743,
"type": "double",
"metadata":
"unit":
"value": "Kg/m3"
}
}
},
"location":
"value": "41.3763726, 2.1864475",
"type": "geo:point",
"metadata":
"crs":
"value": "WGS84"
}
}
}
}