开发者

django - how to get model objects from another process instead of database

开发者 https://www.devze.com 2023-02-16 04:01 出处:网络
I have a TCP server, a Python app, that gets the information from the connected devices. This information I am trying to show using Django web app. So, basically my model objects reside within the TCP

I have a TCP server, a Python app, that gets the information from the connected devices. This information I am trying to show using Django web app. So, basically my model objects reside within the TCP server process. I can modify the TCP server to put the in开发者_StackOverflow中文版formation into SQLite database and have my Django web app take it from there. But, it is not the most natural way of sharing information in this case because this information is not persistent i.e. not suitable for database. When my TCP server exists, it has to clear this information.

How do I model this scenario using Django?


You may be able to serialise your model and pass the serialised data.


i think better to use `memcached (http://memcached.org/) in mem cached server and each server see this server

also you can serialize your data and send it like udp and other method

0

精彩评论

暂无评论...
验证码 换一张
取 消