iOS 应用程序中是否可以使用类似 MacFUSE 的功能?
我想在 iOS 应用程序中拥有虚拟文件,因此我可以使用 [NSData dataWithContentsOfURL:]
来拥有一个我没有的大表的 NSData (以及最终指向字节的指针)想要存储在磁盘上,而是在需要时计算部分内容。
欢迎任何其他方法来解决这个问题!
I'd like to have virtual files in an iOS app, so I can use [NSData dataWithContentsOfURL:]
to have a NSData (and a pointer to the bytes eventually) of a large table that I do not want to store on disk, but rather compute parts of when needed.
Any other approach to solving this problem is welcome!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我建议您不要将与“大”表的连接视为持久连接,而应将其视为可查询的服务。
我建议使用 REST 之类的东西,并且您的 iOS 应用程序会查询 REST 服务。
从长远来看,很多事情都变得非常灵活。
还允许您将大量逻辑集中在服务器端,这意味着您可以使用缓存技术来提高性能,这是您的 iOS 应用程序必须做的。
I would recommend rather than thinking of the connection to your "large" table as a persistent one, you should think of it as a queryable service.
I recommend the use of something like REST, and your iOS app queries the REST service.
In the long run makes lots of things really flexible.
Also allows you to centralise a lot of the logic on the server side, this means you can use caching techniques to improve performance, something your iOS app would have had to do.