在memcached中,您可以将List作为值。你能在 beanstalkd 中放一个列表吗?
事实上,我想用它来记录。 我想把一本字典放入 beanstalkd 中。
每当有人进入我的网站时,我都想在 beanstalkd 中放入一本字典,然后每天晚上,我都想要一个脚本来获取所有作业并将它们粘贴到数据库中。
这将使事情变得快速而简单。
Actually, I would like to use this for logging.
I want to put a dictionary into beanstalkd.
Everytime someone goes into my website, I want to put a dictionary into beanstalkd, and then every night, I want a script that will get all the jobs and stick them in the database.
THis will make it fast and easy.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以对 beanstalk 中每个作业的大小设置较大的上限(> 2MB),但此时性能似乎确实会受到不利影响。如果字典的大小很大,您可能希望将实际字典存储在 SQL 表中,并将该行的 ID 存储在作业中,然后让工作程序在获取具有相关 ID 的作业时检索 SQL 行。
You can have a large upper limit on the size of each job in beanstalk (>2MB) but performance does seem to be adversely affected at that point. If the size of the dictionary is large you probably want to store the actual dictionary in a SQL table and store the ID of that row in the job, then have the worker retrieve the SQL row when it grabs the job that has the correlated ID.