Skip to main content

Posts

Showing posts from April, 2019

Node.js

Node.js Node.js is a JavaScript framework which build on V8 engine and Chrome' s JS engine.  It's open source and supports to all server-side and network applications. Developers' main purpose was to build a framework that supports to create real-time websites websockets.  Node.js holds the wold largest open source library.  It's lightweight and efficient because of the event driven, non-blocking I/O model. Where to use Node.js Node.js is specifically made to build fast and scalable network applications. It also can be use to computational applications but is doesn't suite to heavy computational and CPU intensive applications. Node.js use non-blocking I/O model to handle huge numbers of simultaneous connections upto 1 Million with high throughput without spawn threads to each connection. Because of that Node.js is using small amount of resources when comparing with other frameworks. Node.js is highly applicable to Data Streaming applicat...

MongoDB

MongoDB. MongoDB is a document database. It is a very flexible database system because it stores data in JSON-like documents and It allows to change the data structure over time. It's  fully packed with a function system that makes development easy. MongoDB supports to over 10 languages. It contains drivers to most of the popular languages and it's growing fast with the help of the community. Connecting to the MongoDB. You can connect to a locally hosted MongoDB database with JavaScript by using below code. Database name is = 'techciv' Collection name is = 'posts' var url = 'mongodb://localhost:27017/techciv' ; co( function *( ) { const db = yield MongoClient.connect(url); console .log( "Connected" ); yield insertDocuments(db, null ); yield findDocuments(db, null ); yield indexCollection(db, null ); yield aggregateDocuments(db, null ); db.close(); }).catch( err => console .log(err)); Ins...