Making Your Own Email Subscription Service with Node.JS

It's common for websites to have a subscription button, where you can pass along your email address, and you'll receive emails every week, month, or day. Sometimes, these are automated emails, and sometimes they are custom posts written by an editor.

It's also common to pay for this service, sometimes extortionately. In this article, I'll show you it's pretty easy to create your own, although you will obviously still have to pay for hosting. Let's look at how to create an email subscription service with MongoDB and Node.JS.

Indexing in RavenDB vs. MongoDB and PostgreSQL

Introduction

In this article we’ll discuss how RavenDB indexes documents and how it differentiates itself from MongoDB, another NoSQL document database, as well as the relational database, PostgreSQL.

When it comes to indexing, RavenDB favors “eventual consistency” which means that it optimizes for high throughput read and write scenarios and attempts to return results to queries as fast as it can. These results may be “stale” until the index incrementally rebuilds to catch up to any new document changes. In RavenDB, you may also explicitly wait for non-stale results. On the other hand both MongoDB and PostgreSQL favor consistency (unless read on a secondary replica) but this means indexes impact read/write performance.

MongoDB Basics in 5 Minutes

MongoDB is a document-oriented database management system that does not require any predefined schema.

It is considered one of the classic examples of NoSQL systems. It uses JSON-like documents and a database schema. The database is used in web development, in particular, within the framework of some JavaScript stacks such as MEAN, MEVN, MERN, which are often used by web developers as their favorite tech stacks for creating applications.

Scala, MongoDB, and Cats-Effect

MongoDB is an open-source database that uses a document-oriented data model and a non-structured query language. It is one of the most powerful NoSQL databases around today. In comparison to traditional SQL databases, MongoDB does not use the usual rows and columns to model its data; instead, it uses a BSON (Binary JSON) format to save the data (documents) in collections, where the basic unit of data consists of a set of key-value pairs.

For Scala, there are several MongoDB clients available, the most popular of which are the official MongoDB Scala Driver and ReactiveMongo.

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.

MongoDB With Spring Boot: A Simple CRUD

MongoDB is an open-source non relational, document oriented database. MongoDB being document oriented means that it stores data in JSON like documents which makes it more powerful and expressive. MongoDB’s ability to scale up and down very easily is considered to be one of its advantages over its competitors. Data is stored in documents in key pair values. Another component of MongoDB is collection, which is the simple collection of documents. Collection corresponds to Table in relational databases. In this blog we are going to explore this database with Java Spring Boot. We will create a simple CRUD API to interact with our Mongo database.

Why Use MongoDB?

  1. It is document based and therefore it is more flexible where each document can have varying fields which can not be done in relational databases.
  2. It allows us to index any field in the document to improve search results.
  3. It provides us with rich and powerful query language which allows us to filter and sort using any field no matter how nested the field is.
  4. It provides us with high scalability (sharding) and high availability (replication) of data.

MongoDB With Java Spring Boot

Assuming that you have a basic understanding of MongoDB now we will now see how we can leverage MongoDB by building a small spring boot API to perform basic CRUD operations.

Alexa and Kubernetes: MongoDB Persistence Adapter (II)

ASK SDK MongoDB Persistence Adapter package contains an implementation of persistence adapter in Core SDK ask-sdk-core , based on AWS SDK.

What Is the ASK SDK MongoDB Persistence Adapter?

The ASK SDK v2 for Node.js is an open-source Alexa CustomSkill Development Kit. ASK SDK v2 for Node.js makes it easier for you to build highly engaging skills by allowing you to spend more time on implementing features and less on writing boilerplate code.

Clustered Quartz Scheduler With Spring Boot and MongoDB

Spring Boot library for Quartz does not work correctly if you start up two instances of service in parallel. Each one of the services starts the execution of the same jobs while the expected behavior is one of the instances is elected to execute the jobs and the other ones waiting in the background, and in the case of failure of the first service, another one is elected.

Springs’ @Scheduled annotation is a very convenient and easy way of scheduling tasks for several reasons. But, if you have a clustered environment and you must run any job just from one node, that does not hold true. You realize that all scheduled jobs will start executing almost at the same time. This may cause problems ranging from unnecessary calls to data inconsistency.  

Multi-Tenancy Implementation Using Spring Boot, MongoDB, and Redis

In this tutorial, we will learn how to implement multi-tenancy in a Spring Boot application with MongoDB and Redis.

Prerequisites

  • Spring Boot 2.4
  • Maven 3.6.+
  • JAVA 8+
  • Mongo 4.4
  • Redis 5

What Is Multi-tenancy?

Multi-tenancy is a software architecture in which a single instance of a software application serves multiple customers. Everything should be shared, except for the different customers’ data, which should be properly separated. Despite the fact that they share resources, tenants aren’t aware of each other, and their data is kept totally separate. Each customer is called a tenant.

Introduction to MongoDB With Java

mongoDBWe now live in a data driven world where we are generating so much data that it becomes difficult to manage this data using databases. There are different databases available for different use cases. For a long time Relational databases were used for most of the uses cases, but as the technology advanced and modern applications came which need more scalability and variety came into picture it became important to choose the right database. This is where one of the No-SQL databases comes in such as MongoDB. In this blog we will have an Introduction to MongoDB and how we can get started with MongoDB with java.

What Is MongoDB?

MongoDB is an open-source non relational, document oriented database. MongoDB being document oriented means that it stores data in JSON like documents which makes it more powerful and expressive. Data is stored in documents in Key pair values.

MEAN Full Stack on Amazon AWS

This is the first and main blog, in this, I will explain the overall idea. Please be informed that this is going to be a blog series exploring all the aspects of running the full stack application on AWS (Amazon Web Services). 

The main goal is to share the learning related to AWS but I will also explain a bit about Full stack application which we will implement in MEAN stack (Mongo, Express, Angular and Node).

How We Achieved MongoDB Replication on Docker

Prologue

Picture your database server. Now imagine it somehow breaks. Despair comes up and disturbs the reaction.

Maybe you lost data. Maybe you had too much downtime. Maybe you lost work hours. Maybe you lost precious time and money. High Availability is easily a nice-to-have but in times like these, you value it more.

Using CRUD Operations in MongoDB in Node.js Using Mongoose

MongoDB CRUD Operations

Mongoose provides a simple schema-based solution to model your app data. In this post, we will see how we can use it to write basic CRUD operations in Node.js.

Understanding Schema

First let's write a Mongoose schema for a sample requirement. Example entity is Team, where I want to save:

MiBand 3 and React-Native (Part 3): Docker, Spring Cloud, and Spring Boot

After significant work on my mistakes described in the second chapter of this series, I decided to move on to the final chapter. In this article, we will focus on my latest findings in the development of the server-side. I am going to show how a React-native application can collect MiBand data and transfer it to a real server.

My server will be based on a microservice solution that can be deployed easily because of docker-compose. For the last 5-8 years, microservices have become a trending solution for solving many issues in server-side development. Its significant capabilities in the scaling of infrastructure and efficient and minimal time consuming for request's processing, motivated me to implement a small server-side API, based on Spring Cloud.

REST + MongoDB + HATEOAS?

REST?

Recently I had an interesting experience while implementing HATEOAS to a REST web service, and I was also lucky enough to get to try out a NoSQL database named MongoDB, which I found really convenient for a lot of different cases where you don't need to manage transactions. So, today, I'm going to share with you this experience. Maybe some of you are going to learn something new maybe not, but still, you'll get a refresher on what you already know.

So, first of all, we're going to introduce REST, and slowly we'll get to HATEOAS and MongoDB. So, what is exactly REST?