How Companies Using MongoDB?
Aakash Nagpal
Cloud Support Technician @Civo ||CK{A,D}||FULL STACK DEVELOPER|| LINUX || DOCKER || CLOUD COMPUTING || K8S ||
MongoDB
MongoDB is based on a NoSQL database that is used for storing data in a key-value pair. Its working is based on the concept of document and collection. It is also an open-source, a document-oriented, cross-platform database system that is written using C++. Mongo DB can be defined as a document-oriented database system that uses the concept of NoSQL. It also provides high availability, high performance, along with automatic scaling. This open-source product was developed by the company - 10gen in October 2007, and the company also maintains it. MongoDB exists under the General Public License (GPL) as a free database management tool as well as available under Commercial license as of the manufacturer. MongoDB was also intended to function with commodity servers. Companies of different sizes all over the world across all industries are using MongoDB as their database.
MongoDB is a scalable, flexible NoSQL document database platform designed to overcome the relational databases approach and the limitations of other NoSQL solutions. MongoDB is well known for its horizontal scaling and load balancing capabilities, which has given application developers an unprecedented level of flexibility and scalability.
Features of MongoDB
1. Ad-hoc queries for optimized, real-time analytics
When designing the schema of a database, it is impossible to know in advance all the queries that will be performed by end users. An ad hoc query is a short-lived command whose value depends on a variable. Each time an ad hoc query is executed, the result may be different, depending on the variables in question.
Optimizing the way in which ad-hoc queries are handled can make a significant difference at scale, when thousands to millions of variables may need to be considered. This is why MongoDB, a document-oriented, flexible schema database, stands apart as the cloud database platform of choice for enterprise applications that require real-time analytics. With ad-hoc query support that allows developers to update ad-hoc queries in real time, the improvement in performance can be game-changing.
MongoDB supports field queries, range queries, and regular expression searches. Queries can return specific fields and also account for user-defined functions. This is made possible because MongoDB indexes BSON documents and uses the MongoDB Query Language (MQL).
2. Indexing appropriately for better query executions
In our experience, the number one issue that many technical support teams fail to address with their users is indexing. Done right, indexes are intended to improve search speed and performance. A failure to properly define appropriate indices can and usually will lead to a myriad of accessibility issues, such as problems with query execution and load balancing.
Without the right indices, a database is forced to scan documents one by one to identify the ones that match the query statement. But if an appropriate index exists for each query, user requests can be optimally executed by the server. MongoDB offers a broad range of indices and features with language-specific sort orders that support complex access patterns to datasets.
Notably, MongoDB indices can be created on demand to accommodate real-time, ever-changing query patterns and application requirements. They can also be declared on any field within any of your documents, including those nested within arrays.
3. Replication for better data availability and stability
When your data only resides in a single database, it is exposed to multiple potential points of failure, such as a server crash, service interruptions, or even good old hardware failure. Any of these events would make accessing your data nearly impossible.
Replication allows you to sidestep these vulnerabilities by deploying multiple servers for disaster recovery and backup. Horizontal scaling across multiple servers that house the same data (or shards of that same data) means greatly increased data availability and stability. Naturally, replication also helps with load balancing. When multiple users access the same data, the load can be distributed evenly across servers.
In MongoDB, replica sets are employed for this purpose. A primary server or node accepts all write operations and applies those same operations across secondary servers, replicating the data. If the primary server should ever experience a critical failure, any one of the secondary servers can be elected to become the new primary node. And if the former primary node comes back online, it does so as a secondary server for the new primary node.
4. Sharding
When dealing with particularly large datasets, sharding—the process of splitting larger datasets across multiple distributed collections, or “shards”—helps the database distribute and better execute what might otherwise be problematic and cumbersome queries. Without sharding, scaling a growing web application with millions of daily users is nearly impossible.
Like replication via replication sets, sharding in MongoDB allows for much greater horizontal scalability. Horizontal scaling means that each shard in every cluster houses a portion of the dataset in question, essentially functioning as a separate database. The collection of distributed server shards forms a single, comprehensive database much better suited to handling the needs of a popular, growing application with zero downtime.
All operations in a sharding environment are handled through a lightweight process called mongos. Mongos can direct queries to the correct shard based on the shard key. Naturally, proper sharding also contributes significantly to better load balancing.
5. Load balancing
At the end of the day, optimal load balancing remains one of the holy grails of large-scale database management for growing enterprise applications. Properly distributing millions of client requests to hundreds or thousands of servers can lead to a noticeable (and much appreciated) difference in performance.
Fortunately, via horizontal scaling features like replication and sharding, MongoDB supports large-scale load balancing. The platform can handle multiple concurrent read and write requests for the same data with best-in-class concurrency control and locking protocols that ensure data consistency. There’s no need to add an external load balancer—MongoDB ensures that each and every user has a consistent view and quality experience with the data they need to access.
CASE-STUDIES OF MONGODB
1. Intuit
Intuit empowers small businesses, accountants, and individuals with tax preparation and financial software. In addition, the company enables small businesses to build websites without any technical expertise through its Intuit Websites arm. In order to recommend conversion and lead generation improvements to their customers, Intuit needed a way to collect and analyze data from these sites. Initially, the company tried off the shelf products like Google Analytics and Omniture, but they realized that with more than 500,000 hosted websites and 10 years worth of user data, they required a simple, high-performance solution. With querying and map reduce functionality, MongoDB was the best platform to suit Intuit's needs.
One of the primary challenges that Intuit faced in trying to make recommendations to their customers was that their existing analytics data was scattered over multiple sources. This posed technical and logistical problems, and prevented analyzing this data in a timely fashion. Due to the distributed nature of their systems and sheer abundance of data, Intuit encountered difficulties when attempting to build their analytics service using a relational database like MySQL or Oracle.
MongoDB provided a solution that was not only easy to deploy, but comparatively more efficient than the other relational and non-relational choices evaluated. Intuit spent a mere week developing a prototype analytics solution based on MongoDB. In that short time, the team was able to become proficient in MongoDB development. As Nirmala Ranganathan of Intuit put it, ...…Within one week we had made big progress. Very big progress. It was so amazing that we decided let’s go with this. In addition, Intuit found MongoDB to be 2.5 times faster for writes than MySQL and overall, superior to both relational and non-relational options.
Comprehensive and effective, the MongoDB solution has converted Intuit engineers into enthusiastic members of the MongoDB community. Indeed, not long after deploying their app, the team at Intuit was contributing back to the local MongoDB community with a presentation of their own at the next MongoDB event in the Bay Area.
2. Cisco
Cisco is the worldwide leader in networking, transforming how people connect, communicate and collaborate. In November 2011, Cisco launched WebEx Social (previously known as Quad), an enterprise collaboration platform designed for today's social, mobile, visual and virtual workforce. A “Facebook for enterprises,” WebEx Social connects people to the information and expertise they need, when they need it. Users share knowledge and ideas throughout the enterprise, and across geographic and organizational boundaries. When their existing relational database needed a NoSQL extension to power the collaborative workspace, Cisco turned to MongoDB as their NoSQL database of choice.
The Problem
WebEx Social is a true Enterprise 2.0 platform, “a place where people ‘live’ at work,” according to Biren Gandhi, principal architect for Cisco’s Cloud Collaboration Applications Technology Group (CCATG). The comprehensive collaboration platform combines the four core Enterprise 2.0 pillars – business processes, content, communication and social features – that enable users to work together effortlessly. With their existing relational database, complex SQL queries against highly normalized schema were time consuming and Cisco had little room to scale horizontally. Additionally, it was difficult to manage schema upgrades and migrate data from release to release.
WebEx Social’s rapid evolution required expanded data store capabilities and the ability to build successful new social features. Cisco sought an open source, NoSQL solution that was scalable, flexible and met the product’s hardcore enterprise needs: secure, mature commercial support, able to deliver consistent back up and disaster recovery, and easy to integrate with legacy systems. After an extensive evaluation and successful proof of concept, Cisco adopted MongoDB in mid-2011.
Why MongoDB?
MongoDB now serves as the primary real-time data store for WebEx Social’s social features that are write-heavy in nature. For example, a social activity feed that notifies thousands of users depending on some complex privacy and visibility rules. Additionally, Cisco uses MongoDB to perform some social network analytics. With MongoDB’s lightweight MapReduce feature, Cisco developers are able to automatically generate, with ease, recommendations such as users to connect with, communities to join and interesting content to view, as well as statistics, including top contributors, most popular colleagues and most downloaded docs.
"MongoDB is a very active, open source project with a vibrant community. It matches WebEx Social’s feature set and fits in line exactly with our needs,” said Gandhi.
EASY TO IMPLEMENT DOCUMENT MODEL
MongoDB’s document-based data model offers Cisco the right balance between complex relational databases and the pure key value store of most NoSQL solutions.
Intuitive mapping from the domain model to JSON docs and complex querying capabilities enable Cisco to cross-reference users and query embedded lists, functions that were either not possible in their existing database or were costly to perform. In contrast with a relational model, which requires a three-step process of fetch-update-commit, MongoDB’s in-place atomic updates allow for “one-stop operations,” according to Gandhi.
MILLISECOND RESPONSE TIME
With MongoDB, Cisco sped up reads from 30 seconds in some extreme cases to tens of milliseconds per object and eliminated caching needs in certain cases. As the WebEx Social platform evolves, Cisco plans to migrate more write-heavy features to MongoDB.
HIGHLY SCALABLE
MongoDB meets the demands of WebEx Social’s high-volume write activity. MongoDB offers a fast, easy way to de-normalize, index and extract information from data stores and its unique compound and geospatial indexing are a big plus.
HIGH AVAILABILITY
Cisco uses built-in sharding and replica sets, which are easy to use and enable high availability through automatic failover of nodes and recovery of member nodes.
As part of various innovation initiatives at Cisco, many developers participate in voluntary projects where people can collaborate and share results on their ideas. Many have taken up MongoDB as part of their project development, a testament to the usability, flexibility and innovation that the database offers.
Results
The Cisco development team is constantly evaluating the most effective product roadmap to drive customer success on WebEx Social. MongoDB provides Cisco with a user friendly platform for customers and an easy, powerful technology for developers. Cisco is focused on rolling out new features quickly and offering flexibility to users, and “MongoDB is a big piece of that,” said Gandhi.
3. SAP
London, United Kingdom —10gen, the initiator, contributor and continual sponsor of MongoDB, offering production support, training, consulting and online management services, announced that MongoDB has been chosen by SAP AG as a core component of SAP's platform-as-a-service (PaaS) offering. MongoDB was selected for the enterprise content management (ECM) section of the platform, as its flexibility and scalability will enable SAP to scale its content management service on its PaaS offering to meet customers’ requirements while managing data from different applications.
Cloud delivery models have emerged as a top priority for many corporate IT departments due to their quick deployments, cost-effectiveness and overall flexibility. SAP's platform- as-a-service allows customers to grow with their business, expand business processes, and integrate with existing investments.
Through an OEM agreement with SAP, MongoDB will be utilised initially for collaborative decision making, data archiving and retention management in a multi-tenant and secure environment. MongoDB will be used as the document store for SAP’s on-demand applications, delivering lower cost of ownership and increased stability.
“MongoDB offers scalability and flexibility at a total cost of ownership that enables us to deliver applications to our customers at affordable prices,” said Harald Mueller, chief product owner, Java Platform, SAP. “We need to deliver applications that meet our customers' needs now and in the future as they grow their business. MongoDB plays a crucial role in our ability to do that. We're excited about the possibilities and look forward to further use of MongoDB in the future.”
MongoDB is an open source, document database, combining scalability, performance and ease of use with traditional relational database features such as dynamic queries and indexes. It has become the leading NoSQL database choice for Fortune 500 enterprises and Web 2.0 companies that are developing innovative large- scale applications and performing real-time "big data" analytics.
“We are very excited to be working with SAP, and their decision to use MongoDB exemplifies how the solution is increasingly chosen for the delivery of enterprise cloud- based solutions,” said Max Schireson, president, 10gen. “As with other recent cloud platform announcements, this is further validation that MongoDB is enterprise-ready, and ?rapidly becoming the database of choice for cloud computing.”
4. Genentech
Genentech Research and Early Development (gRED) develops drugs for significant unmet medical needs. A critical component of this effort is the ability to provide investigators with new genetic strains of animals so as to understand the cause of diseases and to test new drugs.
As genetic testing has both increased and become more complex, Genentech has focused on redeveloping the Genetic Analysis Lab system to reduce the time needed to introduce new lab instruments.
MongoDB is at the heart of this initiative, which captures the variety of data generated by genetic tests and integrates it with Genentech's existing Oracle RDBMS environment. MongoDB’s flexible schema and ability to easily integrate with existing Oracle RDBMS has helped Genentech to reduce development from months to weeks or even days, significantly accelerating drug research. “Every day we can reduce the time it takes to introduce a new drug can have a big difference on our patients,” said Doug Garrett, Software Engineer at Genentech.
Previously, the Genentech team needed to change the schema every time they introduced a new lab instrument, which held up research by three to six months, and sometimes even longer. At the same time, the database was becoming more difficult to support and maintain.
The MongoDB redesign delivered immediate results. In just one example, adding a new genetic test instrument (a new loader) had zero impact on the database schema and allowed Genentech to continue with research after just three weeks, instead of the standard three to six-month delay.
5. VSCO
MongoDB, the database for modern applications, today announced that VSCO, an Oakland-based company that creates beautiful and efficient digital tools for the modern creative, is using MongoDB to store data that is on pace for exponential growth. When relational database tools failed to meet the scale demands of the fast-growing start-up, VSCO turned to MongoDB to ensure horizontal scale and fast response times for users all over the world.
The VSCO Cam mobile app enables users to take photos, edit them with sophisticated tools and then share via the VSCO Grid, a publishing platform that serves as an online gallery to discover and follow various photographers. The meta data for these photos is stored in MongoDB – e.g. geo location, “Presets” (filters), and other data – which allows VSCO to efficiently manage a fast-growing data set. By enabling VSCO to quickly iterate without worrying about schema changes, MongoDB has helped the company deliver features significantly faster than with a traditional relational database.
“Our mission is to provide our global creative community with products and services to create beautiful imagery. These goals depend on our ability to quickly deliver jaw dropping, inspiring images to mobile devices spread around the globe,” said Mike Wu, CTO at VSCO. “MongoDB makes that possible, allowing us to design applications that solve the social graph challenge with effective horizontal scale that maintains fast response times for distributing feeds.”
Since more than 70% of the VSCO community is international, their application must ensure that someone in Malaysia or Saudi Arabia has the same great experience as users in California. To accomplish this, VSCO plans on leveraging the flexible sharding features of MongoDB to control the physical location of data, ensuring the data of each user remains close and rapidly accessible. The result is that no matter where a user uploads their content, they can expect to have a better engaging experience from the VSCO Grid and Journal.
“With the power of MongoDB driving innovative, modern applications, start-ups like VSCO are able to support exponential growth,” said Max Schireson, CEO at MongoDB. “As VSCO pursues its passion to create an experience for people to discover and be inspired by art, MongoDB will enable them to quickly meet demand and increase their global footprint with an efficient, reliable user experience.”
Thankyou For Reading!!!!!
GCP7x || 1xTF || GCP || DevOps ENGINEER
3 年Doing well akash. Keep learning ??
Senior Software Engineer at HCL Technologies
3 年Great... Keep going Aakash ??