Cam <cam@tindall.space> writes:

> I have these two files:
>
> my-test.rkt:
>> #lang racket
>> 
>> (require racket/place/distributed
>>          racket/runtime-path
>>          "my-worker.rkt")
>> 
>> (define-runtime-path worker-path "my-worker.rkt")
>> 
>> (define remote-node (spawn-remote-racket-node
>>                      "localhost"
>>                      #:listen-port 6344
>>                      #:racket-path "/usr/local/racket/bin/racket"))
>> 
>> (define remote-place (dynamic-place
>>                       worker-path
>>                       #:at remote-node
>>                       'main))
>> 
>> (displayln (place-channel-get remote-place))
>> 
>
> my-worker.rkt:
>> #lang racket
>> (provide main)
>> (define (main channel-to-master)
>>   (place-channel-put channel-to-master "hi"))
>
> This works fine, and produces the expected output:
>
>> $ racket my-test.rkt 
>> hi
>
> When I replace the "localhost" with properly-resolve FQDN (or even IP
> address) of a remote host (properly configured in ~/.ssh/config so that
> "ssh remote-host" works without a password), `racket my-test.rkt` just
> hangs forever.
>
> Racket is version 7.0 on both machines, which are both running Ubuntu 16.04.
>
> The Racket binary at /usr/local/racket/bin/racket on both machines.
>
> The remote racket appears to be starting successfully, listening, and
> even establishing a connection from the local racket, at least as
> reported by netstat on the remote machine (IPs changed to protect the 
> innocent).
>
>> tcp        0      0 0.0.0.0:6344             0.0.0.0:*              LISTEN   
>>    12959/racket
>> tcp        0      0 999.999.999.999:6344     000.000.000.000:59260   
>> ESTABLISHED 12959/racket
>
> I feel as if there is something basic that I'm getting wrong and would
> greatly appreciate some guidance.
>
> Thanks in advance!
>
> -Cam

I took a packet capture and the only interesting thing I was able to
find in it was a conversation like this:

localmachine->remotemachine:
> #s(dcgm 11 -1 -1 "")#s(dcgm 9 -1 (dynamic-place 
> #"/home/cam/tmp/racket-distributed-places-test/my-worker.rkt" main) 1

remotemachine->localmachine:
> #s(dcgm 7 -1 -1 1)

... and that seems to be the end of the conversation.

Poking around in
pkgs/distributed-places-lib/racket/place/distributed.rkt, I found this table:

> ;distributed communication group message
> (struct dcgm (type src dest msg) #:prefab)

> ;dcgm types
> (define DCGM-TYPE-NORMAL               0)
> (define DCGM-TYPE-DIE                  1)
> (define DCGM-TYPE-NEW-DCHANNEL         2)
> (define DCGM-TYPE-NEW-INTER-DCHANNEL   3)
> (define DCGM-TYPE-INTER-DCHANNEL       4)
> (define DCGM-TYPE-KILL-DPLACE          5)
> (define DCGM-TYPE-SPAWN-REMOTE-PROCESS 6)
> (define DCGM-DPLACE-DIED               7)
> (define DCGM-TYPE-LOG-TO-PARENT        8)
> (define DCGM-TYPE-NEW-PLACE            9)
> (define DCGM-TYPE-NEW-CONNECTION      10)
> (define DCGM-TYPE-SET-OWNER           11)

> (define DCGM-NEW-NODE-CONNECT         50)
> (define DCGM-NEW-PLACE-CHANNEL        51)

> (define DCGM-CONTROL-NEW-NODE        100)
> (define DCGM-CONTROL-NEW-PLACE       101)
> (define DCGM-CONTROL-NEW-CONNECTION  102)


If I'm reading this right, all it really tells us is that localmachine
asked remotemachine to create a new place, and then remotemachine wrote
back that it died(?).

Does any of this make sense to anyone else? The code in distributed.rkt
is a little above my level, though I suppose I'll find myself elbow-deep
in it pretty soon unless somebody else has a hot tip :).

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to