如何设计实时数据平台(设计篇)

  • 2019 年 10 月 3 日
  • 笔记

????????????????????????????????????“??????”? ????????????????????????????????????????????????????????????????????????????????????????????????? ????????????????????????????????????????????????????????????????????????????????????????????

????????

1.1 ?????????????????

???????????????????????????????????????????????????????1????????2???????

?1 ????

?2 ????

?????????????????????????????????T?1??????????????????ETL?????????????

????????????????????????????????????????????????T?0???????????????????????????

????????????????????????????????????????????3?Melissa Coates??????

??3 Melissa Coates??????????????????“??”?????????????????????????????????????????

???Melissa Coates???????????????????????????????????????????????

  • ??????????????????

  • ??????????????????

  • ?????????????????

  • ?????????????????

1)??????????????????

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

?????????????????????????????????????????????????????????????????????????????????

2) ??????????????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????

????????????????????????????????????????????????????

?4 ?????

??1-4???“Designing a Modern Data Warehouse + Data Lake” – Melissa Coates, Solution Architect, BlueGranite?

3)?????????????????

?????????????????????????????????????????????SQL?????????????????????????????????????????????????????????????????

??Data Democratization??????????????

https://www.forbes.com/sites/bernardmarr/2017/07/24/what-is-data-democratization-a-super-simple-explanation-and-the-key-pros-and-cons

???????????????????????????Data virtualization software?Data federation software?Cloud storage?Self-service BI applications????????????????????????????????BI?????

4)?????????????????

????????????????????????????????????????????????BI???????????????????????????????????????????????BI????????????????????????????????????????????????????????

??????????????????????????????????????????????????????????????????????

1.2 ?????????????????

???????????OLTP, OLAP, Streaming, Adhoc, Machine Learning??????OLTP?OLAP???????

??5????“Relational Databases are not Designed for Mixed Workloads”-Matt Allen?

????????OLTP??????????????OLAP???????????????????????OLTP????OLAP??????????????????????T?1??ETL?????????

???OLTP?OLAP??????Data Pipeline?????????????????????????????????????????????????????????????????????????????????????????????????Star Schema?????????????????????????????????????Pipeline????????????????????????????“??????”(OLPP, Online Pipeline Processing)???

?????????????????????????????OLPP?????OLTP?OLAP????????????????????????????????????????????

????????

2.1 ?????

???????Real-time Data Platform?????RTDP???????????????????????????????????????????????????????????????????????????????RTDP??????????????????????????????????????????????????????????????

2.2 ??????

??????????????Pipeline???????????????????????????????????????6???RTDP???????????????????????????????

?6 RTDP????????

?????????????????????????????????

?7 ??????

??7?????????????????????????????

  • ????????

  • ????????

  • ????????

  • ?????????

??????????????????????????????????????????????????????????????Pipeline???????????????????????????????

1)????????

????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????UMS?Unified Message Schema??????????????????????????????

UMS??Namespace???Schema????????????????????????????

  • ??????????????????

  • ??????????????????Kafka?Topic, Spark Streaming?Stream????????????????????????????????

????????????????????????

2)????????

???????????????????????????UMS????????????JSON??????????????????

  • ??????????SQL???????????????????

  • ?????????????????????????????

  • ??????????????????????????????

3)????????

??????????????????????????????????????????????????????????????JDBC?REST?????????SQL????????????????????????????????????????????????????????????????????

4)?????????

???????????????????????????????????????????????????????????????????????????????????????????????

???????????????????????????????????????????????RTDP?????????????????????????????????????????OLPP???????

2.3 ?????????

???????RTDP????????????????????????????????????

1)????

?????????????????Pipeline??????ETL?????

???????Storm?Flink????????????????????Spark Streaming??????????mini-batch????????????????????????????????????????????????

????????????????????????????????????????????????????revision???????????????????snapshot????????????????????????

???????????????????????????????????????????????????????????????????????????????“????”????????“????”?“????”?????????SQL?????“????”????????SQL????????????

  • join?

? left join????“????”??left join??lookup?????????hashjoin???

? right join????????lookup????lookup???????????????????

? inter join?????????left join ?filter?????

? outer join???????right join??????

  • union?????????????????????????

  • agg?????????union????????????????????

  • filter??????shuffle??????

  • map??????shuffle??????

  • project??????shuffle??????

Join????shuffle????????????????????join?left join??join?????hashjoin???????????join?????????????????????????????left join??????????

???ETL?????????????????????????????????????????????ETL????????????Pipeline????????ETL???????????????“????”?“????”??????????

???????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????????ETL?????

?8 ????????

?8??????????????OLPP??????????wormhole?moonbox??????????????????????????????

2)????

?????????????????????Lambda???Kappa???????????????????????????Lambda???Kappa???????????????????????????????????????Lambda???Kappa?????????????????????????????????

???????????????????????????????????????????????????????????????????????????????????????

3)????

???????????????????????????

  • ???HA

????Pipeline????????????????????????????????????????????????????????????

  • SLA??

????????Pipeline?????????????????????????

  • ?????

? ??????????????

? ???????????????

  • ????

??????????????????????????????

  • ????

??????????????????????????????????

  • ?????????

????????????????

? ??Pipeline??????

4)????

???????????????????????????

  • ????

???????????????????

  • ????

?????????????????????????

  • ????

???????????????????????????

  • ????

???????????????????

5)????

?????????????????????????????????????????????????SQL??????

6)????

???????????????????????????????????????????????????????????????????????????????????????????Pipeline?????????????????????????????????????????????????????????

?????????????RTDP????????????????????????????????RTDP???????????????????????????????????????????????????????????????????RTDP?????????????????????RTDP???????????????????????????????????????????RTDP????????

 

??????

?????????