Blog
{Blog}  Join us at AWS re:Invent 2022 Nov. 28 - Dec. 2 to learn how to build the next big thing on MongoDB and AWS
whitepaper

When To Use Apache Spark With MongoDB

Apache Spark is a powerful processing engine designed for speed, ease of use, and sophisticated analytics. Spark particularly excels when fast performance is required. MongoDB is a popular NoSQL database that enterprises rely on for real-time analytics from their operational data. As powerful as MongoDB is on its own, the integration of Apache Spark extends analytics capabilities even further to perform real-time analytics and machine learning.

With Spark and MongoDB, developers can build more functional applications faster using a single database technology. The integration of these two Big Data technology also saves operations teams the hassle of shuttling data between separate operational and analytics infrastructure. For CIOs, the combined forces enable faster time-to-insight for their businesses, with lower cost and risk.

Here are just a few of scenarios of when to use Apache Spark with MongoDB.

Rich Operators & Algorithms.

Spark supports over 100 different operators and algorithms for processing data. Developers can use these to perform advanced computations that would otherwise require more programming effort to combine the MongoDB aggregation framework with application code.

For example, a web analytics platform built on MongoDB would provide insight into the performance of your content by geography and by audience. Adding Spark’s machine learning algorithms would allow you to go even further by taking those insights and then serving up targeted content recommendations for your readers.

Processing Paradigm.

Many programming languages can use their own MongoDB drivers to execute queries against the database, returning results to the application where additional analytics can be run using standard machine learning and statistics libraries.

In this scenario, a developer could use the MongoDB Python or R drivers to query the database. But this process becomes increasingly complex as you need to distribute the application across multiple threads and nodes. Using Apache Spark makes this kind of distributed processing easier and faster to develop because Spark jobs can be directly performed against data in MongoDB. As a result, the integration makes fast, real-time analysis possible.

Skills Re-Use.

With libraries for SQL, machine learning and others – combined with programming in Java, Scala and Python – developers can leverage existing skills and best practices to build sophisticated analytics workflows on top of MongoDB.

Together MongoDB and Apache Spark are enabling success by turning analytics into real-time action. Learn more about how this integration can benefit your organization by downloading our white paper.


More like this

View all resources
chevron-right
general_content_white_paper

MongoDB Architecture Guide

MongoDB enables you to meet the demands of modern apps with an application data platform built on several core architectural foundations

Read the white paper
View Presentation
  • IT Executive (CIO, CTO, VP Engineering, etc.)
  • Business Executive (CEO, COO, CMO, etc.)
  • Architect
  • Business Development / Alliance Manager
  • DBA
  • Technical Operations
  • Director / Development Manager
  • Product / Project Manager
  • Software Developer / Engineer
  • Mobile Developer
  • Business Analyst
  • Data Scientist
  • Student
  • Other
  • United States
  • Afghanistan
  • Åland Islands
  • Albania
  • Algeria
  • American Samoa
  • Andorra
  • Angola
  • Anguilla
  • Antarctica
  • Antigua and Barbuda
  • Argentina
  • Armenia
  • Aruba
  • Australia
  • Austria
  • Azerbaijan
  • Bahamas
  • Bahrain
  • Bangladesh
  • Barbados
  • Belarus
  • Belgium
  • Belize
  • Benin
  • Bermuda
  • Bhutan
  • Bolivia, Plurinational State of
  • Bonaire, Sint Eustatius and Saba
  • Bosnia and Herzegovina
  • Botswana
  • Bouvet Island
  • Brazil
  • British Indian Ocean Territory
  • Brunei Darussalam
  • Bulgaria
  • Burkina Faso
  • Burundi
  • Cambodia
  • Cameroon
  • Canada
  • Cape Verde
  • Cayman Islands
  • Central African Republic
  • Chad
  • Chile
  • China
  • Christmas Island
  • Cocos (Keeling) Islands
  • Colombia
  • Comoros
  • Congo
  • Congo, the Democratic Republic of the
  • Cook Islands
  • Costa Rica
  • Côte d'Ivoire
  • Croatia
  • Curaçao
  • Cyprus
  • Czech Republic
  • Denmark
  • Djibouti
  • Dominica
  • Dominican Republic
  • Ecuador
  • Egypt
  • El Salvador
  • Equatorial Guinea
  • Eritrea
  • Estonia
  • Ethiopia
  • Falkland Islands (Malvinas)
  • Faroe Islands
  • Fiji
  • Finland
  • France
  • French Guiana
  • French Polynesia
  • French Southern Territories
  • Gabon
  • Gambia
  • Georgia
  • Germany
  • Ghana
  • Gibraltar
  • Greece
  • Greenland
  • Grenada
  • Guadeloupe
  • Guam
  • Guatemala
  • Guernsey
  • Guinea
  • Guinea-Bissau
  • Guyana
  • Haiti
  • Heard Island and McDonald Islands
  • Holy See (Vatican City State)
  • Honduras
  • Hong Kong
  • Hungary
  • Iceland
  • India
  • Indonesia
  • Iraq
  • Ireland
  • Isle of Man
  • Israel
  • Italy
  • Jamaica
  • Japan
  • Jersey
  • Jordan
  • Kazakhstan
  • Kenya
  • Kiribati
  • Korea, Republic of
  • Kuwait
  • Kyrgyzstan
  • Lao People's Democratic Republic
  • Latvia
  • Lebanon
  • Lesotho
  • Liberia
  • Libya
  • Liechtenstein
  • Lithuania
  • Luxembourg
  • Macao
  • Macedonia, The Former Yugoslav Republic of
  • Madagascar
  • Malawi
  • Malaysia
  • Maldives
  • Mali
  • Malta
  • Marshall Islands
  • Martinique
  • Mauritania
  • Mauritius
  • Mayotte
  • Mexico
  • Micronesia, Federated States of
  • Moldova, Republic of
  • Monaco
  • Mongolia
  • Montenegro
  • Montserrat
  • Morocco
  • Mozambique
  • Myanmar
  • Namibia
  • Nauru
  • Nepal
  • Netherlands
  • New Caledonia
  • New Zealand
  • Nicaragua
  • Niger
  • Nigeria
  • Niue
  • Norfolk Island
  • Northern Mariana Islands
  • Norway
  • Oman
  • Pakistan
  • Palau
  • Palestinian Territory, Occupied
  • Panama
  • Papua New Guinea
  • Paraguay
  • Peru
  • Philippines
  • Pitcairn
  • Poland
  • Portugal
  • Puerto Rico
  • Qatar
  • Réunion
  • Romania
  • Russian Federation
  • Rwanda
  • Saint Barthélemy
  • Saint Helena, Ascension and Tristan da Cunha
  • Saint Kitts and Nevis
  • Saint Lucia
  • Saint Martin (French part)
  • Saint Pierre and Miquelon
  • Saint Vincent and the Grenadines
  • Samoa
  • San Marino
  • Sao Tome and Principe
  • Saudi Arabia
  • Senegal
  • Serbia
  • Seychelles
  • Sierra Leone
  • Singapore
  • Sint Maarten (Dutch part)
  • Slovakia
  • Slovenia
  • Solomon Islands
  • Somalia
  • South Africa
  • South Georgia and the South Sandwich Islands
  • Spain
  • Sri Lanka
  • Suriname
  • Svalbard and Jan Mayen
  • Swaziland
  • Sweden
  • Switzerland
  • Tajikistan
  • Tanzania, United Republic of
  • Thailand
  • Timor-Leste
  • Togo
  • Tokelau
  • Tonga
  • Trinidad and Tobago
  • Tunisia
  • Turkey
  • Turkmenistan
  • Turks and Caicos Islands
  • Tuvalu
  • Uganda
  • Ukraine
  • United Arab Emirates
  • United Kingdom
  • United States Minor Outlying Islands
  • Uruguay
  • Uzbekistan
  • Vanuatu
  • Venezuela, Bolivarian Republic of
  • Viet Nam
  • Virgin Islands, British
  • Virgin Islands, U.S.
  • Wallis and Futuna
  • Western Sahara
  • Yemen
  • Zambia
  • Zimbabwe
  • Taiwan