Cardiac arrhythmia is one of the most popular heart diseases that could lead to serious consequences. However, it is difficult for traditional electrocardiography (ECG) devices to capture arrhythmia symptoms during patients' hospital visits due to their intermittent occurrence nature. A few researchers recently propose continuous monitoring systems to address this problem. However, there are some practical issues which may hamper the system from being widely used, such as low efficiency, offline data acquisition and processing, and high energy consumption. To account for these challenges, in this paper, we develop a new cloud computing based architecture for realtime personalized cardiac arrhythmia detection and diagnosis. In order to reduce energy consumption on patients' mobile devices and enable realtime data processing, we outsource the computationally complex tasks to the cloud while having the lightweight tasks processed locally. The proposed online learning algorithms facilitate a personalized system. Moreover, we adopt clinical criteria for arrhythmia classification, which better prepares our system for practical use than previous systems. Simulations with data from the MIT-BIH database validate the efficiency and efficacy of our system.