- 主题:Why Discord is switching from Go to Rust
这和pool的实现有什么关系呢?
你忘记调pool.put,就和C语言忘记free一样,内存泄漏。
你调pool.put之后再用指针,就和C语言free之后再用指针一样,dangling pointer。
pool就是只能分配一种类型的malloc,程序里用得多了还不如直接用malloc。
【 在 diaozi 的大作中提到: 】
: 他这个场景可以用官方的 sync.Pool 试一把,成本低廉,立竿见影
: 需要更精确操控,可以再结合官方的实现撸一把
--
FROM 114.85.145.*
都没听说过这公司,去查查
--
FROM 103.37.140.*
也号称MAU过亿了
【 在 lilicheng (lilicheng) 的大作中提到: 】
: 都没听说过这公司,去查查
--
FROM 61.50.116.2
跟对象池没有关系。
人家吐槽的主要槽点是2分钟一次的强制gc。
即使没有新的alloc/free,2分钟一次的强制gc扫描cache里面的大量对象导致latency,虽然这些对象都在用。
【 在 diaozi 的大作中提到: 】
:
: 感觉他这个场景,可以用对象池来 own 这些存储对象,LRU 淘汰的 struct 别扔了
: 这样就不会频繁的扔,GC,然后又去构造
:
: --
发自「今日水木 on 鸿蒙」
--
修改:adu FROM 73.93.166.*
FROM 73.93.166.*
如果达到 LRU 稳态后,都从 pool 里拿对象,没有新的alloc\free
GC 扫描是异步的,不阻塞用户协程,p99 不会这么变态
STW 是在扫描的间隙有新的 alloc
当然 golang 适合 IO 占用比较多的服务
这种要求 p99 10ms 以下的重存储服务用 go 不太合适,rust 用好了也挺香
再杠一下,感觉这个服务用 redis 挺好的,go 当成 service 前端即可
用了redis后,团队没有 KPI,没有折腾的价值
【 在 adu (阿杜) 的大作中提到: 】
: 跟对象池没有关系。
: 人家吐槽的主要槽点是2分钟一次的强制gc。
: 即使没有新的alloc/free,2分钟一次的强制gc扫描cache里面的大量对象导致latency,虽然这些对象都在用。
: ...................
--
FROM 123.58.117.*
如果一开始没选好语言,这样中途切换到别的语言,代价可谓是相当地大,苦了一线码农了。
切换语言从来不是小事,特别对于一线码农来说。
高层受到的影响小。
【 在 keygen (失落灵魂之囚) 的大作中提到: 】
: 语言之争来了!
: Rust is becoming a first class language in a variety of domains. At Discord, we’ve seen success with Rust on the client side and server side. For example, we use it on the client side for our video encoding pipeline for Go Live and on the server sid
: The Read States service
: ...................
--
FROM 106.121.138.*
你回复到点子上了,这更多地是工程团队,确切说是工程负责人的KPI项目。
新换技术老大,不折腾一下对不起新title。
此前对于react native的应用,airbnb特别有趣:
(1)
https://medium.com/airbnb-engineering/react-native-at-airbnb-f95aa460be1c
React Native at Airbnb
In 2016, we took a big bet on React Native. Two years later, we’re ready to share our experience with the world and show what’s next.
Gabriel Peal
Jun 20, 2018 · 3 min read
(2)
https://medium.com/airbnb-engineering/sunsetting-react-native-1868ba28e30a
Sunsetting React Native
Due to a variety of technical and organizational issues, we will be sunsetting React Native and putting all of our efforts into making native amazing.
Gabriel Peal
Jun 20, 2018 · 5 min read
【 在 diaozi 的大作中提到: 】
: 如果达到 LRU 稳态后,都从 pool 里拿对象,没有新的alloc\free
: GC 扫描是异步的,不阻塞用户协程,p99 不会这么变态
: STW 是在扫描的间隙有新的 alloc
: ...................
--
FROM 106.121.161.*