Setting up MongoDB Cluster and Replica-Set

Database Replication

Database replication is a process in which we run a set of database instances that maintain the same datasets and it provides redundancy and promises high availability of database servers. In case your one database falls down then you still will be able to use the other available database from the cluster and have the same datasets that you had in your previous replica. 

In this post, I am going to demonstrate the replication setup in MongoDB. If you're using some other database you might need to check if your database supports replication or not.

Intro to MongoDB

The word “database” instantly creates a picture of a table having rows and columns. Typically, any system architecture has a relational database management system (RDBMS) to store data. Data in an RDBMS is stored in tables containing rows and columns, and tables are connected to each other via relational models.

Examples of traditional RDBMSs include Oracle, MySQL, Microsoft SQL Server, DB2, etc. These databases have been in the market for a substantial amount of time, as they are highly efficient and deliver great performance.

Using Apache Spark to Query a Remote Authenticated MongoDB Server

1. Download and Extract Spark

$ wget http://apache.spinellicreations.com/spark/spark-2.4.0/spark-2.4.0-bin-hadoop2.7.tgz
$ tar -xf spark-2.4.0-bin-hadoop2.7.tgz
$ cd spark-2.4.0-bin-hadoop2.7

Create a spark-defaults.conf file by copying spark-defaults.conf.template in conf/.

Add the below line to the conf file.

Full-Stack Vue App With Node, Express, and MongoDB

Much of application development, including web applications, has to do with CRUD – creating, reading, updating, and deleting data. Today, we will be building a full stack Vue note-taking application and showing you how to perform the aforementioned processes, using Node.js running the Express.js framework for the backend, and MongoDB to store our data.

Below is a preview of the application we will be building:

How to Connect Your MongoDB Deployments to Robo 3T GUI at ScaleGrid

Robo 3T (formerly Robomongo) is a popular desktop graphical user interface (GUI) for your MongoDB hosting deployments that allows you to interact with your data through visual indicators instead of a text-based interface. This open source tool has cross-platform support and actually embeds the mongo shell within its interface to provide both shell and GUI-based interaction.

As a highly-popular GUI leveraged by our MongoDB hosting customers, we’re providing this tutorial on how to quickly connect your ScaleGrid deployment with Robo 3T.