An Adaptable, Fog-Computing Machine-To-Machine Internet Of Things Communication Framework