最佳做法:如何保存“长期有效数据"程序启动之间. [英] Best practice: How to save "long-living data" between programm starts.

查看:76
本文介绍了最佳做法:如何保存“长期有效数据"程序启动之间.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿.
我一直想知道,其他人对保存数据有何看法.
你有什么建议吗?保存到二进制文件,数据库,其他类型的保存吗?

对于此应用程序,我每用户一次通过API获得令牌,并且可以随意使用它.
我认为每台计算机的最大用户数量(我必须保存的用户/令牌对)将为10个用户,所以不是很高.

谢谢您的帮助!

Hey there.
I always wanted to know, what other people think about saving data.
What do you recommend? Saving to binary files, database, other types of saving?

For this application, I get a token by an API per user ONE time and I can use it as long as I want.
I think the maximum amount of user per machine (the user/token-pairs I have to save) will be 10 users, so not very high.

Thanks for helping!

推荐答案

老实说,这将由您的应用程序要求决定.用户是否在应用程序中请求令牌?它是由管理员提供的吗?永远与该用户链接吗?如果计算机被清除并重建,他们是否需要恢复该令牌?如果丢失了新令牌,他们可以要求新令牌吗?等等,等等...

这些问题的答案以及可能更多的答案决定了存储在哪里.
Honestly, this would be dictated by your application requirements. Does the user request the token in the app? Is it supplied by an administrator? Is it forever linked to that user? Do they need to recover THAT token if the machine is wiped out and rebuilt? Can they request a new token if it''s lost? Blah, blah, blah, ...

Where you store it would be dictated by the answers to those questions, and possibly more.


这篇关于最佳做法:如何保存“长期有效数据"程序启动之间.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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