An apparatus for managing clustering in a wireless sensor network, the apparatus comprising: a processor; and memory coupled with the processor, the memory comprising executable instructions that when executed by the processor cause the processor to effectuate operations comprising: receiving a list of parameters from a cluster profile registry, CPR, creating a profile of a cluster of devices associated with the apparatus based on the parameters, the cluster of devices communicating based on a current clustering algorithm; registering the profile of the cluster of devices with the cluster profile registry; characterized by: determining that a goal of the cluster has not been met, the goal of the cluster having been received from the CPR with the parameter list and in response to determining that the goal has not been met, compare the performance of current clustering algorithm and of a candidate clustering algorithm. based on comparing the performance, determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal; and in response to determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal, reconfiguring the cluster of devices using the candidate clustering algorithm. a processor; and memory coupled with the processor, the memory comprising executable instructions that when executed by the processor cause the processor to effectuate operations comprising: receiving a list of parameters from a cluster profile registry, CPR, creating a profile of a cluster of devices associated with the apparatus based on the parameters, the cluster of devices communicating based on a current clustering algorithm; registering the profile of the cluster of devices with the cluster profile registry; characterized by: determining that a goal of the cluster has not been met, the goal of the cluster having been received from the CPR with the parameter list and in response to determining that the goal has not been met, compare the performance of current clustering algorithm and of a candidate clustering algorithm. based on comparing the performance, determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal; and in response to determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal, reconfiguring the cluster of devices using the candidate clustering algorithm. receiving a list of parameters from a cluster profile registry, CPR, creating a profile of a cluster of devices associated with the apparatus based on the parameters, the cluster of devices communicating based on a current clustering algorithm; registering the profile of the cluster of devices with the cluster profile registry; characterized by: determining that a goal of the cluster has not been met, the goal of the cluster having been received from the CPR with the parameter list and in response to determining that the goal has not been met, compare the performance of current clustering algorithm and of a candidate clustering algorithm. based on comparing the performance, determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal; and in response to determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal, reconfiguring the cluster of devices using the candidate clustering algorithm. determining that a goal of the cluster has not been met, the goal of the cluster having been received from the CPR with the parameter list and in response to determining that the goal has not been met, compare the performance of current clustering algorithm and of a candidate clustering algorithm. based on comparing the performance, determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal; and in response to determining that the performance of the candidate clustering algorithm to meet the goal exceeds the performance of the current clustering algorithm to meet the goal, reconfiguring the cluster of devices using the candidate clustering algorithm.