1. If you compile termite.scm, check the declarations at the beginning of the file. I use this: (declare (standard-bindings) (extended-bindings) (block) (not safe)) Note that "(block)" declaration is critical to running compiled termite code. Without it it cannot share code across nodes.
2. After compiling termite with right declarations try next example: Run two consoles and tsi on them, then do this:
tsi_1: (define n1 (make-node "127.0.0.1" 3000)) (define n2 (make-node "127.0.0.1" 3001)) (node-init n1)
tsi_2: (define n1 (make-node "127.0.0.1" 3000)) (define n2 (make-node "127.0.0.1" 3001)) (node-init n2) (on n1 (lambda () (pp "test" (##repl-output-port) "test done"))
3. If everything is ok, than you can run code across different machines without any troubles.
Vasil.
OK, looking back in history a bit, I see this is the right place, so here goes:
I'm just getting started with a distributed project, and don't want to learn Erlang at the moment. Termite seemed the logical choice, since I have some familiarity with Gambit.
So, I have a couple of computers running Gambit 4.3 with Termite installed in their lib directories. I installed the tsi script, and it starts up correctly. When I run the examples in termite.pdf, they seem to do the right thing.
However, I don't understand how to get communication between two computers working. Can someone point me to a simple example that shows how to start up Termite on two computers and get them to talk to each other?
When I tried the remote-spawn example below, I thought it was working. But I killed the Termite on the remote machine, and the example code still did exactly the same thing. It seemed the process got spawned on the local computer, even though I specified the IP address of the remote one.
(define node (make-node "192.168.1.71" 3000))
(node-init node)
(let ((me (self)))
(remote-spawn node (lambda () (! me ’boo))))
#<thread #2>
(?)
boo
Thanks,
Neil Baylis
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list