CAKEphp, Node.js, MongoDB, how to solve it
CAKEphp, Node.js, MongoDBThe three technologies of CAKEphp, Node.js and MongoDB As a beginner, I hope you can share with me some good learning websites or books, thank you! node.js Share to: ——Solution——————– Quote: Download the mongoDB installation package on WindowsXP? It can be downloaded from its official website. If it supports XP, it can be installed as a service or started using a command. Document: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ Step by step, very simple. ——Solution——————–Learn and help Top…
CAKEphp, Node.js, MongoDB, how to deal with it
CAKEphp, Node.js, MongoDBThe three technologies of CAKEphp, Node.js and MongoDB As a beginner, I hope you can share with me some good learning websites or books, thank you! ——Solution——————– Quote: Download the mongoDB installation package on WindowsXP? It can be downloaded from its official website. If it supports XP, it can be installed as a service or started using a command. Document: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ Step by step, very simple. ——Solution——————–Learn and help Top…
MongoDB, Java and Object Relational Mapping
Introduction to MongoDB There are many strong competitors in the NoSQL field today who deal with massive data problems in a variety of ways. One of the important solutions is MongoDB. MongoDB is a document-oriented weakly structured storage solution that uses JSON format to display, query and modify data. MongoDB is well documented and scaling is as easy as installing. It provides conceptual support such as redundancy, slicing, indexing, and map/reduce. MongoDB’s open source community is very large and active. MongoDB is actually used in many large products, such as: Disney, Craigslist, Foursquare, Github and SourceForge. MongoDB is an open source project built and maintained by 10gen.com, a company founded by former DoubleClick executives. At the same time, 10gen also provides excellent business support and participation in construction. MongoDB vs. NoSQL: Pitfalls and Advantages MongoDB has many advantages as an available NoSQL solution. I just started to get in touch with nosql database and learned about a series of Java-based solutions, and spent a lot of time understanding what a column family is, the relationship between Hadoop and HBase, and what ZooKeeper is. When I finally understood everything, I found that Cassandra and HBase are indeed very reliable and trustworthy…
MongoDB, Java and ORM
Introduction to MongoDB There are many competing NoSQL products. They use different methods, but they all solve big data problems well. MongoDB is one of the very good products. MongoDB is a document-oriented, Schema-free storage solution that uses JSON-style documents to display, query, and modify data. MongoDB has extensive documentation, is simple to install and set up, and is easy to extend. It supports well-known concepts such as replication, sharding, indexing, and Map/Reduce. The MongoDB open source community is large and active. MongoDB is proud to have been deployed in large, high-traffic production environments including Disney, Craigslist, Foursquare, Github, and SourceForge. MongoDB is an open source project created and maintained by 10gen.com, a company founded by former DoubleClick executives. In addition to actively participating in community support, 10gen also provides commercial support. Advantages and Disadvantages of MongoDB and NoSQL As a NoSQL solution, MongoDB has the advantage of being easy to get started with. When I first delved into NoSQL databases, and tried many Java-based solutions, I found that it was difficult to figure out what a column family was. family), what is the relationship between Hadoop and HBase, and what is ZooKeeper? It is very time-consuming. When I finally…
MongoDB, HandlerSocket and MySQL performance testing
1. Test environment 1. Test server status A total of 4 test servers are involved: Stress test server Web server MongoDB server MySQL server. The machine configuration is: CPU: Intel(R) Core(TM)2 Duo CPU E7200 @ 2.53GHz RAM: 8G DDR2 667 Disk: SATA Operating system: Redhat 5.5 1. Stress test server Install Webbench 1.5 and use Webbench to pressure the Web server. 2. Web server Nginx 0.8.54 + PHP 5.3.3 (php-fpm), the php driver with Mongodb and HandlerSocket installed. The PHP driver of Mongodb is: mongodb-mongo-php-driver-1.1.1-19-gc584231.tar.gz The php driver of HandlerSocket is: php-handlersocket-0.0.7.tar.gz Call Mongodb and HandlerSocket through Php program. 3. MongoDB server MongoDB version: 1.6.5 4. MySQL server MySQL version: 5.1.53 HandlerSocket version: 1.0.6-60-gf51e061 MySQL storage engine: Innodb, adjusted the Thread Pool Size of innodb to 2G 2. Test program and test data extraction 1. In order to avoid opening the connection and the HTTP server from becoming a bottleneck, the test program was set to share the same connection for every 1,000 requests, and was set to perform 1,000 data requests for each page request. 2. The test data includes data on QPS, CPU, IO, etc., from the commands provided by the operating system (such as vmstat, iostat, etc.)…
CAKEphp, Node.js, MongoDB
node.js CAKEphp, Node.js, MongoDB? Three? Technology? Beginner, I hope you can share with me some good learning websites or books, thank you! Reply to discussion (solution) Documents from respective official websites are the best Download the mongoDB installation package on WindowsXP? Download the mongoDB installation package on WindowsXP? It can be downloaded from its official website. If it supports XP, it can be installed as a service or started using a command. Document: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-windows/ Step by step, very simple.
How to connect Python to MySQL, MongoDB, Redis, memcache and other databases
I have been writing scripts in Python for some time, and I often operate databases (MySQL). Now I will sort out the operations on various databases. If there are new parameters later, I will add them in and gradually improve them. 1. Python operation MySQL: For details, see: [apt-get install python-mysqldb] The code is as follows: #! /bin/env python# -*- encoding: utf-8 -*-#————————– ————————————————– —# Purpose: example for python_to_mysql# Author: zhoujy# Created: 2013-06-14# update: 2013-06-14#—– ————————————————– ————————–import MySQLdbimport os #Establish a connection with the database system, format#cOnn= MySQLdb.connect(host=’localhost’,user=’root’,passwd=’123456′,db=’test’,port=3306, charset=’utf8′) #Specify the configuration file, determine the directory, or write the absolute pathcwd = os.path.realpath(os.path.dirname(__file__))db_cOnf= os.path.join(cwd, ‘ db.conf’)cOnn= MySQLdb.connect(read_default_file=db_conf,host=’localhost’,db=’test’,port=3306,charset=’utf8′) #SQL statement to be executedquery = ‘select id from t1’ #Get the operation cursorcursor = conn.cursor() #Execute SQLcursor.execute(query) #Get a record, each record is returned as a tuple, 3 is returned, and the cursor points to the second record. result1 = cursor.fetchone()for i in result1: print i#Return the number of affected rows print cursor.rowcount #Get the specified number of records, return each record as a tuple, return 1, 2, the cursor starts from the 2nd record, and the cursor points to the 4th record. result2 = cursor.fetchmany(2)for i in result2: for ii in…
Ubuntu11.10 compiles and installs Nginx, PHP5.3.8, MySQL, MongoDB, Memcached, SSL, SMTP
Manually compile and install nginx 1.0.5 nginx download page: http://nginx.org/en/download.htmlecho Copy the entire shell below to the command line terminal, and it will be automatically executed one by one. wget http://nginx.org/download/nginx-1.0.5.tar.gz tar -jxvf nginx-1.0.5.tar.gz cd nginx-1.0.5 sudo apt-get install libpcre3 libpcre3-dev ./configure –prefix=/usr/local/nginx make sudo make install sudo ln -s /usr/local/nginx/sbin/nginx /etc/init.d/ echo starts nginx sudo /etc/init.d/nginx Echo visits the local homepage. If it is normal, it means nginx has been started. wget -O – http://localhost/ Add Nginx to the service and start it automatically at boot. Steps: http://www.linuxidc.com/Linux/2011-10/45735.htm Manually install mysql To manually install mysql, please see: http://www.linuxidc.com/Linux/2011-06/37632.htm Manually compile and install php 5.3.8 php download page: http://php.net/downloads.php Two ways to send email in php: http://www.linuxidc.com/Linux/2011-10/45736.htm CGI, fastcgi, php-fpm: http://www.linuxidc.com/Linux/2011-10/45746.htm Commonly used extensions: curl, pdo, pdo-mysql, mysqli, openssl, gd, jpeg, png, exif, zip, magickwandsudo apt-get install libltdl-dev libssl-dev sendmail libjpeg8 libjpeg8 -dev libpng12-0 libpng12-dev libxml2-dev libcurl4-openssl-dev libmcrypt-dev sudo ln -s /usr/lib/x86_64-linux-gnu/libpng* /usr/lib/ echo According to PHP official recommendations, use mysqli and pdo_mysql instead of mysql. gmail stmp requires openssl. wget http://cn2.php.net/get/php-5.3.8.tar.bz2/from/this/mirror tar -jxvf php-5.3.8.tar.bz2 cdphp-5.3.8 ./configure –prefix=/usr/local/php –enable-fpm –with-fpm-user=www-data –with-fpm-group=www-data –with-curl –with-mcrypt –enable-mbstring –enable-pdo –with-pdo-mysql=mysqlnd –with-mysqli=mysqlnd –with-mysql=mysqlnd –with-openssl –with-imap-ssl –with-gd –with-jpeg-dir=/usr/lib/ –with-png-dir=/usr/lib/ –enable-exif –enable-zip make sudo make install sudo…
Ubuntu11.10 compiles and installs Nginx, PHP5.3.8, MySQL, MongoDB, Memcac
Manually compile and install nginx 1.0.5 nginx download page: http://nginx.org/en/download.htmlecho Copy the entire shell below to the command line terminal, and it will be automatically executed one by one. . wget http://nginx.org/download/nginx-1.0.5.tar.gz tar -jxvf nginx-1.0.5.tar.gz cd nginx-1.0.5 sudo apt-get install libpcre3 libpcre3-dev ./configure –prefix=/usr/local/nginx make sudo make install sudo ln -s /usr/local/nginx/sbin/nginx /etc/init.d/ echo starts nginx sudo /etc/init.d/nginx Echo visits the local homepage. If it is normal, it means nginx has been started. wget -O – http://localhost/ Add Nginx to the service and start it automatically at boot. Steps: http://www.linuxidc.com/Linux/2011-10/45735.htm Manually install mysql To manually install mysql, please see: http://www.linuxidc.com/Linux/2011-06/37632.htm Manually compile and install php 5.3.8 php download page: http://php.net/downloads.php Two ways to send email in php: http://www.linuxidc.com/Linux/2011-10/45736.htm CGI, fastcgi, php-fpm: http://www.linuxidc.com/Linux/2011-10/45746.htm Commonly used extensions: curl, pdo, pdo-mysql, mysqli, openssl, gd, jpeg, png, exif, zip, magickwandsudo apt-get install libltdl-dev libssl-dev sendmail libjpeg8 libjpeg8-dev libpng12-0 libpng12-dev libxml2-dev libcurl4-openssl-dev libmcrypt-dev sudo ln -s /usr/lib/x86_64-linux-gnu/libpng* /usr/lib/ echo According to the official recommendation of PHP, use mysqli and pdo_mysql instead of mysql. gmail stmp requires openssl. wget http://cn2.php.net/get/php-5.3.8.tar.bz2/from/this/mirror tar -jxvf php-5.3.8.tar.bz2 cdphp-5.3.8 ./configure –prefix=/usr/local/php —enable-fpm –with-fpm-user=www-data –with-fpm-group=www-data –with -curl –with-mcrypt –enable-mbstring –enable-pdo –with-pdo-mysql=mysqlnd –with-mysqli=mysqlnd –with-mysql=mysqlnd – -with-openssl –with-imap-ssl –with-gd –with-jpeg-dir=/usr/lib/ –with-png-dir=/usr/lib/ –enable-exif –enable -zip…
MongoDB
MongoDB – GridFS source code analysis, this is an introduction to GridFS from the official website. GridFS provides the ability to split a large file into multiple documents for storage. Insert into GridFS The database supports native storage of binary data within BSON objects. However, BSON objects in MongoDB are limited in size (4MB older versions, 16MB in v1.7/1.8, higher limits in the future). The GridFS spec provides a mechanism for transparently piding a large file among multiple documents. This allows us to efficiently store large objects, and in the case of especially large files, such as videos, permits range operations (e.g., fetching only the first N bytes of a file). This is an introduction to GridFS from the official website. GridFS provides the ability to split a large file into multiple documents for storage. When inserting a file into GridFS, two collections, fs.files and fs.chunks, are used by default for storage. The information of this file, fs.files stores the file information, and fs.chunks stores the file data. Let’s look at the specific test code: ,