TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Go: Process isolation rediscovered as a programming pattern

30 pointsby petaralmost 14 years ago

11 comments

Jabblesalmost 14 years ago
I think providing a language construct to help you do something badly and covering up your mistakes by rebooting is a step in the wrong direction.<p><i>Surely, you can debug your programs, but catching slow leaks in complex software is hard, even in Go.</i><p>I don't think this warrants restarting your goroutines. Go is still a young language, who knows what tools for debugging will come along in the future.
评论 #2759802 未加载
评论 #2760784 未加载
BarkMorealmost 14 years ago
Are the concepts described in the article the same as Erlang or Erlang/OTP, or is there more to it?
评论 #2759758 未加载
评论 #2759689 未加载
评论 #2759751 未加载
inoopalmost 14 years ago
The author seems to have rediscovered the advantages of managed operating systems.<p>Here's a relevant article for those not familiar with the concept:<p><a href="http://research.microsoft.com/apps/pubs/?id=69431" rel="nofollow">http://research.microsoft.com/apps/pubs/?id=69431</a>
评论 #2759914 未加载
enumalmost 14 years ago
Cool stuff. I think it's similar to custodians in Racket (the artist formerly known as PLT Scheme):<p><a href="http://docs.racket-lang.org/reference/eval-model.html#(part._custodian-model)" rel="nofollow">http://docs.racket-lang.org/reference/eval-model.html#(part....</a>
scott_salmost 14 years ago
If the problem looks like memory management, then perhaps something that looks like garbage collection is the answer?<p>Of course, it doesn't map trivially, since there are no existing references to goroutines. But, it may possible to determine if a goroutine cannot communicate with anyone - it is garbage - if there is no one listening to any of its channels. The one exception to this rule I can think of are daemon-style goroutines that would interact with the system through external calls. Such goroutines could be labeled as such at the creation site, indicating that the goroutine manager should not manage them.
dchestalmost 14 years ago
Discussion on go-nuts mailing list: <a href="https://groups.google.com/d/msg/golang-nuts/ar3QSMI4ooE/9LGKtLcyragJ" rel="nofollow">https://groups.google.com/d/msg/golang-nuts/ar3QSMI4ooE/9LGK...</a>
j_bakeralmost 14 years ago
I see what the author is getting at, but I don't see the reason for a language to provide this isolation. Why not just use an OS-level process? Why not create a library or framework to do this?
评论 #2760151 未加载
评论 #2760775 未加载
ww520almost 14 years ago
I think it's a good idea. Slow resource leaks are very hard to debug. Sometime it's easier and cheaper to just restart the process. I seem to remember some fighter jet subsystems can do fast reboot. When they crash, it can be restarted in a faction of a second. If the rebooting approach works in a realtime environment like that, it sure would work in the day-to-day environment.
btillyalmost 14 years ago
My first reaction is that this is a terrible idea.<p>Very often you create a goroutine to send messages down channels. Those messages are objects. Those objects may go to multiple other goroutines.<p>Kill the originating goroutine and you've just messed up all of the other goroutines that thought that they had objects.
评论 #2760236 未加载
评论 #2760170 未加载
评论 #2760271 未加载
upthedalealmost 14 years ago
Seems loosely similar to how I'm using .Net4's Tasks from the Task Parallel Library. I didn't particularly focus on the effects of the garbage collector when I came up with my approach, but it does at least achieve point A in his opening paragraph (<i>(a) is simpler to use</i>)
markbaoalmost 14 years ago
Getting this article in text/plain.