#就地避難在家鍛鍊寫作能力
軟體工程師系統設計面試準備指南
當你有了幾年的工作經驗以後,在找工作時一定會遇到系統設計的面試,有鑒於大部分的面試心得都是針對演算法以及資料結構的程式面試 (包括我之前寫的美國軟體工程師求職心得),對於系統設計的準備資源還真的不多,本篇要來剖析系統設計面試,介紹面試的流程、正確的心態以及準備的方向,讓大家再也不怕系統設計面試!
Medium 好讀版:https://medium.com/jktech/%E8%BB%9F%E9%AB%94%E5%B7%A5%E7%A8%8B%E5%B8%AB%E7%B3%BB%E7%B5%B1%E8%A8%AD%E8%A8%88%E6%BA%96%E5%82%99%E6%8C%87%E5%8D%97-acf6ab1f502f?source=friends_link&sk=ca40acf60b749cb1b32c17a868b0c1a3
#為什麼系統設計很重要?
在程式面試表現優異,可以讓你順利拿到 Offer;但是系統設計會決定你加入公司的職等!這也就是為什麼有些人有十年經驗只能拿到 Mid-Level (L4) 的 Offer,而有些人只有五年經驗卻可以拿到資深工程師以上 (L5+) 的 Offer。
另外,如果你是面試 Staff 或是 Principal 級別以上的話,除了系統設計以外,有些公司還會有 Technical Leadership 的面試,來判斷你是否有能力可以跟不同的部門合作、解決問題的不確定性、帶領資淺的人然後推動並且完成一個跨部門的大型技術專案。
簡單來說,系統設計用來判斷你是 L4 或是 L5+,Technical Leadership 面試用來判斷是 L5 或是 L6+。
#為什麼系統設計很難準備?
大多數應徵者在準備的時候會過度偏重於程式面試,原因也不難理解,程式問題的定義很清楚,有給定的輸入以及預期的輸出,就算你真的想不出來,LeetCode 上的討論區也有參考答案;這種有考古題可以參考的面試,對於台灣教育出來的人來說相對好準備,隨著你解的問題多了,你也會更有信心,不知不覺甚至還會刷上癮了呢!但系統設計卻非如此。
系統設計面試的問題描述通常很模糊 (這是刻意的),沒有給定的輸入與輸出,比較沒有既定規則可以遵循,然後也沒有一個標準答案,針對不同系統你需要提出不同的解法然後分析優缺點,一樣的問題,面試官也會針對你過去經驗往不同的方向問,有些問題你工作上沒有碰過還真的回答不出來,這也就是為什麼很多人看到系統面試就怕了。
#到底要怎麼準備?
首先我們要先建立一個觀念:沒有任何一個人可以知道所有的技術細節
不管你的面試官有多少年經驗,不管他們再怎麼資深,在變化快速的軟體產業,沒有人可以知道所有事情,一定有你知道而他們沒聽過的事情!
請把系統設計當成分享你過去所學的面試,這個面試的目的在於展示你對於軟體架構能力的廣度跟深度,你必須可以給出大方向的架構,知道有哪些元件 (廣度),同時針對你熟悉的領域深入探討更多細節 (深度),並且提出幾個解決方案,分析優缺點,並且針對系統需求選擇合適的解法。
大方承認自己對某些領域的細節不熟,也是完全沒問題的,只要讓面試官了解你知道這個東西,如果要深入了解的話你知道有哪些方向要努力,這樣就夠了,因為在大型的軟體專案裡,一定是高度分工的,不會有人同時精通手機端、前端、後端、Infra 以及嵌入式或是硬體的。
講到這裡,相信你也知道如果真的要準備是準備不完的,這些知識是透過平常工作以及閱讀技術文章長期累積的成果,比較沒辦法臨時抱佛腳。
#具體來說會問什麼問題
舉例來說,一個系統設計的問題會像是這樣:如何設計 Facebook?
這類問題的描述通常會很大而且模糊,面試官不預期而且你也不可能在 45 分鐘內就設計出這些公司花了好幾年這麼多人力設計出來的產品,所以第一步要做的事情是確認需求:是要設計動態牆、Messenger、廣告系統還是推薦系統?流量跟資料量為多少?需要支援全球的使用者嗎?
確認完需求以後,會針對最重要的幾個使用場景設計你的 Data model 以及 API,接著畫出大的系統架構圖,大致上會包含客戶端 (手機版/桌面版)、Load Balancer (Reverse Proxy)、App Servers 以及資料庫,接著可以針對細節下去討論,這邊開始就很自由了。
如果你是專精在資料庫,可以討論要用什麼資料庫以及資料要怎麼存可以讓特定使用場景的讀取以及寫入效能比較好,要怎麼做資料庫的 Replication 跟 Sharding 來服務更多的使用者?
如果講到快取,哪些地方可以加快取呢 (瀏覽器前端, CDN, App Server, 資料庫)?具體來說寫入快取有哪些方式以及優缺點 (write-through, write-around, write-back)?什麼時候要失效?要讓哪些資料失效?
如果聊到微服務器架構跟 Service Mesh,不同的服務怎麼跟其他的服務溝通? control plane 要怎麼更新 data plane 的設定?如果 control plane 掛了怎麼辦?要怎麼做 service discovery? 哪一種 Load Balancing 策略比較好 (round robin, random, least connection, ring hash, or maglev)?有些服務掛了影響到整個系統怎麼辦?什麼時候需要 circuit breaker ?
如果你是手機開發者,怎麼實現離線瀏覽?手機要有資料庫嗎?要怎麼以及多常跟伺服器同步?API 要怎麼設計?如何實現 Infinite Loading?剛 Po 文以後要怎麼樣在自己手機上馬上看到?
這些問題真的列舉不完,總之看到這裡你會了解為什麼我說這個面試是沒有範圍而且也準備不完的,重點應該放在跟面試官的討論,展現你在技術方面的廣度跟深度,讓面試結束的時候能夠有一個你們兩個人都同意的設計!
#準備材料
系統設計的資源比較分散,以下是我篩選過後覺得有用的資料,按照素材的類型作分類,也歡迎大家留言補充!
#入門影片
針對完全沒有概念的新手,我建議可以先從哈佛的 CS75 Lecture 9 Scalability 開始,裡面講到的很多基礎觀念都相當重要,值得一再複習,這些概念先有了以後再閱讀其他的材料會比較有感覺:
如果你看完這篇文章後還想再多了解系統面試的形式,也可以看一個前 Facebook 工程師分享的影片:
Distributed Systems in One Lesson 也很推,裡面提到不少業界在使用的設計模式:
有一個需要付費的資源是 SystemsExpert,每個影片會講解一個系統設計重要的概念,我個人覺得內容有點淺所以沒有買,但是整理地還算不錯,如果你看完他們免費的影片有興趣還是可以參考一下。
#閱讀文章
影片是一個讓你很好理解大方向概念的方式,但是如果你要深入理解背後的原理還有怎麼運作的細節,還是得透過大量以及深度的閱讀來吸收呀!
system design primer 整理了很多系統設計的資源,資料量很夠, 個人的建議是先快速過一遍,不要細讀,先知道總共有哪些元件,大概是做什麼用的就好,接著針對有興趣的部分在深入研究,建立自己的知識庫。
Grokking the System Design Interview 也是很多人推薦的材料,主要是針對系統設計的問題提供範例解答,他們的答案可以當作一個參考,但面試的時候不要完全照著回答,還是得看跟面試官討論的結果來進行,但這個是需要付費的,有興趣可以用我的推薦碼註冊購買。
如果你不想花錢或是不確定 Grokking 的文章你喜不喜歡,有一個類似的網站 Crack the System Design Interview 整理得也還不錯。
#書籍
唸書是一個有系統性學習的方法,如果你只想選一本書來看,就選這本大家都推的系統設計聖經 — Designing Data-Intensive Applications,簡稱 DDIA,這本書適合的對象是想要長期準備系統設計或是分散式系統的人,裡面舉的例子都是實際上業界遇到的問題,不會有以前讀教科書那種工作又用不到的感覺;但也因為是書,花了一些篇幅在講解背景知識,包含以前的系統是怎麼設計的以及如何演進到現在,對短期要準備面試的人效率會有點低,所以不適合有時間壓力的人。
這本書我目前讀了一半,最大的收獲是它解釋了很多為什麼現代的系統要做這樣的設計,我們針對不同的系統要求可以有哪些解法,這些解法各有什麼優缺點,總之分散式系統就是我們解決了一個問題,但又會產生更多要考量的點,一切都是 trade-off。
但這本書也不是沒有缺點的,首先我覺得是本書的英文沒有很好讀,我常常一段看了好幾遍才知道他想表達的重點是什麼,而且,有些很重要的觀念常常藏在一段文字裡用一句話帶過,但是不太重要的觀念卻使用 Bullet Point 表達;另外這本書話常常講一半,一些觀念提到了一點卻說我們後面再聊,也因為這樣,我在考慮要不要幫大家整理每一個章節的重點,翻成中文分享給大家,有興趣的朋友麻煩拍手留言告訴我!
除此之外,Google 的 SRE Books 內容也很實在,但是每一個章節的內容是獨立的,建議大家選擇想研究的章節跳著看就好。
最後,Distributed systems for fun and profit 的內容也很好,以分散式系統的理論為主,比較沒那麼針對系統設計面試。
#還想閱讀更多嗎?
我知道光是上面的資源就已經讀不完了,但是行有餘力的話,平時也可以多看看各大公司的技術部落格或是訂閱技術週刊如 TechBridge (台灣) 、HackerNews 以及 InfoQ 等等。
此外,參考別人的經驗也是很好的方式,最近剛好幾個朋友剛找完工作,他們分享的矽谷找資深工程師工作心得分享以及2020 上半年軟工找工經驗分享也都很值得看!
最後,在工作上使用到的技術,除了會用以外,最好也要花時間去研讀技術文件,了解他們設計的考量以及支援的場景,大部分這類型針對開發者的文件寫得會比較深入,所以也是相當好的學習素材;我自己過去一年因為工作上需要整合 Envoy 到我們公司的 Traffic Infrastructure,從他們的文件中學到很多 Service Mesh 跟微服務器的重要概念,學習的深度都是其他資源無法提供的。
#總結
這篇文章我們整理了很豐富的系統設計資源,希望大家不要被這滿滿的資訊量嚇跑。
請記得,我們永遠有各種方法在短期內針對面試做準備,提升面試的表現,但這都只是一時的,沒辦法讓你一夕之間就成為專家;如果想要追求長期的持續成長,那麼沒有捷徑 — 就是養成每天學習以及閱讀的習慣,一開始真的很難看到效果,但是當你持續一週、一個月甚至是一年以後,你會明顯感受到自己的成長,這些投入的時間都是騙不了人的。
如果這篇文章對你有幫助,請拍手留言加訂閱,並且分享給更多有需要的人知道!
system infrastructure中文 在 陳星合 Facebook 的最佳解答
麻煩大家幫忙
留下優秀的一家人
他們來自波多黎各
父母親都是名校約翰霍普金大學的電腦碩士
(Master Degree in Computer Science - Johns Hopkins University at Laurel, MD)
他們著五個孩子,到全世界學習
Diego 17歲 Paula 13 歲 Alonzo 12 歲
Felizi 8 歲 Matteo 6 歲
八月,他們到了台灣
發覺這是一個非常適合的生活環境
有好的醫療、中文學習環境、電腦產業、和超好吃的水果
九月,Diego , Paula, Alonzo進入惠文高中寄讀
他們來了之後,學校形成一個很棒的英語學習情境
台灣學生都被迫用英文跟他們互動
星期五與台北歌德學院簽訂德國「PASCH夥伴學校」時
他們三個和學校弦樂社一起合奏卡農(見影片)
非常非常有教養的一家人
然而他們11月就必須離開台灣
因為他們來台灣的第五天
得到美國總公司的通知
他們收掉波多黎各的公司
爸爸Tommy失業了
所以這幾天,他在台中接一個英文家教
但經濟仍是問題
如果台中的朋友可以提供11月4日前的短期英文、西班牙文家教工作
或是提供長期電腦工程師的工作
麻煩和Tommy聯絡
以下是他的聯絡方式及完整資歷
(願意幫他們申請工作簽證更好)
他們很願意把台灣當成第二個家
PS
覺得政府說要把英文變成第二語言
最棒的方式是吸引國外的學生進入我們的校園
在人才即國力的年代
讓優秀的國際人才留在台灣
如果在台灣就有很好的英語學習環境
我們就不用一窩蜂跑到國外
聯絡TOMMY IRIZARRY-SIKES
Contact Information
Postal: Lane 400, Unit 11, Section 2, Nantun Road, Nantun District, Taichung City, Taiwan 408
Email: tirizar@gmail.com
Phone number: 0908 979 417
LinkedIn Profile: http://pr.linkedin.com/pub/tommy-irizarry/25/16/815
孩子的影片
Diego violin in a quartet:
https://youtu.be/ArkvU8Czmk8?t=37s
Diego violin Doble de Bach:
https://youtu.be/LYvnKwEueyA
Diego plays piano Clair de Lune:
https://youtu.be/CWCQMo5XJEY?t=14s
You can see some other videos in this YouTube channel:
https://www.youtube.com/user/tirizar/videos?reload=9
履歷
Summary of qualifications
Software developer for private industries and government agencies. Proficient web developer using classic ASP code, standard html, CSS and SQL Server for data storage. Web server administrator and SharePoint Power User.
Android developer
Certified Ethical Hacker
Programming / Markup languages: HTML, XML, ASP, PHP, CSS, JavaScript/AJAX/JQuery, experience with Java, C++ and C.
Mobile development: Java, Android, Android Studio.
Technologies / Tools: IIS 6.0/7.5, SQL Server, Dreamweaver, Fireworks, Microsoft SharePoint 2007/2010, Microsoft Office suite including InfoPath, Access, Excel, Google Analytics, Google AdSense, Facebook Advertising, Microsoft SharePoint Designer, Inquisite Surveys.
Experience
Since November 2016-current
Enterprise Iron
Principal consultant – Web Developer
Worked on the redesign efforts of the secure site for an international financial client. Applied responsive design principles using the Bootstrap framework while creating modular, reusable components of the code. Analyzed web page dependencies and identified legacy unused pages in the system.
Since November 2015-current
e-Nabler Corporation
Android developer – Professional Services Contract
Developed Java code for the eMobilePOS and Tupyx apps for their Android versions.
Since October 2013-November 2014 TEK Systems
Web Developer / Web Master for the Department of Veterans Affairs in DC
Continued supporting Veteran’s Affairs IT systems, including managing SharePoint 2010 systems and supporting databases. We identified issues with several databases including the management of IIS and SharePoint logs which were consuming many recourses and in a couple of occasions made the systems unavailable.
Enabled and configured space monitoring tools in the SharePoint server farms.
Since November 2011-September 2013 Centuria Corporation
Web Developer / Web Master for the Department of Veterans Affairs in DC
Developed a training registration web site that has been tweaked and used multiple times for different registration purposes, including new telephone system training, and scheduling software upgrades of encryption on laptops and upgrades to Apple Mac OS. The system uses a web front end and a SQL back end.
Performed a routine web server maintenance tasks including monitoring traffic logs, identifying and archiving sites no longer in use, evaluating tools to assist in the management of the web server.
Administered and migrated the FTP server from Windows 2003 Server / IIS 6 into Windows 2008 R2 Server / IIS 7.5. Configured new sites to support general operations within the VA Intranet.
Maintained and enhanced legacy sites, modifying forms and reports in needs to be updated. This includes modification and creation of site in the Enterprise Content Management System used at the VA.
Assisted other team members in various tasks including the creating or modification of surveys in the Inquisite system, and also the migration of some surveys into SharePoint, the modification of an Access application.
December 2001 – August 2011
Systems & System Software Solutions
Web Developer / Web Master for the Department of Veterans Affairs in DC
Mr. Irizarry developed a web based application for the State Home Per Diem Office, which manages millions of dollars in payments to the state homes, to replace an Access database. The Access database was converted to MS SQL Server database and all data was migrated successfully. He created a web based interface using the standard VA intranet look and feel. He also developed a custom interface for each of the 3 roles (CBO, VAMC and VISN). Tools were built for the administrator to view current reports, view missing reports lists, and configure many parameters in the application. The VAMC report form was heavily automated using jQuery to perform auto calculations, increasing data validation and saving time to the users. After the application was launched users commented frequently about how user friendly is the new interface and about the time savings. Tasks that will take 2 hours to be completed now take 15 minutes. We have close to 12,000 reports in the system.
There were various requests to the IT office for a web based training registration system of different types. Mr. Irizarry developed a registration system which was later used for the following projects: Take your child to work day, New Telephone system training registration, Laptop Hard Drive encryption software upgrade among others.
Developed an alternate cascading style sheet for SharePoint 2007, converting the out of the box look and feel to the Department of Veterans Affairs standard website look and feel.
After one of the VA’s laptops was stolen Mr. Irizarry worked to develop a Risk Assessment web based application. He created an Excel template which management will upload to an FTP server with information and details about remote employee access and the sensibility of the data accessed by those users. He also created VB Scripts to validate those Excel files an upload that information into an MS SQL database. Reports for upper management in Central Office were then created which prompted management to enforce stronger security measures, like hard drives encryption. In total more than 500,000 records were processed for the reports.
Administration of IIS 6.0 web server and MS SQL Server databases used in our websites.
Wrote migration scripts to move IIS 6.0 sites into a new IIS 7.5 server
Designed, developed and maintained multi-tier applications for the Veterans Health Administration. Most of the sites access a MS-SQL Server database, use cascade style sheets and ASP server side processing. The sites were developed using Adobe/Macromedia tools like Fireworks, and Dreamweaver.
Installed BlackBerry wireless email devices and trained users on the basic device usage.
Web developer for the Department of Veterans Affairs. Redesigned and modified web pages to make them compliant with the Section 508 guidelines. Tested validation tools that verify if web pages are “Section 508” compliant. Section 508 are guidelines that must be followed by all government agencies and points to which government resources must be make accessible to people with disabilities, i.e. blind, deaf, etc.
November 1999 - December 2001
Compaq Computer Corporation
Consulting Associate II
Design and develop the XOOB (Xevo out of the box) Web user interface. XOOB uses COM+, ASP, XML, XSL and JavaScript to provide a web user interface to the Xevo Workbench Platform based on the role associated with the user. Development was done using Visual Studio tools, IIS and XMLSpy.
Develop Active Server Pages for the Helpdesk solution for the PrimusASP project.
Design and code an ActiveX component that serves as the bridge between the Compaq ASP Framework and the Infranet billing system for Primus. Supported integration with other components of our framework.
Design, code and troubleshoot software for the Primus ASP (Application Service Provider) project. Software includes a DLL and various VB programs that run as NT Services, which are key components of the Compaq ASP framework.
June 1998 – October 1999
National Security Agency
Computer Scientist
Mr. Irizarry worked for as a software developer for the TOKENEER project. TOKENEER is a test platform for the integration of smart cards, biometrics (fingerprint, hand, iris and facial recognition) and a public key infrastructure. Development was done on Windows NT workstations using Visual C++ and Visual SourceSafe for source control. Mr. Irizarry used an SDK to capture and match fingerprints against a database of fingerprints. He also created software to created some statistics of “False Accepts and False Reject Rates” of the fingerprint. He also worked with other team members to identify which fingerprints characteristics could affect those rates. He then added error detection functions to the fingerprint recognition software to identify corrupted files of fingerprint images
Conducted research for methods to add security services to an off-the-shelf computer.
Developed C code to process fax data on an UltraSparc/SunOS station.
Wrote software to generate a daily report of traffic load in a telephone switch by analyzing the switch logs.
Education
Certifications:
Certified Ethical Hacker – 03/28/2014
Master Degree in Computer Science - May, 2001 Johns Hopkin
system infrastructure中文 在 民主進步黨 Facebook 的精選貼文
【民主進步黨 31 週年黨慶外交使節酒會 蔡英文主席致詞全文】
(中文版本:https://goo.gl/HczWgc)
Members of the diplomatic community distinguished guests good afternoon!
Nine years ago I took the chairpersonship of the Democratic Progressive Party for the first time. As many of you may know in the same year the party had just lost the 2008 presidential election.
To rebuild the people’s trust in the DPP I launched a small-donor campaign. I asked the public for their support so that we could get back on our feet again and become a viable opposition party.
I knew regaining the public’s confidence would take time so I didn’t expect the response to come quickly. Within a month a lady who earned a living by washing dishes sent us an envelope. There was 20000 dollars and a note inside. The note said: “I ask for nothing in return but your party to safeguard the sovereignty of Taiwan”.
There were tens of thousands of people like her. They came from all walks of life generously pledging their support for the DPP. They felt strongly about the democratic values the party stood for. They believed the DPP is a force capable of moving Taiwan forward once again.
Today I am here commemorating the 31st anniversary of the DPP with you in my capacity as Taiwan’s ruling party. I am pleased to have the opportunity to say we are delivering on those expectations. We have not shied away from the momentous responsibilities placed upon us.
Since my election I have completed pension reform a task previous administrations were not able to achieve. The number of social housing throughout Taiwan is rapidly increasing. Our long-term care plan is gradually benefitting more and more seniors.
One of our most critical pieces of legislation the forward-looking infrastructure plan has passed. At the same time we are also working to reform the military the judiciary and the tax system.
Our economy is improving too. Export orders have seen 12 consecutive months of growth. GDP growth has exceeded past expectations. Following the announcement of public sector wage increases the private sector is also following suit. The unemployment rate in August was 3.76 per cent the lowest it had been in 26 months.
In addition to this we have taken steadfast and pragmatic steps to broaden Taiwan’s international space and strengthen relations with countries around the world.
Of particular importance are Taiwan’s diplomatic allies. We are grateful to the 15 countries that voiced their support for Taiwan at the UN General Assembly earlier this month. We are determined to work with all diplomatic allies in order to more effectively support their development.
For like-minded countries we are furthering trade and investment ties as well as cooperation on issues like innovation green energy and science and technology. We have kept in close communication regarding the shared security challenges in the region.
Another one of our foreign policy priorities is the New Southbound Policy. We have worked tirelessly for Taiwan to play a greater role in the region particularly in areas of trade investment education tourism and culture.
We’re seeing the dividends of such efforts. Tourism from New Southbound countries has increased by 36.7% from the year prior. Trade is up 19.39%. The number of students from these countries has also increased by almost 10%. All of this has brought Taiwan and New Southbound countries closer together.
Taiwan would not be where it is today without support from international society. The countries you represent have walked with Taiwan along our journey towards a democracy. Together we have witnessed Taiwan’s transition from a net-recipient to a contributor around the world.
Today it is undeniable that Taiwan is an active member of the international community. I’m sure that our efforts in health education human rights regional security and climate change have not gone unnoticed around the world.
In fact we recently released our very first Voluntary National Review documenting our efforts for the UN Sustainable Development Goals.
In the coming years Taiwan’s international participation will continue to face many challenges. Taiwan deserves your support so that as a partner we can contribute to a safer healthier and more prosperous global community.
I started this speech with a story of how one step at a time the DPP regained the trust and confidence of the people.
This story is also relevant for Taiwan’s international situation. Only through continued support from international society even if it is incremental can Taiwan play a greater role around the world.
We have already made our intentions clear. Taiwan is ready to work with each of your countries to create a more democratic secure and prosperous international society. I hope that you will also be willing to work with Taiwan for a better joint future.
I would like to thank you all for coming today. Let us raise our glasses to cheer for our continued friendship. Cheers! Thank you!
新聞稿全文連結:https://goo.gl/HczWgc