新浪sae不支持写操作,需要移植代码!

  • 时间:2013-01-16 18:20:06
  • 分类:网络文摘
  • 阅读:124 次

   为什么要移植代码

   SAE禁止IO写操作,代码目录不能写入。这意味着普通程序的上传图片、生成缓存等操作都不能在SAE上正常运行,这时候你需要对这些代码进行修改后才能让你的程序运行在SAE上。

   SAE为什么要禁止IO写操作?
   SAE采用分布式架构设计, 应用代码将部署在多台前端服务器上, 每次访问请求可能到达不同服务器。
     假设现在有A、B、C、D四台服务器。用户上传一张图片到A服务器,第二次访问请求可能到达B服务器,此时将无法获取保存在A服务器上的图片。
     SAE使用MemcacheX、Storage等存储型服务代替传统IO操作,效率比传统IO读写操作高,有效解决因IO瓶颈导致程序性能低下的问题。
     另外,很多网站被攻击都是因为服务器有写的权限,程序代码能被黑客修改,SAE禁止写操作,也提升了服务器的安全性。
     所以SAE为了提升性能和安全,禁止本地IO写操作。开发者可以使用Storage,Memcache,KVDB等服务存储需写入的数据。

推荐阅读:
Algorithms to Compute the Largest Time for Given Digits  How to Use Hash Map to Count the Frequencies of Values and Itera  Ordered Three 2TB WD HDD to prolong the life expectancy of HPZ80  HPZ800 Server Does Not Support Hard Drives Larger Than 2TB  Fresno Blogger Changing The Vegan Blogging Scene  Russian ‘Pokemon Go’ Blogger Goes On Trial  Starting a Blog? 5 Topics People Care About in 2017  6 Strategies To Grow Your Facebook Page  5 Sure Shot Content Marketing Trends to Follow  7 Ways for Your Underdog Blog to Beat the Competition 
评论列表
添加评论