MaxCompute 2.0 The Evolution of NewSQL

本文涉及的产品
云原生大数据计算服务MaxCompute,500CU*H 100GB 3个月
云原生大数据计算服务 MaxCompute,5000CU*H 100GB 3个月
简介: At the Alibaba Cloud MaxCompute session during the 2017 Computing Conference held on October 14, Lin Wei, computing platform architect of Alibaba delivered a speech.

BD_001

At the Alibaba Cloud MaxCompute session during the 2017 Computing Conference held on October 14, Lin Wei, computing platform architect of Alibaba delivered a speech titled MaxCompute2.0: The Evolution of NewSQL, sharing the efforts that have been made to optimize NewSQL for MaxCompute 2.0.

In an era of DT where a growing numbers of companies move their application data to the cloud, NewSQL has become a hot topic in the industry, for it offers a great way for users to access and store data using APIs. This article discusses the background of Alibaba Cloud MaxCompute's adoption of NewSQL, the key technologies used, and so on.

01

Background

When it comes to NewSQL, SQL is an inevitable topic. The "data processing" and "database" that people mentioned in the 1980s and 1990s generally referred to the use of DataBase. DataBase is a relational database with strong structures and semantics, which allows anyone to make a quick interactive query when writing a query language. However, as massive amounts of data is generated with the rapid development of the Internet, traditional databases now face a series of challenges.

The first challenge lies in its poor horizontal scalability. In an Internet environment, the traditional DataBase would find it hard to support structured and unstructured data as well as voice and video data, resulting in a lack of flexibility. Moreover, the traditional DataBase is weak in fault tolerance. In a distributed environment, data centers are required to carry large volumes of data, which requires a high level of fault tolerance. Therefore, SQL has become inadequate to handle the surge of big data applications, leading to the birth of NoSQL, which is used in processing unstructured data.

A NoSQL database is a non-relational database with weak semantics and good flexibility. With the ability to handle unstructured, semi-structured, and structured data, the database scales well horizontally. NoSQL provides powerful User-Defined Functions, which can define the key-value pairs for map and reduce functions to process data. The database also offers a flexible API to support non-relational computations. Because all the nodes involved in the computing are separate from each other, the database is excellent in fault tolerance. It is obvious that NoSQL is far ahead of SQL in big data processing, which has led to a new wave of big data offerings like Google's BigTable and MapReduce.

Now, Alibaba Cloud has launched its own version of NewSQL with an aim to solve what SQL and NoSQL cannot on their own.

NewSQL

The concept of NewSQL is to go back to the relational database. When working with a NoSQL database, programmers must define map, reduce, value and many other parameters, respectively. Therefore, it is hard for them to clarify what they are working on unless all coding details are presented. The intention of going back to the relational model is that programmers can describe what to do instead of how to do it. This way, people can know what to work on as soon as they read the NewSQL database.

A strong system optimization capability is required for NewSQL to do its job. With a powerful optimizer, NewSQL can integrate a variety of functions to ensure the system can make the efficient physical execution plan in an adaptive way. In this process, we need to keep the unique features of NoSQL such as the ability to process unstructured data, a great collection of UDFs, and distributability.

If the users write an efficient execution plan with NoSQL, the following problems will arise. Firstly, programmers are unable to notice data and environment changes in time, which easily leads to a data skew problem. Secondly, with the increasingly high computing complexity and barriers existing both upstream and downstream, it is impossible for programmers to quickly work out the best execution plan. Meanwhile, computing requires knowledge sharing which will be impeded by the lack of a high-level language with strong semantics. In an environment where resources are shared, it is hard for a programmer alone to capture a big-picture perspective. Hence, we need to turn back to NewSQL, where programmers describe what they want to be done, and the system produces the efficient execution plan through optimization.

NewSQL shows great adaptability under the three scenarios as shown in the figure. It is hoped that programmers can describe their tasks better, but given the lack of flexibility, UDFs need to be used to bring balance to high-level semantics, and thus ensure highly performing, intelligent, and adaptive system optimization.

As a matter of fact, the whole industry is moving forward in this direction. For instance, in the delivery of the Dryad engine, Microsoft also offers Scope to do the optimization. DataBricks offers SparkSQL in addition to the Spark package to accelerate iteration. Hadoop has gone through the evolution from MapReduce, to Hive, and then to Hive 2.0. And Google is promoting Spanner which supports SQL semantics in addition to MapReduce. Alibaba Cloud's MaxCompute 1.0 is now stepping into MaxCompute 2.0, where system optimization is brought into play.

Key Technologies

Knowledge of some key technologies is required to strike a balance between SQL and NoSQL.

The ability to handle unstructured, semi-structured, and structured data is required.

In an Internet environment, users need to provide serialize and deserialize functions to enable dynamic conversion from unstructured to structured, so that structured data can be extracted for computation. To get over the limitations of traditional databases, the support for user-defined functions is needed to diversify the UDF features and to allow for better interaction between various programming languages. Users also need to define partitions to connect the upstream and the downstream, and to connect the input and output ends with other Internet applications.

02

DAG execution is needed.

This is for getting over the limitations of MapReduce so that the system can deploy loops and iteration to DAG. An asymmetric graph is also needed to support the complex physical execution plan. Only by doing so can the optimizer produce the efficient execution plan and makes the language complete.

03

Most importantly, we need to have a complete UDF system.

A complete collection of UDFs reduces the relational model to a functional language, which can be used to create different DAG execution plans. To ensure flexible interaction at the language level, functions like serialize/deserialize, join, aggregate, and processor (supports hash, range, and direct hash) are provided.

Powerful Optimizer

A powerful optimizer helps optimize data storage, from a single statement to thousands of store procedures. NoSQL adopts a functional programming language that can create rather complex graphs. With traditional databases, however, statements are committed one by one, which results in a poor job sharing experience. A powerful optimizer can be used to write more complex query storage procedures. This in turn results in a huge logic execution plan and a larger room for optimization. Thus a more advanced optimizer is needed to migrate away from rule-based optimization to cost-based optimization.

04

05

In addition, a distributed approach should be taken into account for a different optimizer. Take a Non-SQL scenario for example, many UDF extensions, whether they are for data, user, or computing, can be used to produce great execution plans.

06

The following figure show an interesting example about how a optimizer and the UDFs work together.

07

On the left is the result of not understanding the UDFs. In this case, the optimization is unsatisfactory and the output properties of the UDFs are not sensed, which results in an inefficient physical execution plan. On the right shows a healthy interaction between the UDFs and the optimizer. In this case, the optimizer achieves global optimization, and interacts well with the user to understand the UDF properties, and that is a shift from black box optimization to gray box optimization.

A real example

08

In the use case as shown in the figure, the cost for a distributed model is dramatically reduced, and both flexibility and optimization are achieved. In fact, some UDF properties are worth thinking:

A. Row-wise? Monotonic function?
B. Keep some columns unchanged (such as pass through)?
C. Keep the "clustered by" column unchanged? Keep the "sorted by" column unchanged?
D. Selectivity, data distribution of output, and more.

The optimization in a distributed scenario works in a different way as compared to a stand-alone SQL database. Due to vast amounts of NoSQL UDFs, a variety of dynamic environments in a distributed scenario (such as the topology to assign workers and distribution of Failure Region), achieving a balance between run-time and compile-time optimization needs a powerful engine which can perform optimization at run time. Run-time optimization includes determining the number of partitions and the boundary, selecting the Join method, and an efficient Datashuffle approach.

Conclusion

NewSQL is designed to help developers develop programs more efficiently and achieve interactive computing by solving what NoSQL and SQL cannot on their own. With its powerful system optimization capability, NewSQL is expected to be highly available, interpretable, performing, and adaptive, so as to drive the boom of the whole MaxCompute ecosystem.
09

10

相关实践学习
基于MaxCompute的热门话题分析
本实验围绕社交用户发布的文章做了详尽的分析,通过分析能得到用户群体年龄分布,性别分布,地理位置分布,以及热门话题的热度。
SaaS 模式云数据仓库必修课
本课程由阿里云开发者社区和阿里云大数据团队共同出品,是SaaS模式云原生数据仓库领导者MaxCompute核心课程。本课程由阿里云资深产品和技术专家们从概念到方法,从场景到实践,体系化的将阿里巴巴飞天大数据平台10多年的经过验证的方法与实践深入浅出的讲给开发者们。帮助大数据开发者快速了解并掌握SaaS模式的云原生的数据仓库,助力开发者学习了解先进的技术栈,并能在实际业务中敏捷的进行大数据分析,赋能企业业务。 通过本课程可以了解SaaS模式云原生数据仓库领导者MaxCompute核心功能及典型适用场景,可应用MaxCompute实现数仓搭建,快速进行大数据分析。适合大数据工程师、大数据分析师 大量数据需要处理、存储和管理,需要搭建数据仓库?学它! 没有足够人员和经验来运维大数据平台,不想自建IDC买机器,需要免运维的大数据平台?会SQL就等于会大数据?学它! 想知道大数据用得对不对,想用更少的钱得到持续演进的数仓能力?获得极致弹性的计算资源和更好的性能,以及持续保护数据安全的生产环境?学它! 想要获得灵活的分析能力,快速洞察数据规律特征?想要兼得数据湖的灵活性与数据仓库的成长性?学它! 出品人:阿里云大数据产品及研发团队专家 产品 MaxCompute 官网 https://www.aliyun.com/product/odps 
目录
相关文章
|
分布式计算 大数据 MaxCompute
操作系统顶级会议SOSP 阿里云MaxCompute开启NewSQL时代
  近日,第26届操作系统原理大会(SOSP)在上海举行,来自亚洲、欧洲、北美等地区的高校、学术机构和众多科技企业研究人员齐聚一堂。阿里巴巴受邀参加此次会议,除在展区展示系统软件技术的同时,阿里集团副总裁周靖人在BOF环节向参会人员介绍了阿里在数据库、计算、机器学习、网络等领域的多项重点技术。
3452 0
|
SQL 分布式计算 大数据
MaxCompute 2.0 NewSQL演进之路
10月14日,2017杭州云栖大会·阿里云大数据计算服务(MaxCompute)专场,阿里巴巴计算平台架构师林伟分享了主题《MaxCompute2.0的NewSQL演进之路》,介绍阿里云大数据计算服务MaxCompute 2.0在NewSQL上所做的优化和实践工作。
5054 0
|
29天前
|
存储 大数据 数据挖掘
【数据新纪元】Apache Doris:重塑实时分析性能,解锁大数据处理新速度,引爆数据价值潜能!
【9月更文挑战第5天】Apache Doris以其卓越的性能、灵活的架构和高效的数据处理能力,正在重塑实时分析的性能极限,解锁大数据处理的新速度,引爆数据价值的无限潜能。在未来的发展中,我们有理由相信Apache Doris将继续引领数据处理的潮流,为企业提供更快速、更准确、更智能的数据洞察和决策支持。让我们携手并进,共同探索数据新纪元的无限可能!
81 11
|
2月前
|
存储 分布式计算 大数据
MaxCompute 数据分区与生命周期管理
【8月更文第31天】随着大数据分析需求的增长,如何高效地管理和组织数据变得至关重要。阿里云的 MaxCompute(原名 ODPS)是一个专为海量数据设计的计算服务,它提供了丰富的功能来帮助用户管理和优化数据。本文将重点讨论 MaxCompute 中的数据分区策略和生命周期管理方法,并通过具体的代码示例来展示如何实施这些策略。
82 1
|
2月前
数据平台问题之在数据影响决策的过程中,如何实现“决策/行动”阶段
数据平台问题之在数据影响决策的过程中,如何实现“决策/行动”阶段
|
2月前
|
存储 监控 安全
大数据架构设计原则:构建高效、可扩展与安全的数据生态系统
【8月更文挑战第23天】大数据架构设计是一个复杂而系统的工程,需要综合考虑业务需求、技术选型、安全合规等多个方面。遵循上述设计原则,可以帮助企业构建出既高效又安全的大数据生态系统,为业务创新和决策支持提供强有力的支撑。随着技术的不断发展和业务需求的不断变化,持续优化和调整大数据架构也将成为一项持续的工作。
|
2月前
|
分布式计算 DataWorks 关系型数据库
DataWorks产品使用合集之ODPS数据怎么Merge到MySQL数据库
DataWorks作为一站式的数据开发与治理平台,提供了从数据采集、清洗、开发、调度、服务化、质量监控到安全管理的全套解决方案,帮助企业构建高效、规范、安全的大数据处理体系。以下是对DataWorks产品使用合集的概述,涵盖数据处理的各个环节。
|
2月前
|
消息中间件 数据采集 JSON
大数据 - DWD&DIM 行为数据
大数据 - DWD&DIM 行为数据
43 1
|
2月前
|
机器学习/深度学习 人工智能 分布式计算
理解并利用大数据的力量:解锁数据背后的价值
【8月更文挑战第7天】大数据已成为推动社会进步和经济发展的重要力量。通过理解并利用大数据的力量,企业可以解锁数据背后的价值,优化业务流程、提升决策效率和创新能力。然而,大数据应用也面临着诸多挑战和风险,需要企业不断学习和实践以应对。相信在未来的发展中,大数据将为我们带来更多的惊喜和机遇。
|
2月前
|
分布式计算 安全 大数据
MaxCompute 的安全性和数据隐私保护
【8月更文第31天】在当今数字化转型的时代背景下,企业越来越依赖于大数据分析来推动业务增长。与此同时,数据安全和隐私保护成为了不容忽视的关键问题。作为阿里巴巴集团推出的大数据处理平台,MaxCompute(原名 ODPS)致力于为企业提供高效、安全的数据处理解决方案。本文将探讨 MaxCompute 在数据安全方面的实践,包括数据加密、访问控制及合规性考虑等方面。
66 0

热门文章

最新文章

下一篇
无影云桌面