1.2.4. Fiware Node¶
This kind of node interacts with the FIWARE context broker in order to handle inference data. It provides mechanisms to read data from a context broker entity, request inference from an Inference Node, and send the inference to the context broker entity. To facilitate the inference requests, the Fiware Node includes an Edge Node.
1.2.4.1. Steps¶
Create a new
FiwareNodeobject with at least aname, aserver_ipand aserver_port.Start the Flask server.
server_ip = '192.168.1.1'
server_port = 1028
# Create a new Fiware Node
node = FiwareNode(name='My_Fiware_Node',
server_ip=server_ip,
server_port=server_port,
context_broker_ip='localhost',
context_broker_port=1026,
entity_id='ID_entity',
entity_data='data',
entity_solution='inference',
domain=0,
logger=CustomLogger(logger_name='FiwareNode', log_level=logging.WARNING))
# Start the Flask server
fiware_node.run()