Home Database Mysql Tutorial 为什么你不应该使用 MongoDB

为什么你不应该使用 MongoDB

Jun 07, 2016 pm 05:34 PM
mongodb database

我不构建数据库引擎,但搭建Web应用。每年我大约跑4-6个不同项目,所以我搭建了不少Web应用。我经历过有不同需求及不同的数据存储

免责声明:我不构建数据库引擎,但搭建Web应用。每年我大约跑4-6个不同项目,所以我搭建了不少Web应用。我经历过有不同需求及不同的数据存储需求的应用。我部署过你听说过或没听说过的的大部分数据存储。

我也有几次做出了错误的选择。这是一个关于其中一次的故事——原本我们为什么选择它,我们是如何发现它不合适,以及我们如何修复的。这一切都发生在一个开放源码的名为Diaspora的项目中。

Diaspora项目

Diaspora 是一个有着悠久历史的分布式社交网络。早在2010年初,纽约大学四名大学生创建了一个Kickstarter视频,目的是募集10000美元,耗费一个夏天来构建一个替代Facebook的分布式项目。他们将它发送给朋友和家人,并希望有最好的结果。

但他们触到了痛处。当时正好有另一起关于Facebook的隐私丑闻,当尘埃落定,回到他们的Kickstarter项目时,他们已经从6400个不同的人那里筹集了超过200000美元,而同时这个软件项目,却连一行代码都还没有写出来。

Diaspora是第一个大大超越其目标的Kickstarter项目。其结局是,他们的项目新闻被刊登于纽约时报——但它变成了一个丑闻,,因为团队照片的背景黑板上面有一个肮脏的笑话,直到最终印刷都没有人注意到这一点。这可是刊登在纽约时报!这个事件的余波实际上是我第一次听说到这个项目。

他们在Kickstarter上成功的结果,是离开学校,来到San Francisco开始写代码。他们最后在我的办公室工作。那时我在Pivotal实验室工作,他们的一个哥哥也在那工作,所以Pivotal给他们提供了免费的办公空间、网络,当然,装有啤酒的冰箱。我白天和官方客户工作,下班后和他们一起玩,周末贡献代码。

他们最后在Pivotal待了两年多的时间。虽然只是在第一个暑假的结尾,他们已经有了一个最小化的,但已经可以使用(在某种意义上说)的一个分布式社交网络,以Ruby on Rails实现,后端用MongoDB。

这里有很多流行词汇,让我们把它分解来看。

“分布式社交网络”

如果你看过《社交网络》,你就知道了所有你需要知道的关于Facebook的事。它是个web应用,它在一个单逻辑服务器上运行,它可以让你与朋友保持联系。一旦你登录,Diaspora的界面在结构上与Facebook很相似:

Diaspora用户界面的截图

在中间有个信息流,显示你所有朋友发布的信息,在边上有一些其他随机的基本没人关注过的东西。Diaspora和Facebook主要的技术差异在于对终端用户的不可见性:它是“分布的”部分。

MongoDB 的详细介绍:请点这里
MongoDB 的下载地址:请点这里

相关阅读:

MongoDB备份与恢复

CentOS编译安装MongoDB

CentOS 编译安装 MongoDB与mongoDB的php扩展

CentOS 6 使用 yum 安装MongoDB及服务器端配置

Ubuntu 13.04下安装MongoDB2.4.3

如何在MongoDB中建立新数据库和集合

MongoDB入门必读(概念与实战并重)

《MongoDB 权威指南》(MongoDB: The Definitive Guide)英文文字版[PDF]

linux

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MySQL: Simple Concepts for Easy Learning MySQL: Simple Concepts for Easy Learning Apr 10, 2025 am 09:29 AM

MySQL is an open source relational database management system. 1) Create database and tables: Use the CREATEDATABASE and CREATETABLE commands. 2) Basic operations: INSERT, UPDATE, DELETE and SELECT. 3) Advanced operations: JOIN, subquery and transaction processing. 4) Debugging skills: Check syntax, data type and permissions. 5) Optimization suggestions: Use indexes, avoid SELECT* and use transactions.

MySQL: An Introduction to the World's Most Popular Database MySQL: An Introduction to the World's Most Popular Database Apr 12, 2025 am 12:18 AM

MySQL is an open source relational database management system, mainly used to store and retrieve data quickly and reliably. Its working principle includes client requests, query resolution, execution of queries and return results. Examples of usage include creating tables, inserting and querying data, and advanced features such as JOIN operations. Common errors involve SQL syntax, data types, and permissions, and optimization suggestions include the use of indexes, optimized queries, and partitioning of tables.

Why Use MySQL? Benefits and Advantages Why Use MySQL? Benefits and Advantages Apr 12, 2025 am 12:17 AM

MySQL is chosen for its performance, reliability, ease of use, and community support. 1.MySQL provides efficient data storage and retrieval functions, supporting multiple data types and advanced query operations. 2. Adopt client-server architecture and multiple storage engines to support transaction and query optimization. 3. Easy to use, supports a variety of operating systems and programming languages. 4. Have strong community support and provide rich resources and solutions.

Use Composer to solve the dilemma of recommendation systems: andres-montanez/recommendations-bundle Use Composer to solve the dilemma of recommendation systems: andres-montanez/recommendations-bundle Apr 18, 2025 am 11:48 AM

When developing an e-commerce website, I encountered a difficult problem: how to provide users with personalized product recommendations. Initially, I tried some simple recommendation algorithms, but the results were not ideal, and user satisfaction was also affected. In order to improve the accuracy and efficiency of the recommendation system, I decided to adopt a more professional solution. Finally, I installed andres-montanez/recommendations-bundle through Composer, which not only solved my problem, but also greatly improved the performance of the recommendation system. You can learn composer through the following address:

What is the CentOS MongoDB backup strategy? What is the CentOS MongoDB backup strategy? Apr 14, 2025 pm 04:51 PM

Detailed explanation of MongoDB efficient backup strategy under CentOS system This article will introduce in detail the various strategies for implementing MongoDB backup on CentOS system to ensure data security and business continuity. We will cover manual backups, timed backups, automated script backups, and backup methods in Docker container environments, and provide best practices for backup file management. Manual backup: Use the mongodump command to perform manual full backup, for example: mongodump-hlocalhost:27017-u username-p password-d database name-o/backup directory This command will export the data and metadata of the specified database to the specified backup directory.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

MySQL vs. Other Databases: Comparing the Options MySQL vs. Other Databases: Comparing the Options Apr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How to encrypt data in Debian MongoDB How to encrypt data in Debian MongoDB Apr 12, 2025 pm 08:03 PM

Encrypting MongoDB database on a Debian system requires following the following steps: Step 1: Install MongoDB First, make sure your Debian system has MongoDB installed. If not, please refer to the official MongoDB document for installation: https://docs.mongodb.com/manual/tutorial/install-mongodb-on-debian/Step 2: Generate the encryption key file Create a file containing the encryption key and set the correct permissions: ddif=/dev/urandomof=/etc/mongodb-keyfilebs=512

See all articles