ECG diagnosis for arrhythmia detection with a cloud-based service and a wearable sensor network in a smart city environment