关于NoSQL,先上一段笑话:“Big data is like teenage sex: everyone talks about it, nobody really knows how to do it, everyone thinks everyone else is doing it, so everyone claims they are doing it.” Big Data和NoSQL紧密相连,Big Data为甚?目前我没有多少理解和认识,所以先来看看NoSQL,在NoSQL Database上的定义和介绍:
NoSQL DEFINITION: Next Generation Databases mostly addressing some of the points: being non-relational, distributed, open-source and horizontally scalable.
The original intention has been modern web-scale databases. The movement began early 2009 and is growing rapidly. Often more characteristics apply such as: schema-free, easy replication support, simple API, eventually consistent / BASE (not ACID), a huge amount of data and more. So the misleading term “nosql” (the community now translates it mostly with “not only sql”) should be seen as an alias to something like the definition above.
关于常见NoSQL产品的比较见Main NoSQL Database Comparison;若果需要一些NoSQL的理论知识和基本概念,见The NoSQL Ecosystem、Big Data与NoSQL。目前仅用过MongoDB和Redis。
MongoDB:如果熟悉SQL,MongDB的学习成本会很低;相关资料见Python Language Center in MongoDB;用过的两个驱动:1)PyMongo,提供了类似Mongo Shell的接口;2)MongoEngine: A Python Object-Document-Mapper for working with MongoDB,即MongoDB的’ORM’框架,此时变成了’ODM’,MongoEngine on Github。
Redis:Redis需要一些学习成本,入门推荐The Little Redis Book;用过的Python客户端驱动Redis-py;更多客户端见Redis Clients。
NoSQL建模:SQL发展了几十年,有很成熟的建模技术,那么NoSQL呢,见陈皓:NoSQL数据建模技术,原文NoSQL Data Modeling Techniques。
更多资料:NoSQL英文站点见NoSQL Database;NoSQL中文论坛见NoSQL Fan:关注NoSQl相关的新闻和技术。NoSQL Fan中,MongoDB和Redis资料很多,已经形成了资料专题,包括介绍、内部实现、应用与优化、新闻等,总能发现你想要的东西:1)NoSQL Fan:Redis资料汇总专题;2)NoSQL Fan: MongoDB资料汇总专题。
Python的Web框架众多,见Web Frameworks for Python,总有一款适合你或你的项目,实在不行,请动手打造自己的框架;为什么会有这么多框架呢,见Why so many Python wen frameworks?。
Web.py:已故Aaron Swartz的框架。一句话介绍”web.py is a web framework for Python that is as simple as it is powerful. web.py is in the public domain; you can use it for whatever purpose with absolutely no restrictions.”。接触的第一个Web框架,后来模仿MovableType,写了一个简单的博客,见Blog on Github,在线demo ;碰到的坑点是模板中嵌套Python代码一直有缩进问题。
Flask:一句话介绍”Flask is a lightweight web application framework written in Python and based on the Werkzeug WSGI toolkit and Jinja2 template engine. It is BSD licensed. Flask is called a microframework because it keeps the core simple but extensible”。因为工作变动,练习过一段时间的Flask,以便熟悉开发的工具链;如果没有Rails,我想这才是自己首选的Web开发框架: simple but extensible and for fun。实战教程The Flask Mega-Tutorial。
Tornado:来自FriendFeed的异步框架,FriendFeed被Facebook收购后开放了源代码,见Tornado on Github。一句话介绍”Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed”。Tornado主要特点是non-blocking,如果你想开发real-time的Web应用,Tornado是一个不错的选择。
Django:一句话介绍”Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.”,接触不多,作为全栈式框架,听说它的组件都是Made in Django。更多资料见Django资料。
Published
23 November 2013
Categories