dongmei2957 2013-04-14 14:11
浏览 46
已采纳

如何从外部网站连接到Azure的数据存储?

I'm new to the whole idea of cloud programming to store information connected to mobile/web/applications. I've been reading through tutorials and Microsoft seems to have done a good job tying everything together and making it fairly simple to adapt for your purposes.

However, all tutorials assume you will be using every aspect of your application from Microsoft's Azure (website, mobile services, data storage, database etc.).

I'm wondering if anybody knows of an example I can use to see how to connect an external website (one not hosted on Microsoft Azure) to their Data Storage (on Azure)? What do the connection strings look like? Most importantly, how do you add the libraries/classes to the external server?

i.e.

  • user makes changes to record/entity on www.example.com (php)
  • www.example.com connects to data storage on Windows Azure
  • record/entity is update/inserted

It seems like there should be a fairly easy solution to this, or maybe I'm missing something?

Thanks for any help!

  • 写回答

1条回答 默认 最新

  • douhao5280 2013-04-14 14:21
    关注

    Microsoft's cloud offering (Azure) consists of different components which can be used to store data.

    SQL Azure databases behave just like every other MS SQL Server database. Their scalability and flexibility is completely abstracted and you should be fine using any PHP+MSSQL sample or the normal documentation. In terms of connection strings: They also work as expected and for most scenarios you do not have to do anything different. This minimal sample shows how to use SQL Azure from PHP. You can just ignore the first part setting up the Azure application. You should be able use the same php code snippet from any other hosting scenario (e.g. Apache+PHP on Linux). If you have issues connecting you might want to have a look at the allowed ip addresses configuration of your server in the Azure management portal and allow the IP of your external server/hoster.

    Azure storage (Blobs, Queues, Tables) are basically simpler means of storing data. You can use it through the azure sdk for php and have a look at the samples. Most of this article should apply to your scenario as well. Storage is cheaper for many scenarios compared to using a SQL database.

    So to sum up: You don't have to to anything "special" for your scenario. Just use SQL Azure like any other database. Simply store files in Azure blobs.

    As for any application spanning multiple data-centers: Be aware of latency. Round-trips to the database/storage will be more expensive (in terms of performance) than when hosting everything at one site. This can be a significant performance bottleneck depending on your application.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀