Svg Vector Icons : More Trending Articles

Apache Spark Architecture

Snowflake Snowday 2021

For companies that have integrated big data into their standard operations, processing speed becomes a determining factor. The increasingly voluminous waves of data can challenge the compute abilities of many applications.

Apache Spark was designed to function as a simple API for distributed data processing in general-purpose programming languages. It enabled tasks that otherwise would require thousands of lines of code to express to be reduced to dozens. 

Spark's distributed  processing framework can handle the enormous volume of data that various businesses capture daily. Spark enhances the data computing of all industries that leverage big data.

Spark Architecture Basics

The Spark ecosystem includes a combination of proprietary Spark products, such as Spark SQL, Spark Streaming and Spark MLlib, and various libraries that support SQL, Python, Java and other languages. This design positions Spark to integrate with a variety of workflows.

Spark architecture is dependent upon a Resilient Distributed Dataset (RDD).  RDDs are the foundation of Spark applications.The data within an RDD is divided into chunks, and it is immutable. In 2015, the developers of Spark created the Spark DataFrames API to support modern big data and data science applications. It was modeled after data frames in R and Python (Pandas). DataFrames can be constructed from a variety of sources, including structured data files, external databases, and existing RDDs.

How Does Apache Spark Work?

Spark distributes data across the cluster and process the data concurrently. Spark uses master/agent architecture, and the driver communicates with executors. The relationship between the driver (master) and the executors (agents) defines the functionality.

Drawbacks of Spark Architecture

At the time it was created, Spark architecture provides for a scalable and versatile processing system that meets complex big data needs. It allowed developers to speed data processing while improving performance when using the Spark ecosystem. However, technology has evolved since then, and concerns such as security and governance have increased. In addition, Spark was birthed in the on-premises era, making managing and tuning more difficult compared to later cloud-built options. As a result, Spark  has a few drawbacks to keep in mind. 

Create Silos

Since the Spark framework was often used for big data processing along with a traditional data warehouse, data is required to be moved around for different usage purposes. This creates a siloed approach with lots of pipeline complexity. With multiple data locations, organizations end up with multiple versions of “truth” and must deal with unnecessary data pipelines and a complex architecture.  And since Spark does not have integrated data storage and is used primarily by parallel processing experts (for example, data engineers and data scientists), silos are also created from platforms used by analysts and other business users.

Users of Snowflake can address this issue easily, however. Snowflake’s Snowpark framework simplifies architecture and data pipelines by processing all data within the Snowflake Data Cloud—without moving it around. Different data users, from analysts to data scientists and data engineers, can collaborate on the same data in a single platform, which streamlines architecture by natively supporting everyone’s programming language of choice.

High Complexity of Managing Spark Clusters

Traditional data architecture is complex and costly to maintain. Organizations using Spark often pay for duplicated storage, redundant or unnecessary pipelines and processing, and long maintenance hours. Additionally, they face hidden costs from infrastructure and talent resources. 

Snowflake’s Snowpark addresses this challenge as well by eliminating maintenance and overhead. Snowflake’s managed services have near-zero maintenance requirements, allowing teams to focus more on building and less on managing.

Insistent Governance and Security Policies

Platforms such as Spark are insecure by default. For example, it allows developers to install any kind of libraries from third parties or from anywhere on the internet while leaving key security concerns such as unwanted network access unanswered. That leaves the door wide open for unwanted data exfiltration over the internet, unless teams spend considerable time manually adjusting security configurations between these platforms and cloud providers.

The traditional data architecture often used with Spark also creates significant security risks and governance issues due to the fact that data is being moved around and stored in siloed locations.  Data silos bring inconsistent governance and security policies across different systems. 

With Snowpark, administrators have full control over which libraries are allowed to execute inside the Java/Scala runtimes for Snowpark. In addition, Java/Scala runtimes on Snowflake’s virtual warehouses do not have access to the network and therefore avoid problems such as unwanted network access and data exfiltration by default, without any additional configuration. 

With a streamlined architecture, organizations can implement a unified governance framework and set of security policies with one single platform.  

Snowflake and Spark

Snowflake’s Snowpark delivers the benefits of Spark with none of the complexities. The Snowpark framework brings integrated, DataFrame-style programming to the languages developers like to use and performs large-scale data processing, all executed inside of Snowflake. Here are just a few of the things that organizations are accomplishing using Snowpark.

  • Improve collaboration: Bring all teams to collaborate on the same data in a single platform that natively supports everyone’s programming language and constructs of choice, including Spark DataFrames.

  • Accelerate time to market: Enable technical talent to increase the pace of innovation on top of existing data investments with native support for cutting-edge open-source software and APIs. 

  • Lower total cost of ownership: Streamline architecture to reduce infrastructure and operational costs from unnecessary data pipelines and Spark-based environments.

  • Reduce security risks: Exert full control over libraries being used. Provide teams with a single and governed source of truth to access and process data to simplify data security and compliance risk management across projects.

Thanks to Snowflake’s Snowpark, organizations can achieve lightning-fast data processing via their developer’s favorite programming languages and coding constructs. At the same time, they can enjoy all the advantages that the Snowflake Data Cloud offers.

In addition, Snowflake's platform can also connect with Spark. The Snowflake Connector for Spark keeps Snowflake open to connect to some complex Spark workloads. 

To test-drive Snowflake, sign up for a free trial