Machine Learning for Edge Computing: Frameworks, Patterns and Best Practices