具有低或零服务器端后端开销的持久网站数据存储技术设置?
我希望构建一个动态网站,而不需要引入太多额外的服务器端代码/应用程序,并且需要一些持久性和可扩展性。将被存储、显示、编辑的动态信息跨页面加载显示。我想尝试一些使用成熟的 php+数据库后端的替代方案,数据库是理想的,但我只使用 php 作为单个脚本来存储 json 数据,并期望运行完整的-fledged php apache mod 为此目的是矫枉过正。
例如,我想要: 一个 html 页面 -->通过 JavaScript 加载一些消息数据(例如“Killroy 在这里。”) -->管理员可以通过 js 对其进行编辑(“roy was here”) -->公共用户可以离开该页面,并使用不同的浏览器返回该页面 -->并且消息将重新填充到更改后的状态(“roy was here”)
理想情况下,json 数据将存储在免费的外部服务上(亚马逊 ec2 或其他服务?谷歌应用程序引擎?我不知道可用于此目的的是什么) ),或应用程序和服务器端存储数据的数据库将很简单并且可以快速设置。
那么有哪些方法可以实现这些目标呢?
I'm looking to build a dynamic website without bringing much extra server-side code/apps into the picture, and need some persistent & dynamic information that would be stored, displayed, edited, & displayed across page loads. I'd like to try some alternatives to using a full-fledged php+database back-end, a database is ideal, but I'd only be using the php for a single script for storing json data, and expect that running the full-fledged php apache mod for that purpose is overkill.
So for example, I want to have:
an html page
--> that loads some message data via javascript (e.g. "Killroy was here.")
--> Which can be edited by an admin, via js ( "roy was here" )
--> The page can be left, and returned to with a different browser, by a public user
--> and the message would repopulate to the changed state ("roy was here")
Ideally the json data would be stored either on a free external service (amazon ec2 or something? google app engine? I have no idea what might be available for this purpose), or the app & database for storing the data server side would be simple and have quick setup.
So what ways are there to acheive those goals?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看看 node.js,也许这就是您正在寻找的东西。简而言之,它是一个在服务器上使用 JavaScript 的事件驱动 I/O 框架。
添加:
CouchDB 是一个面向文档的数据库,具有 RESTful JSON API,可以通过简单的 HTTP 请求进行访问。这听起来有点像您正在寻找的,但仍然有服务器端实现。
Have a look at node.js, maybe that's what you're looking for. In short words it's an event driven I/O framework using JavaScript on the server.
Addition:
CouchDB is a document-oriented database with a RESTful JSON API that can be accessed by simple HTTP-requests. That sounds a bit like what you are seeking, but still has server side implementation.