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 HFSS 中的 H 场图与 MATLAB 中绘制的 B1 场 部分对应不上
  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?