虚拟化 半虚拟化 全虚拟化

Expedia Group Technology —软件 (EXPEDIA GROUP TECHNOLOGY — SOFTWARE)

This summer, I interned at one of the largest travel companies in the world, Expedia Group™️. Who knew during a pandemic, when travel is at an all-time low, Expedia had a great intern program planned for us!

今年夏天,我在全球最大的旅游公司之一Expedia Group™️实习。 谁知道在大流行期间,当旅行达到历史最低水平时,Expedia为我们计划了一个很棒的实习计划!

Luckily, my previous internship was remote too, so I was kind of used to work from home. In this internship, I mostly worked on cloud and data engineering.

幸运的是,我以前的实习也很遥远,所以我习惯于在家工作。 在这次实习中,我主要从事云和数据工程方面的工作。

入职周 (The induction week)

Expedia organized an induction week for us, and it involved workshops on various topics: how to become a better leader, what a designer does, and we even got to know how Expedia operates. We kept on having workshops throughout our internships, and there was a lot to learn from each session.

Expedia为我们组织了一个入门周,其中涉及各种主题的研讨会:如何成为更好的领导者,设计师的工作方式,甚至我们都知道Expedia的运作方式。 在整个实习期间,我们一直在举办研讨会,每次会议都需要学习很多东西。

我的设定 (My setup)

Not the fanciest setup out there, but enough to get the work done :)
那里不是最完美的设置,但足以完成工作:)

我的团队 (My Team)

I was a part of the Stay Experience team, which looks after the post-booking experience for a traveller. The team was divided into pods, and I worked on the .Net Stack Modernisation pod. My work involved making a microservice and figuring out how to deploy it to the cloud.

我是“住宿体验”团队的成员,该团队负责为旅行者提供预订后的体验。 团队被划分为Pod,我在.Net Stack Modernization Pod中工作。 我的工作涉及制作微服务,并弄清楚如何将其部署到云中。

I worked with a manager and a buddy. We synced up every week and discussed work updates every day. It motivated me to stay on track. I also synced up with our project sponsor a few times. I enjoyed such one on one sessions. They helped me connect with the team better.

我和一个经理和一个伙伴一起工作。 我们每周同步并每天讨论工作更新。 这激励了我继续前进。 我还与项目发起人进行了几次同步。 我很喜欢这样的一对一会议。 他们帮助我更好地与团队联系。

All the Vrbo interns together had weekly sync with the Vrbo managers. We socialized, played some games, got help on some issues. It was nice to have someone for support throughout the program, and these calls also helped me get to know the other interns better.

所有Vrbo实习生都每周与Vrbo经理进行同步。 我们进行了社交,玩了一些游戏,在某些问题上得到了帮助。 能在整个计划中得到支持是一件很高兴的事,这些电话也帮助我更好地了解了其他实习生。

项目:创建一个Spark作业以将数据从MongoDB同步到S3 (The project: Create a Spark job to sync data from MongoDB to S3)

动机 (Motivation)

We have a database which stores the notifications for guests of guests in a homestay. Now we wanted a way in which we can store the data in S3 and keep it updated.

我们有一个数据库,用于存储寄宿家庭中客人的通知。 现在我们想要一种可以将数据存储在S3中并保持更新的方法。

Why are you storing the data in two different places?

为什么将数据存储在两个不同的位置?

This data is not only used to send a notification but also by an analyst or data scientist. The MongoDB database also backs the guests of guests API, and if everyone does their operations on MongoDB, it might severely affect the API.

该数据不仅用于发送通知,而且还用于分析人员或数据科学家。 MongoDB数据库还支持guest虚拟机API的guest虚拟机,如果每个人都在MongoDB上进行操作,则可能会严重影响API。

We finally came up with the idea to use a Spark job. This job would take the data from MongoDB and store it in an S3 bucket.

我们终于想到了使用Spark作业的想法。 此作业将从MongoDB中获取数据并将其存储在S3存储桶中。

Why a Spark job?

为什么要从事Spark工作?

Spark and Scala are the industry standard for data management. The jobs will be able to manage huge amounts of data without any hiccups.

Spark和Scala是数据管理的行业标准。 这些作业将能够管理大量数据而不会造成任何麻烦。

快速修订 (A quick revision)

This blog is going to get more technical now, so here’s a quick reference if you need a reminder.

该博客现在将获得更多技术知识,因此如果您需要提醒,这里有快速参考。

What’s MongoDB? It’s a NoSQL database.What’s Scala? It’s a programming language widely used for data management. I did all my coding in the Scala language.What’s Apache Spark? It’s a fast and general-purpose cluster computing system for large scale data processing. Some important terms to know about from Spark are:

什么是MongoDB? 这是一个NoSQL数据库。 什么是Scala? 这是一种广泛用于数据管理的编程语言。 我用Scala语言进行了所有编码。 什么是Apache Spark? 它是用于大规模数据处理的快速通用集群计算系统。 从Spark需要了解的一些重要术语是:

  • Dataframe: This is data in the form of a table, just like a relational database table.数据框:这是表形式的数据,就像关系数据库表一样。
  • Dataset: Extension of Dataframes. They provide the functionality of being type-safe and support an object-oriented programming interface.数据集:数据框的扩展。 它们提供类型安全的功能,并支持面向对象的编程接口。
  • SparkSession vs SparkContext: SparkSession is a unified entry point of a Spark application, starting with Spark 2.0. It provides a way to interact with various Spark functionality, and encapsulates Spark context, hive context, and SQL context all together.SparkSession与SparkContext:SparkSession是Spark应用程序的统一入口,从Spark 2.0开始。 它提供了一种与各种Spark功能进行交互的方式,并将Spark上下文,配置单元上下文和SQL上下文封装在一起。
  • Prior to Spark 2.0, SparkContext was the entry point of any Spark application and used to access all Spark features. More recently, it is encapsulated in a SparkSession.在Spark 2.0之前,SparkContext是任何Spark应用程序的入口点,用于访问所有Spark功能。 最近,它封装在SparkSession中。

What’s a Spark job? In a Spark application, when you invoke an action on the data set, a job is created. It’s the main function that has to be done and submitted to Spark.What’s a vault? Hashicorp Vault is a tool for secrets management, encryption as a service, and privileged access management.What’s an S3 bucket? Just a simple distributed file storage system, think of it as the hard disk on your computer

什么是Spark工作? 在Spark应用程序中,当您对数据集调用操作时,将创建一个作业。 这是必须完成并提交给Spark的主要功能。 什么是金库? Hashicorp Vault是用于秘密管理,加密即服务和特权访问管理的工具。 什么是S3存储桶? 只是一个简单的分布式文件存储系统,可以将其视为计算机上的硬盘

The technology stack
技术栈

方法 (Approach)

The Spark job does the following:

Spark作业执行以下操作:

  • Authenticates against the vault and gets the secrets对金库进行身份验证并获取秘密
  • Reads the updated data from MongoDB从MongoDB读取更新的数据
  • Reads the data stored in the S3 bucket (it’s in Apache Parquet format)读取存储在S3存储桶中的数据(采用Apache Parquet格式)
  • Does a left anti join on the S3 and Mongo data, yielding the data that did not change在S3和Mongo数据上进行左反连接,产生未更改的数据
  • Merges the data that didn’t change with the new data合并未更改的数据与新数据
  • Writes the data in Parquet format to the S3 bucket将Parquet格式的数据写入S3存储桶

The authentication process is more complicated than just sending a saved token:

认证过程比仅发送保存的令牌还要复杂:

  • Grab the EC2 metadata and nonce获取EC2元数据和随机数
  • Send the metadata and nonce to Vault将元数据和随机数发送到保险柜
  • Vault checks if the EC2 instance is allowed and the nonce is correct保险柜检查是否允许EC2实例且随机数正确
  • Send a nonce to the Vault server and get a token将随机数发送到Vault服务器并获得令牌
  • Get secrets like AWS access key, AWS secret key, or MongoDB password via the token通过令牌获取诸如AWS访问密钥,AWS秘密密钥或MongoDB密码之类的秘密

Here’s a simplified example explaining the method:

这是解释该方法的简化示例:

Mongo data:id  author book   updateTime1   A1     B1     T12   A2     B2     T23   A3     B3     T34   A4     B4     T4S3 data:id  author book   updateTime1   A1     B1     T12   A2     B2     T23   A3     B3     T2.1Step 1:Get all docs from Mongo between updateTime1 and updateTime2 where T2 < updateTime1 < updateTime2Fetched records:3   A3     B3     T34   A4     B4     T4Step 2:Read all records from S3.Fetched records:1   A1     B1     T12   A2     B2     T23   A3     B3     T2.1Step 3:Left anti join on id between S3 and Mongo data so that we have the data that did not change1   A1     B1     T12   A2     B2     T2Step 4:Merge results of Step 3 with data fetched in Step 1.Resulting data set:1   A1     B1     T12   A2     B2     T23   A3     B3     T34   A4     B4     T4Save this back to S3. You can see how this data is in sync with Mongo data.

挑战(以及我如何应对) (Challenges (and how I tackled them))

VPN Issues: I needed to use a VPN to remotely access project documentation and tools, but the VPN I was using did not support Linux or WSL, so I had to work in Windows, which I’m not as familiar with. It was not fun to learn Windows versions of the one-line commands I know in Linux.

VPN问题:我需要使用VPN来远程访问项目文档和工具,但是我使用的VPN不支持Linux或WSL ,因此我不得不在Windows上工作,而我对此并不熟悉。 学习Linux中我知道的单行命令的Windows版本并不有趣。

However, I found a hack for this. I created an EC2 instance on the Expedia network and shifted all my work to that, using Windows just for the VPN and tools like a terminal window. Because the instance is on the corporate network, I could access everything I needed from there, and as a bonus the scripts ran much faster on the instance than on my computer.

但是,我为此找到了一个办法。 我在Expedia网络上创建了一个EC2实例,并将所有工作转移到该实例上,仅将Windows用于VPN和诸如终端窗口之类的工具。 因为实例位于公司网络上,所以我可以从那里访问所需的一切,此外,脚本在实例上的运行速度比在计算机上快得多。

RAM Issues: I started off using IntelliJ since it was easy to set up a Scala project with it. But on my machine Intellij was terribly slow and took a lot of RAM.

RAM问题:我开始使用IntelliJ,因为使用它轻松设置Scala项目。 但是在我的机器上,Intellij非常慢,并占用了大量RAM。

  • I later switched to VSCode plus Metals. Although it was a little more time consuming to set up, once understood, all RAM issues were solved. Also, using bloop instead of sbt decreased compile time.后来我改用VSCode加金属。 尽管建立起来比较耗时,但是一旦了解,所有的RAM问题都得到解决。 同样,使用bloop代替sbt可以减少编译时间。
  • Having a local MongoDB server for testing was also quite RAM hungry, MongoDB Atlas helped me a lot here. I deployed a free cluster in the cloud, and my work was done :)拥有用于测试的本地MongoDB服务器也非常耗费RAM,MongoDB Atlas在这里给了我很多帮助。 我在云中部署了一个免费的集群,我的工作就完成了:)

Spark and MongoDB

Spark和MongoDB

  • Spark has some underlying concepts which were a little nontrivial to understand, at least for a first-timer like me. Above that, the documentation of the MongoDB-Spark connector was following old Spark conventions in some places and new conventions in other places. The documentation confused me a bit.Spark具有一些根本的概念,至少对于像我这样的初学者来说,这些概念是不容易理解的。 除此之外,MongoDB-Spark连接器的文档在某些地方遵循旧的Spark约定,而在其他地方遵循新的约定。 文档使我有些困惑。

Understanding Vault EC2 authentication

了解Vault EC2身份验证

  • Learning how to do Authentication took most of the time. Being a college student, I hadn’t had to worry about securing my applications in projects, since we really didn’t put something into production.学习身份验证的大部分时间都花在了身上。 作为一名大学生,我不必担心在项目中确保我的应用程序的安全,因为我们确实没有在生产中投入任何东西。
  • I learned about Hashicorp Vault (for storing secrets), Terraform (for building instances from code) and Consul (a backend for Vault).我了解了Hashicorp Vault(用于存储机密),Terraform(用于从代码构建实例)和Consul(Vault的后端)。
  • Rather than having a token to authenticate against Vault and get the secrets, a better method would be to use the EC2 metadata in which the Spark job will be running to authenticate against Vault.更好的方法是使用EC2元数据(其中将运行Spark作业对Vault进行身份验证),而不是使用令牌对Vault进行身份验证并获取机密。
  • Making EC2 instances with Terraform and Consul.使用Terraform和Consul制作EC2实例。

Setting up EC2 instances

设置EC2实例

  • Setting up an instance is easy, but determining the right VPC, subnet, security groups, etc. for production really is a security design issue, and one has to decide carefully.设置实例很容易,但是为生产确定正确的VPC,子网,安全组等确实是一个安全设计问题,必须仔细决定。
  • The majority of AWS services that get hacked, are hacked because of misconfigurations, and they aren’t really Amazon’s fault.大多数被黑客入侵的AWS服务都是由于配置错误而被黑客入侵,而这并不是亚马逊的错。

谢谢 (Thanks)

Big thanks to Himanshu Verma and Arushi Dhunna for guiding me and answering my endless doubts and queries.

非常感谢Himanshu Verma和Arushi Dhunna指导我并回答了我无尽的疑问和疑问。

I would also want to thank Rohini Gupta, Anu Chopra, and Bhupinder Guleria for the weekly calls and support throughout the internship.

我还要感谢Rohini Gupta,Anu Chopra和Bhupinder Guleria在整个实习期间的每周电话和支持。

Thanks to the Early Careers Team for organizing the amazing workshops from Expedians all around the world: Jackie Kam, Rachel Tan, Chetna Mahobia. Thanks to Jim McCoy for all the help throughout the workshops.

感谢Early Careers团队组织了来自世界各地Expedians的令人惊叹的研讨会:Jackie Kam,Rachel Tan,Chetna Mahobia。 感谢Jim McCoy在整个研讨会中提供的所有帮助。

The folks on internal Slack channels #scala, #vault and #just-amazon-things also helped me with my doubts, and are very much appreciated.

内部Slack频道#scala,#vault和#just-amazon-things上的人也帮助了我,我对此表示怀疑,并非常感谢。

Originally published at https://rohanrajpal.github.io on June 17, 2020.

最初于 2020年6月17日 发布在 https://rohanrajpal.github.io

http://lifeatexpediagroup.com/ (http://lifeatexpediagroup.com/)

翻译自: https://medium.com/expedia-group-tech/the-virtual-internship-my-experience-5cc52a997bb1

虚拟化 半虚拟化 全虚拟化


http://www.taodudu.cc/news/show-6362412.html

相关文章:

  • Java面试总结,Java实习面试经验汇总
  • numpy学习日记
  • 实习常用命令总结
  • 数据分析学习日记 Day4
  • Java实习面试(2018春)
  • 实习日志二--JDBC
  • houmee实习日记4.17
  • 实习日记(第一周)
  • 在TI DSP开发板中烧写Flash程序
  • DSP28335的SPWM波生成方法
  • 一、ADSP-21489开发版在VisualDSP软件下的仿真器配置
  • 四层高速dsp开发板制作7——绘制等长线
  • TI C2000系列TMS320F2837xD开发板(DSP+FPGA)硬件规格参数说明书
  • linux查看服务端口命令大全
  • 【Python】漏斗模型--生成漏斗案例 Demo实例
  • 什么是营销漏斗模型?如何创建一个营销漏斗策略
  • Koa 框架 koa-better-body
  • kyurj
  • K - Oulipo
  • **.ko
  • KO框架
  • Koch Curve
  • coolprop
  • Koreographer音乐插件基本使用
  • Drools KIE API
  • 【Cxinny】Koa
  • Kolakoski
  • 【延期通知】Elastic 中国开发者大会 2021 举办日期延期至3月5日
  • 8月5号 图论,拓扑排序入门
  • 传智_Springmvc+Mybatis由浅入深全套视频教程(燕青)-mybatis笔记(两天)(2017年8月5日16:09:55)

虚拟化 半虚拟化 全虚拟化_我的虚拟实习经历相关推荐

  1. 洛伦茨曲线半高全宽_关于MatLab如何取某变函数半高全宽(FWHM)并Plot的问题

    使用高斯函数作为测试用例不是很恰当,计算出来的半高宽都一样. 我在peaks函数的基础上改出来一个多峰函数,还存在一些小问题,但基本上可用了,你可以先看看:X = -10 : .5 : 10; Y = ...

  2. 洛伦茨曲线半高全宽_合理的半高宽FWHM.PPT

    合理的半高宽FWHM * Asymmetry of Fe ? 2007 XPS International LLC * Asymmetry of Fe2O3 ? 2007 XPS Internatio ...

  3. 洛伦茨曲线半高全宽_洛伦兹曲线

    洛伦兹曲线 百科名片 洛伦兹曲线(Lorenz curve),也译为"劳伦兹曲线".就是,在一个总体(国家.地区)内,以"最贫穷的人口计算起一直到最富有人口"的 ...

  4. 全虚拟化与半虚拟化的实现方式

    目录 目录 全虚拟化 软件辅助的全虚拟化 硬件辅助的全虚拟化 半虚拟化 全虚拟化 不需要对GuestOS操作系统软件的源代码做任何的修改,就可以运行在这样的VMM中 在全虚拟化的虚拟平台中,Guest ...

  5. 全/半虚拟化、硬件/软件辅助的全虚拟化之间的区别与联系

    全虚拟化 不需要对GuestOS操作系统软件的源代码做任何的修改,就可以运行在这样的VMM中 在全虚拟化的虚拟平台中,GuestOS并不知道自己是一台虚拟机,它会认为自己就是运行在计算机物理硬件设备上 ...

  6. 软件模拟虚拟化、全虚拟化、半虚拟化、硬件辅助虚拟化和容器

    目前虚拟化技术有软件模拟.全虚拟化(使用二进制翻译).半虚拟化(操作系统辅助).硬件辅助虚拟化和容器虚拟化这几种. (1)软件模拟 软件模拟是通过软件完全模拟cpu.芯片组.磁盘.网卡等计算机硬件: ...

  7. 虚拟化的特性、虚拟化要点概述、虚拟化有哪些?

    虚拟化集群特性 如上图包含:物理内存.物理cpu.物理磁盘disk,这里所有的资源都被虚拟成为了虚拟资源(其中还包含网络资源) 虚拟CPU(VCPU) 虚拟内存 虚拟磁盘 还有虚拟网络资源被做成了DV ...

  8. 服务器虚拟化技术简介,服务器虚拟化技术简介

    服务器虚拟化的方式 服务器虚拟化的有多种划分方式,可以根据虚拟化架构划分为裸金属/寄居,根据虚拟化层次硬件辅助虚拟化/软件辅助虚拟化,根据虚拟化平台划分为全虚拟化/半虚拟化. 裸金属/寄居 未虚拟化 ...

  9. Docker容器与虚拟化技术——部署KVM虚拟化平台

    部署KVM虚拟化平台 一.搭建KVM虚拟化平台 1.前置知识点 (1)什么是虚拟化         把硬件资源从物理方式转变为逻辑方式,打破原有物理结构,使用户可以灵活管理这些资源,并且允许1台物理机 ...

最新文章

  1. iOS自定义转场动画实战讲解
  2. Java多线程之多线程之间按顺序调用
  3. JDBC【介绍JDBC、使用JDBC连接数据库、简单的工具类】
  4. C语言实现一个随机测试加减乘除,编写程序:C语言实现一个随堂测试,能进行加减乘除运算...
  5. java weblogic多数据源,039 在weblogic下部署jndi的多数据源
  6. [转载] python中bool啥意思_Python中的bool类型
  7. Oracle DECODE函数的语法介绍
  8. 建立自己的voc数据集_Mac上 制作自己的VOC数据集
  9. 跨时钟域问题(三)异步FIFO的Verilog实现(格雷码)
  10. cpu224xp生产方案
  11. 或且非 java_Java的运算符号(逻辑与、或、非、移位运算)
  12. 服务器的文件分发功能,Web文件分发协议
  13. codeforces1296F Berland Beauty
  14. 一个点击率10万+的恶搞程序送给大家!
  15. VS2010/MFC编程入门教程之目录和总结(鸡啄米)
  16. 数组排序:声明一个整型数组并填充数据,排序,输出排序后数据,倒序输出数据。
  17. 算法——和为K的连续子数组
  18. 【自动驾驶】鸽了很久的小物体目标检测代码【小物体目标检测】
  19. 加油站收银软件提高油站运营管理效率?
  20. Python基于tkinter的GUI编程讲座

热门文章

  1. 静电计算机故障的原因,主板因静电造成的故障现象与解决方法 -电脑资料
  2. 撕掉代工标签,能否迎来芯片市场的“权力转移”?...
  3. hdbinterface是什么_Android 手机插入电脑后提示“”ADB Interface安装失败的问题
  4. 关于视频转码后只有声音没有画面的问题
  5. js解决chrome浏览器无法自动播放音频
  6. 串口RS232/485/UART转CANbus总线转换器网关CSM100模块CANCOM
  7. http://www.dewen.net.cn/q/14665/个人感觉用二分法最完美的,需要操作系统支持随机读取指定一行的数据,貌似现在还不行,江湖救急呀...
  8. [0x7FF95C3B7860] ANOMALY: use of REX.w is meaningless (default operand size is 64)
  9. package.json 封装 vue模块_vue仿小米商城 -- 我知道的都在这里了
  10. ROS学习:cv_bridge与opencv版本冲突三种解决方案