Redian新闻
>
Dell Alienware Aurora 怎么买便宜啊
avatar
Dell Alienware Aurora 怎么买便宜啊# Hardware - 计算机硬件
p*o
1
某互联网大公司,onsite是碰到的, 好像是系统设计方面的问题,自己回答的不是很好
,贴出来,向大家请教。
题目大致的意思是
一台核心机器有一个很大的主table (central table),有很多行数据
另外有些其他附属机器各自有一个table (local table), local table是central
table中的子集。
比方说:
central table 是
a: 1, 2, 3;
b: 1, 4, 4;
c:2,4,5;
local table 是
a: 1, 2, 3;
c:2,4,5;
central table如果发生变化,local table也要相应的更新,包括元素的插入,删除,
查找。
1. table使用树类结构,比方说用 c++ 中的stl::map;
2. 中央机器和辅助机器之间是通过基于xml之类的rpc进行数据传递, 每次传递消息最
大的数据包限制是10k;而central table 的每次更新可能是很大的数据量1g或者没有
限制,也有可能是很小的数据更新。
如何设计一个高效(时间空间效率)的数据更新机制。
基本上这些是最基本条件, 当时他问的很open,包括后来问对这个table有没有更好的数据结构,如何synchonize,如何处理一些特殊情况(比方说机器/网络down掉等等)
面试前我主要看的都是些数据结构方面的,当时毫无头绪,
大家有什么思路吗?不知道这个是不是分布式数据库方面的问题?
avatar
d*n
2
6封可以么?3 independent
avatar
m*g
3
需要能自己加配置的,想要配到这个或者更高一点的: i7 8700 + 64GB DDR4 + GTX
1070(1080) + 256GB SSD
多谢!
avatar
f*t
4
这个题有意思,等高人回答
avatar
i*3
5
enough
avatar
N*d
6
这个配置多少你认为算便宜?
avatar
r*t
7
after central table is updated, 附属机器 is informed by the central and
附属机器 send to central a list of the keys in the local table (maybe
there's better method here in terms of the amount of data sent)
central compute s the intersection of the set of keys that have their
records updated with the set of keys received from the 附属机器
central sends those updated records to 附属机器.
这个是最笨的办法了,可能能改进不少

【在 p****o 的大作中提到】
: 某互联网大公司,onsite是碰到的, 好像是系统设计方面的问题,自己回答的不是很好
: ,贴出来,向大家请教。
: 题目大致的意思是
: 一台核心机器有一个很大的主table (central table),有很多行数据
: 另外有些其他附属机器各自有一个table (local table), local table是central
: table中的子集。
: 比方说:
: central table 是
: a: 1, 2, 3;
: b: 1, 4, 4;

avatar
b*r
8
再准备两封,以防RFE
avatar
p*o
9
有个假设,可能我没说清楚.
central table 知道各台附属机器的 local table 中的key是什么
换句话说,central table知道local table 存着a, c.
而且也知道,各个local table 对应的range,比方说,新加的一行d,那central
table 知道应该通知哪个local table去加入这行d。
我当时敢觉(我个人感觉,非常不可靠)是对方想知道如何设计这个rpc。
因为如果数据很大,超过10k,那可能需要把这个大table分割,多次调用rpc。
如果很小,就直接发送。

【在 r****t 的大作中提到】
: after central table is updated, 附属机器 is informed by the central and
: 附属机器 send to central a list of the keys in the local table (maybe
: there's better method here in terms of the amount of data sent)
: central compute s the intersection of the set of keys that have their
: records updated with the set of keys received from the 附属机器
: central sends those updated records to 附属机器.
: 这个是最笨的办法了,可能能改进不少

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。