由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - 问一道题,system design google docs 如何防止conflict
相关主题
西雅图公司招Analyst相关职位最近非典型的曲折的找工作经历---失败篇
delete sheets from Excel workbook in C#请问做题和实际工作的关系
一个Post Doc Position回馈本版--报告一些最近的面筋
Hiring Sr Data Scientist问一个replicate的问题
Expedia Hiring Data Scientist有人用过Perforce吗?
[内推]Liberty Mutual Boston新组大量招人developers/QAJob Opportunity: EMC Research China
请教一个C++问题这种广告是绿卡广告吗?看一遍都浪费时间啊
问个sql 题湾区硅谷工作机会 -- Application Enginner
相关话题的讨论汇总
话题: o2话题: o1话题: ot话题: character话题: docs
进入JobHunting版参与讨论
1 (共1页)
a***u
发帖数: 383
1
需要用到哪种protocol?
昨天面two sigma面的。面试题先是oo desing,要求设计一个 text editor,insert,
delete各种command,可以 redo/undo,因为曾经仔细读过design pattern那本书的第
二章,command pattern+ composite pattern。然后follow up 如何扩展成google
docs,直接答不会,最后跪了。
z******3
发帖数: 1
2
two sigma还问这种设计问题? 楼主你面的是什么职位?
z****e
发帖数: 54598
3
这个就是分布式并发冲突的问题
你该扯蛋一下分布式lock
其实你把多线程的lock琢磨琢磨
然后套上网络这些,大概都能扯出点东西来
j**********3
发帖数: 3211
4
mark
w********s
发帖数: 1570
5
svn或者perforce用过么? 你提交代码的时候会检查server上的代码是否变化冲突, 然
后让你选择merge, accept theirs, accept mine, etc.

【在 a***u 的大作中提到】
: 需要用到哪种protocol?
: 昨天面two sigma面的。面试题先是oo desing,要求设计一个 text editor,insert,
: delete各种command,可以 redo/undo,因为曾经仔细读过design pattern那本书的第
: 二章,command pattern+ composite pattern。然后follow up 如何扩展成google
: docs,直接答不会,最后跪了。

w********s
发帖数: 1570
6
In 2009 OT was adopted as a core technique behind the collaboration features
in Apache Wave and Google Docs.
https://en.m.wikipedia.org/wiki/Operational_transformation#Consistency_
models

【在 a***u 的大作中提到】
: 需要用到哪种protocol?
: 昨天面two sigma面的。面试题先是oo desing,要求设计一个 text editor,insert,
: delete各种command,可以 redo/undo,因为曾经仔细读过design pattern那本书的第
: 二章,command pattern+ composite pattern。然后follow up 如何扩展成google
: docs,直接答不会,最后跪了。

w********s
发帖数: 1570
7
The basic idea of OT can be illustrated by using a simple text editing
scenario as follows. Given a text document with a string "abc" replicated at
two collaborating sites; and two concurrent operations:
O1 = Insert[0, "x"] (to insert character "x" at position "0")
O2 = Delete[2, "c"] (to delete the character "c" at position "2")
generated by two users at collaborating sites 1 and 2, respectively. Suppose
the two operations are executed in the order of O1 and O2 (at site 1).
After executing O1, the document becomes "xabc". To execute O2 after O1, O2
must be transformed against O1 to become: O2' = Delete[3, "c"], whose
positional parameter is incremented by one due to the insertion of one
character "x" by O1. Executing O2' on "xabc" deletes the correct character "
c" and the document becomes "xab". However, if O2 is executed without
transformation, it incorrectly deletes character "b" rather than "c". The
basic idea of OT is to transform (or adjust) the parameters of an editing
operation according to the effects of previously executed concurrent
operations so that the transformed operation can achieve the correct effect
and maintain document consistency.

【在 a***u 的大作中提到】
: 需要用到哪种protocol?
: 昨天面two sigma面的。面试题先是oo desing,要求设计一个 text editor,insert,
: delete各种command,可以 redo/undo,因为曾经仔细读过design pattern那本书的第
: 二章,command pattern+ composite pattern。然后follow up 如何扩展成google
: docs,直接答不会,最后跪了。

w********s
发帖数: 1570
8
和分布式lock没关系, 人家问得是OT control (integration) algorithms

【在 z****e 的大作中提到】
: 这个就是分布式并发冲突的问题
: 你该扯蛋一下分布式lock
: 其实你把多线程的lock琢磨琢磨
: 然后套上网络这些,大概都能扯出点东西来

1 (共1页)
进入JobHunting版参与讨论
相关主题
湾区硅谷工作机会 -- Application EnginnerExpedia Hiring Data Scientist
休斯顿石油服务公司Software Engineer职位[内推]Liberty Mutual Boston新组大量招人developers/QA
Web Development电话面试经验分享与请教请教一个C++问题
什么是【执行offer】 executive offer?问个sql 题
西雅图公司招Analyst相关职位最近非典型的曲折的找工作经历---失败篇
delete sheets from Excel workbook in C#请问做题和实际工作的关系
一个Post Doc Position回馈本版--报告一些最近的面筋
Hiring Sr Data Scientist问一个replicate的问题
相关话题的讨论汇总
话题: o2话题: o1话题: ot话题: character话题: docs