在Django / Python中实时数据处理 [英] Realtime data processing in Django/Python

查看:547
本文介绍了在Django / Python中实时数据处理的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在开展涉及实时数据处理的项目。我们打算使用Django / Python。实际过程是:


  1. 成千上万个设备每秒可以获取4个样本(0,0.25,0.5,0.75),并持续发回到我们的Django服务器,基本上它们是时间戳和值的时间序列

  2. 我们需要根据时间戳(需要有毫秒精度)来对齐所有设备的样本,并且做一个简单的平均值所有时间系列

  3. 所有这些都需要实时完成(最长1秒延迟),并使用另一个线程发送。

我们正在研究RRDTool和scikits.timeseries,但它们没有毫秒的精度,因此它们无法对齐我们的时间序列。



只是想知道有没有任何工具/数据结构,我们可以使用Django / Python进行这种类型的实时数据处理。线程安全是重要的,因为发送结果将在另一个线程中完成。



提前感谢。

解决方案

您在python中的实时Web服务选项是: Twisted 龙卷风 Eventlet



您可以将这一切整合到Python / Django中。 该教程


We are working on a project involving realtime data processing. We plan to use Django/Python. The actual process is:

  1. Tens of thousands of devices take 4 samples per seconds (0, 0.25, 0.5, 0.75) and continuously send back to our Django server, basically they are time series with timestamp and value
  2. We need to align samples from all devices according to the timestamp (need to have milliseconds precision) and do a simple average of all the time series
  3. All these needs to be done in realtime (maximum 1 second delay) and send away using another thread

We are looking into RRDTool and scikits.timeseries, but they don't have the precision of milliseconds, so they couldn't align our time series.

Just wondering is there any tools/data structure we can use with Django/Python for this type of realtime data processing. And thread safe is important, as sending the result away will be done in another thread.

Thanks in advance.

解决方案

Your options for real time web services in python are: Twisted, Tornado and Eventlet

You can integrate all this to work with Python/Django. Tutorial on that.

这篇关于在Django / Python中实时数据处理的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆