1. A method for cross-layer cross-node optimization in a wireless network having a plurality of nodes, the method comprising: a) sensing network conditions and/or events at one or more of the plurality of nodes; b) determining, using a set of network objectives, an optimal distribution of functions among the plurality of nodes based on the sensed network conditions and/or events; and c) distributing functions among the plurality of nodes according to the determined optimal distribution of functions, thereby optimizing the network for said set of network objectives.