The problem of task allocation in the Internet of Things and the consensus-based approach
service oriented middleware for the internet of things : a perspective - ( invited paper ) .