Azure、同步框架和访问控制服务:结合使用这些技术是否存在明显的缺点或问题?

发布于 2024-11-25 02:17:03 字数 466 浏览 2 评论 0原文

我有一个桌面应用程序,它使用平面文件(一些 xml 和小图片)作为数据。我希望这些数据可以在安装了桌面应用程序的其他电脑上使用,并且也可以由智能手机客户端(目前是 WP7)使用。

用户应该很容易同步这些数据。他应该能够使用他已经拥有的帐户(实时登录、Googlemail、Facebook,...)。

我考虑过使用 Azure Blob 存储将数据保存在 Azure 中,同步框架执行实际同步,并使用访问控制服务来处理身份验证。

我以前没有使用过任何这些技术,所以任何建议都会很好,但我首先正在寻找这个策略中我还没有看到的错误或缺点。这种方法到底可行吗?

I have a desktop application which uses flat files (some xml and small pictures) as data. I want this data to be available on other PCs which have the desktop application installed and usable by a smartphone client (WP7 at the moment) as well.

The user should have it very easy to synchronize this data. He should be able to use accounts he already possesses (Live-Login, Googlemail, Facebook,...).

I thought about using Azure Blob Storage to save the data in Azure, the Sync Framework to perform the actual synchronization and the Access Control Service to handle authentication.

I have not used any of this technologies before so any advice would be great but I'm searching foremost for errors or shortcomings in this strategy I don't see yet. Is this approach viable at all?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

£噩梦荏苒 2024-12-02 02:17:03

Windows Azure 基本上是一个虚拟化数据中心。它复杂而复杂,面向那些不想拥有服务器基础设施或硬件的公司。

如果我理解正确的话,你想要的是一个云文件服务器,而不是整个局域网。 Windows SkyDrive 很好地满足了这一要求,并为每位会员免费提供 25GB 的存储空间。

关于 Hotmail 和 Windows Live 人们经常混淆 Hotmail 和
Windows Live,因为当您设置 Hotmail 帐户时,它会使用
Windows Live 进行身份验证,因此您最终会得到
Windows Live 帐户和所有相关设施,包括
网盘。但是,完全可以设置 Windows Live
使用任何电子邮件地址作为用户名的帐户。

如果您这样做,请务必注意 Windows Live
与给定电子邮件地址关联的密码完全
与托管邮件服务器所需的密码无关
帐户的邮件。这可能会给用户带来很大的困惑。
对于 Hotmail(或使用 Windows Live 的任何其他邮件服务器)
身份验证)保证它们是相同的密码。

SkyDrive 没有官方的 Microsoft 框架支持。有一个名为 SkyDriveApiClient 的开源项目,但它仅适用于完整的 .NET 框架。我尝试移植它,但作者有点像建筑宇航员,而且它绝对充满了 WP7x 上不可用的 [Serializing]。

WP7 人员表示,WP7 框架可能会包含对 SkyDrive 的支持,但 Mango (WP7.1) 中不会包含支持,并且考虑到 Microsoft 的典型发布周期是 18 个月,而 Mango 尚未上市,我想说这将是两年后您就可以依靠 WP7 的内置云文件服务。

自己动手并不难,WCF 服务从 WP7 开始就非常容易使用。但这并不是真正的云,因为您必须自己提供和维护服务器基础设施。出于这个原因,并考虑到 MS 的时间表,我投入了大量的精力来为 WP7 制作自己的 SkyDrive 客户端。核心功能已完成,我现在正在重构、提高稳健性并添加性能增强功能,例如令牌的本地缓存(本质上是 cookie)。我不打算发布它;我计划了许多依赖于此功能的应用程序,这很适合我,因为存在很大的竞争障碍。

我告诉你这些不是为了逗你。我的观点是,我确信 SkyDrive 是正确的答案,因此我投入了大量的工作来实现它。

  • 云文件存储非常适合移动设备。
  • 对于个人想要的手机应用程序来说,Azure 并不是一个好的答案,因为数据存储不是以需要索引或支持高并发性的方式共享的,
  • 我当然可以想到企业手机应用程序将受益于使用 SQL Server 作为存储
  • Azure可以提供文件服务,但它代表了持续的费用。当谷歌和微软都放弃基于网络的云存储时,没有人会忍受这一点。
  • 我可以亲自证明,如果您有决心,可以从 WP7 使用 SkyDrive。
  • 云存储是您以编程方式获取由用户的移动设备和计算机共享的存储的唯一方法。我打算做的依赖于共享存储的事情之一是编写一个 Silverlight 应用程序,让您可以在台式计算机上准备具有多个航点的地图路线,以及在 WP7 上使用它们的配套应用程序。

Windows Live 团队发布了他们所谓的对 WP7 的支持。他们提供了一个示例项目,向您展示如何实例化浏览器对象并加载其登录页面并操作它们登录并使用其 javascript API 来操作 SkyDrive。

这有一个很大的优点:浏览器 cookie 和缓存的凭据。缺点是显而易见的;尽管存在技术缺陷,Windows Live 团队似乎认为人们唯一想要用手机做的事情就是标记照片和摆弄社交媒体。

我已经完成了我自己的图书馆。他们不支持社交媒体上的大部分废话。我将 SkyDrive 视为云文件系统,提供

  • Authenticate(username, password)
  • CreateFolder(folderpath[,blocking=false])
  • Delete(fileOrFolderPath[,blocking=false])
  • SaveString(filepath, value[,blocking) =false])
  • LoadString(filepath)

我可以处理二进制文件,但 Convert.ToBase64 使这变得不必要,并且字符串对于 XML 来说很方便。 CreateFolder、Delete 和 SaveString 可以选择阻塞。 LoadString 始终是阻塞的,因为它是一个返回加载字符串的函数。 CreateFolder 是递归的,因此您可以在一次调用中创建整个路径(例如 /folder1/folder2/folder3)。在预先存在的路径上调用 CreateFolder 没有任何效果,并且 SaveString 使用 CreateFolder 来确保路径有效,从而无需提前创建文件路径。身份验证将文件系统(文件内容除外)加载到内存中,从而消除服务器的干扰。这是异步的,FileSystemReady 事件会宣布文件系统何时完全加载。当您添加和删除文件和文件夹时,模型会得到维护。

这是一项大量工作,而且没有人回应我将其变成开源项目的尝试,因此我不打算放弃我的劳动成果,但前提是您的计划不存在竞争和我一起,我可以被说服做出安排。

Windows Azure is basically a virtualized datacentre. It is elaborate and complicated and is pitched at corporations who don't want to own their server infrastructure or hardware.

If I understand correctly, what you want is a cloud fileserver, not a whole LAN. Windows SkyDrive fulfils this requirement nicely and offers 25GB of storage per member with no charge for membership.

About Hotmail and Windows Live People often confuse Hotmail and
Windows Live, because when you set up a Hotmail account it uses
Windows Live for authentication and therefore you end up with a
Windows Live account and all the associated facilities, including
SkyDrive. However, it is entirely possible to set up a Windows Live
account using any email address as the username.

If you do this, it is important to be aware that the Windows Live
password associated with a given email address is completely
independent of the password required by the mail server that hosts
mail for the account. This can cause a great deal of user confusion.
For Hotmail (or any other mail server that uses Windows Live for
authentication) they are guaranteed to be the same password.

There is no official Microsoft framework support for SkyDrive. There is an open source project called SkyDriveApiClient, but it only works with the full .NET framework. I tried porting it but the author was a bit of an architecture astronaut, and it is absolutely riddled with [Serializable] which is not available on WP7x.

The WP7 guys have said that the WP7 framework will probably include support for SkyDrive but not in Mango (WP7.1) and given that Microsoft's typical release cycle is 18 months and Mango has yet to hit the streets, I'd say it will be two years before you can count on intrinsic cloud file services for WP7.

Roll-your-own wouldn't be hard, WCF services are dead easy to use from WP7. But that's not really cloud since you have to provide and maintain the server infrastructure yourself. For this reason and given the MS timetable, I have put a great deal of effort into producing my own SkyDrive client for WP7. Core functionality is complete and I am now refactoring, improving robustness and adding performance enhancements like local cacheing of tokens (cookies, essentially). I don't intend to release it; I have a number of apps planned that depend on this functionality and it suits me fine that there is a substantial barrier to competition.

I didn't tell you that to tease you. My point is that I'm so sure SkyDrive is the right answer that I put a lot of work into making it happen.

  • Cloud file storage is a perfect fit for mobile devices.
  • Azure is not a good answer for the sort of phone apps individuals want because the data store isn't shared in a way that required indexing or supports high levels of concurrency
  • I can certainly think of corporate phone apps that would benefit from using SQL Server as storage
  • Azure can do file services but it represents an ongoing expense. Nobody's going to put up with that when Google and Microsoft both give away web based cloud storage.
  • I can personally attest that if you're determined, it is possible to use SkyDrive from WP7.
  • Cloud storage is the only way you're going to get programmatically accessible storage that's shared by your user's mobile device and his computer. One of the things I intend to do that depends on shared storage is write a Silverlight app that lets you prepare map routes with multiple waypoints on a desktop computer and a companion app that uses them on WP7.

The Windows Live team has released what they call support for WP7. They supply a sample project showing you how to instantiate a browser object and load their login pages and manipulate them to log in and use their javascript API to manipulate SkyDrive.

This has one big advantage: browser cookies and cached credentials. The disadvantages are obvious; technical shortcomings notwithstanding the Windows Live team seems to think the only thing people want to do with a phone is tag their photos and fiddle with social media.

I have finished my own libraries. They do not support most of the social media twaddle. I have treated SkyDrive as no more or less than a cloud file system, providing

  • Authenticate(username, password)
  • CreateFolder(folderpath[, blocking=false])
  • Delete(fileOrFolderPath[, blocking=false])
  • SaveString(filepath, value[, blocking=false])
  • LoadString(filepath)

I could handle binaries but Convert.ToBase64 makes this unnecessary and strings are convenient for XML. CreateFolder, Delete and SaveString are optionally blocking. LoadString is always blocking because it's a function that returns the loaded string. CreateFolder is recursive so you can create an entire path in one call (eg /folder1/folder2/folder3). Calling CreateFolder on a pre-existing path has no effect, and SaveString uses CreateFolder to ensure the path is valid, making it unnecessary to create a filepath in advance. Authenticate loads the file system (except file content) into memory eliminating server chatter. This is asynchronous and a FileSystemReady event announces when the file system is completely loaded. The model is maintained as you add and remove files and folders.

This was a lot of work and no one reponded to my attempt to make it an open source project so I'm not inclined to give the fruits of my labour away, but provided your plans don't compete with mine I could be persuaded to come to an arrangement.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文