An N-Tier Fog Architecture for Smart Farming