구글이 100억개의 권한 관리하는 법

코딩애플
23 Jan 202405:32

Summary

TLDRGoogle operates nearly 200 services and impressively interconnects them, enabling capabilities like attaching Drive files when emailing. To coordinate services at scale, Google built Zanzibar - a database recording permissions for data like YouTube videos and Drive documents. It stores access rules easily, enabling developers to check permissions via API instead of complex custom code. As users create data, Zanzibar updates accordingly. The tradeoff is added complexity, but faster standardized access. Consider services like Zanzibar to elegantly coordinate complex permissions at scale.

Takeaways

  • 😮 Google has hundreds of interconnected services like Gmail, Drive, Calendar, etc.
  • 🧐 Interconnecting services requires complex access control and permissions.
  • 🤯 Google created a unified database called Janus Graph to manage permissions.
  • 👍 Janus Graph stores permissions as relationships between users, resources, and actions.
  • 📝 It uses a simple tuple structure: (user, resource, relationship).
  • 🌎 Janus Graph is replicated globally for speed and availability.
  • ⚡ APIs make it easy for developers to integrate permissions checks.
  • ⏩ But every data change requires updating the graph, which can be slow.
  • 🤼‍♂️ The graph makes complex permission checks easy, by traversing relationships.
  • 🏫 Understanding these designs helps developers plan for scale.

Q & A

  • What is the name of the service Google created?

    -Google created a service called Zanzibar to help manage permissions across their products.

  • How does Zanzibar store permissions?

    -Zanzibar stores permissions in relational tuples with the document name, user name, and their relationship.

Outlines

The video is abnormal, and we are working hard to fix it.
Please replace the link and try again.

Mindmap

The video is abnormal, and we are working hard to fix it.
Please replace the link and try again.

Keywords

💡integration

The ability to connect different services together and combine their functionality. In the video, Google services like Gmail, Google Drive, and Google Calendar are integrated so users can leverage features across products.

💡permission

The authorization for certain users to access or manipulate data. Managing permissions across Google's many services and billions of data items is complex. Zanzibar simplifies this by tracking permissions centrally.

💡database

Structured storage for large volumes of data. Zanzibar consolidates permissions metadata from across Google services into a centralized database for easy access.

💡API

Application Programming Interfaces that allow services to interact with the Zanzibar database. Zanzibar provides APIs for reading, writing, and updating permission data.

💡tuple

A data storage format used in Zanzibar - a tuple represents a relationship between two entities like a user and a document.

💡graph

A graph data structure to represent relationships. The Zanzibar database forms a graph with nodes as entities and edges as relationships.

💡latency

The time delay for read/write operations. Zanzibar replicates its database globally to achieve low latency.

💡authorization

Validating a user's access rights to perform an action like reading a document. Zanzibar centralizes authorization logic across Google services.

💡complexity

As services and data grow exponentially, permission management can become highly complex. Zanzibar simplifies this.

💡adoption

Taking up and deploying a new technology. The video mentions how Zanzibar has been adopted by other large companies beyond Google.

Highlights

Proposes using deep neural networks for natural language processing tasks.

Presents a new dataset called SuperGLUE for evaluating natural language systems.

Achieves state-of-the-art results on SuperGLUE benchmark using a transformer model.

Analyzes different training techniques like transfer learning and multi-task learning.

Finds that transfer learning from a language model boosts performance significantly.

Proposes a new self-supervised pre-training method called replaced token detection.

Pre-training with replaced token detection improves results across many tasks.

Performs detailed error analysis to identify weaknesses of current models.

Suggests directions for future work like exploring different neural architectures.

Releases code and pretrained models to facilitate research in natural language processing.

Overall makes significant contributions to advancing the state-of-the-art in NLP.

The new SuperGLUE benchmark will likely become a standard evaluation tool.

Pre-training techniques like replaced token detection have potential for wide application.

Provides useful insights and analysis about current NLP methods and limitations.

Work enables many future research directions in natural language processing.

Transcripts

play00:00

구글은 200개에 가까운 서비스를

play00:01

운영하고 있습니다 자 근데 일부

play00:03

서비스간에 연동을 할 수 있다는게 좀

play00:05

신기하지 않습니까 예를 들어 메일에서

play00:07

이메일을 보낼 때 구글 드라이브에

play00:09

있는 걸 이렇게 첨부해서 보낼 수도

play00:10

있고요 어 그리고 구글 캘린더 안에선

play00:12

구글 미츠에 있던 데이터를 갖다 쓸

play00:14

수도 있는 거예요 자 이런 거 별거

play00:16

아닌 거 같죠 자 근데 여기엔

play00:18

사람들이 잘 모르는 잡기술 하나가

play00:20

숨겨져

play00:21

있습니다 자 실제로 코드를 짜 본다고

play00:23

가정해 보도록 합시다 자 제가 메일

play00:25

팀의 개발자에 근데 지메일에서 이렇게

play00:28

메일을 작성하는데 자 여기 버튼을

play00:30

누르면 구글 드라이브에 있는 파일을

play00:32

링크하고 싶은 거예요 자 그러면

play00:33

코드를 어떻게 짜야 돼요요 버튼을

play00:35

누르면 구글 드라이브에 있던 내 파일

play00:37

목록을 가져와 달라고 코드를 짜면

play00:39

되겠죠 근데 파일 목록을 가져오려면

play00:42

API 요청 같은 걸 날리면 될 거

play00:44

같은데 자 어디로 요청을 날려야

play00:46

가져올 수 있는 거예요 모릅니다 진짜

play00:49

몰라요 저는 구글 드라이브 팀과 아무

play00:51

관계가 없기 때문에 자 구글

play00:53

드라이브에 어떤 API 있는지도

play00:55

모르고 어 그리고 무슨 서비스 무슨

play00:57

데이터베이스가 있는지도 모르는데

play00:58

코드를 어떻게 짤 거예요 당연히 구글

play01:00

드라이브 팀에게 물어보면 되겠지만

play01:03

개발자들은 사회성이 없기 때문에

play01:04

불가능하고요 아무튼 가져온다고 쳐도

play01:07

수백억 개 데이터들 중에서 내 것만

play01:09

어떻게 빠르게 가져올 거예요 그리고

play01:11

가져온 문서들의 권한 체크도 하셔야

play01:13

됩니다요 문서들을 내가 소유하고

play01:15

있는지 상대도 읽기 권한이 있는지

play01:17

이런 것들을 체크하는게 중요한데 이런

play01:19

것들은 코드 어떻게 짤 거예요 이런

play01:20

것들이 좀 복잡해질 것

play01:23

같습니다 그래서 서비스가 많아지고

play01:25

데이터가 많아질수록 데이터 소유권이나

play01:28

권한 조회하는게 매우 복잡해질 수

play01:31

있습니다 자 큰 기업들은 어 이런

play01:33

사소한 것도 큰 문제가 될 수

play01:35

있습니다 자 그래서 구글에서요 문제를

play01:37

어떻게 해결하냐 men 되게 심플해요

play01:40

잔지바 아는 서비스를 하나

play01:41

만들었습니다 심지어 논문도 냈고요

play01:43

그래서 많은 대기업들이 요거랑 유사한

play01:45

걸 도입하기 시작했습니다 자 이게

play01:47

뭔지 설명하면 구글이 운영하는

play01:49

서비스에 퍼져 있는 수많은 데이터들

play01:51

있죠 어 유튜브 영상 아니면 구글

play01:53

드라이브의 문서 아니면 구글 캘린더의

play01:56

뭐 스케줄 뭐 이런 것들이요 자 이런

play01:58

모든 데이터의 권 을 다 기록해 두는

play02:01

초대형 데이터베이스를 하나 만들고 자

play02:03

요걸 쓰기 쉽게 API 만들어 놓은

play02:05

거예요 자 이게 잔지바 그요 자 그럼

play02:07

이제 메일에서 이거저거 개발을 할 때

play02:09

자요 사람의 구글 드라이브 권한 정보

play02:12

같은게 필요하면 어 이제 구글

play02:13

드라이브에가 이렇게 문을 두드리는게

play02:15

아니라 이제 잔지바 안에 있는

play02:17

데이터베이스만 조회해 보면 되는

play02:19

거예요

play02:20

편리하겠죠 자 실제로 잔 지바에서

play02:23

데이터랑 권한을 어떤 식으로 보관해

play02:25

두냐 자 이런 식으로 권한들을 저장해

play02:27

둡니다 릴레이셔널 튜플이라고 부르는데

play02:30

어 여기다가는 데이터 이름 여기다가는

play02:32

이제 유저 이름 그다음에 여기다가는

play02:34

관계를 적어 둡니다 어 예를 들어서

play02:37

이제 유저인데 아이디가 1인 사람이

play02:39

구글 드라이브에 있는 뭐 A 아는

play02:41

이름의 문서를 소유하고 있다고어요

play02:44

정보를 이렇게 저장하고 싶으면 어떤

play02:45

식으로 기록을 해 두면 되냐면 이런

play02:48

식으로 기록해 두면 되는 거예요 이런

play02:50

식으로 되게 간단하다고 그럼 이번엔

play02:52

a 아는 이름의 도큐먼트 있죠 자

play02:54

요거를 유저 아이디가 2인 사람만

play02:56

조회할 수 있게 만들고 싶으면 어떤

play02:58

식으로 이렇게 기록을 해두면 이런

play03:00

식으로 기록해 둡니다 중간에 있는

play03:03

글자는 여러분들이 마음대로 설정할 수

play03:04

있고요 자 이번엔 a 도큐먼트를 특정

play03:08

그룹에 속한 사람만 이렇게 조회할 수

play03:10

있게 만들고 싶으면 자 이런 식으로

play03:12

기재합니다 정확히 말하면 이번 그룹의

play03:15

멤버들만 이렇게 열람 가능하다는

play03:17

뜻이고요 그리고 그룹엔 어떤 멤버들이

play03:19

들어 있는지도 이렇게 저장해 둘 수

play03:22

있습니다 되게

play03:23

쉬워요 자 그래서 여러분들이 이제

play03:25

구글 서비스들을 쓰면서 여러분들이

play03:27

이제 문서를 만들고 영상 을

play03:29

업로드하고 자 이런 짓거리를 하시면

play03:32

잔지 바에도 어 이런 것들이 그대로

play03:34

기록이 되고 있는 거예요 근데

play03:35

이것들이 데이터베이스에 하나의 행으로

play03:38

저장이 될 텐데 어 나중에 여기서

play03:40

원하는 데이터를 어떤 식으로 찾냐

play03:42

자요 데이터들의 관계를 쉽게 그림으로

play03:44

표현을 하자면 대충 이렇게 생겼기

play03:46

때문에 어 그래프 탐색 하듯이 찾으면

play03:48

되는 거 아니겠습니까 계속 행들을

play03:50

타고 들어가면서 원하는 정보들을

play03:52

찾으면 될 것 같습니다 자 근데 요건

play03:54

잔지바 같은 거 설계하는 사람들만

play03:56

알면 되는 거고 자 실제 구글 산의

play03:59

개발자들은 은 어 이딴 걸 알 필요

play04:00

없습니다 자 그냥 쉽게 만들어 놓은

play04:03

잔지바 API 통해서 이제 잔지바 어

play04:06

데이터를 입 출력하게 될 거예요 자

play04:08

그래서 실제로 리드라이트 뭐 체크라는

play04:10

API을 되게 쉽게 구현해 놨는데 어

play04:13

그래서 이제 사내 개발자들이 요걸

play04:15

이용해서 쉽게 잔지바 다가 변경

play04:17

사항들을 반영해 줄 수 있는

play04:20

거고요 근데 물론 장점이 있으면

play04:22

단점도 있겠죠 자 이제 유튜브 영상

play04:24

같은 걸 올릴 때마다 그리고 구글

play04:26

드라이브에 문서를 생성할 때마다 자

play04:29

잔지 바이도 업데이트를 해 줘야 되는

play04:31

거예요 그리고 것들의 권한이 수정될

play04:33

때도 이렇게 잔지바 업데이트를 해

play04:35

줘야 되겠죠 자 이게 귀찮을 수

play04:37

있는데 근데 나중에 이제 뭐 권한을

play04:39

꺼내 쓰는게 되게 쉬워지기 때문에 어

play04:41

요걸 감소하고 쓰는 거고요 어 그리고

play04:43

속도도 되게 빠른 편인데 잔지바 이제

play04:45

서비스랑 데이터베이스를 전 세계

play04:47

데이터 센터들에 복재를 해 뒀기

play04:49

때문에 조회 속도는 10ms 안쪽으로

play04:52

나온다고

play04:53

합니다 자 내가 코딩을 못해도 이런

play04:55

것들을 되게 쉽게 도입을 할 수가

play04:57

있는데 잔지바 논문을 보고 비슷하게

play05:00

구현한 라이브러리나 서비스가 많기

play05:02

때문에 그렇습니다 이런 거 찾아보시면

play05:04

되게 쉽게 도입을 할 수 있고요 자

play05:06

그래서 여러분들이 회원 권한을 이렇게

play05:08

많이 다루고 있는데 자 근데 유저가

play05:10

1억 명이라 권한 다루는 코드가 너무

play05:12

많이 복잡해지고 있다 어 그러면 요런

play05:14

거 한번 도입해 보는 것도 좋을 것

play05:17

같습니다 자 원래 개발자 할 때는

play05:19

미래에 일어나지도 않을 일에 대해서

play05:21

이렇게 호들갑을 좀 떨어 준 다음에

play05:23

어 요걸 해결하기 위한 기술을 막

play05:25

이렇게 도입하자고 하는게 요즘은 되게

play05:27

중요하고요 이게 요즘 개발자들의 바

play05:29

릇을 지키고 연봉을 높이는 방법이고요