Re:Concurrency Models: Go vs Erlang
by genwin on Thursday March 28, 2013 @12:09AM
(#5453308)
In Go, channels can be between boxes, so a channel could be used to trigger or communicate with Go code running on another box.
[ Parent
| on HN ]
Oh, could you please show me some code that does this (a 'channel between boxes'), and supports sending of exactly the same data types that you send over a regular Go channel?
Using the old deprecated netchan package doesn't count ;).
Re:Concurrency Models: Go vs Erlang
by granitepail on Thursday March 28, 2013 @01:25PM
(#5456256)
There's gob ( http://golang.org/pkg/encoding/gob/ ). Not going to claim it's on the level of node communication in Erlang, but it does make data (de)serializaiton incredibly simple. With only a few lines of code you could have a channel reading from and writing to a socket to another machine.
I haven't done it myself. The idea is from the book The Go Programming Language Phrasebook. I've misplaced the book, but this link shows it's probably netchan: https://groups.google.com/forum/?fromgroups=#!topic/golang-n...