Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Commercial-quality REBOL programmers needed

From: joel:neely:fedex at: 17-Aug-2002 9:09

Hi, Dick, [reffy--ulrich--net] wrote:
> For a moment lets assume there are 4 Rebol processes running on > different machines. On my process/machine4 I want to add the > value of a/process/machine1 and b/process/machine2 , and I want > the operation to occur on process/machine3, with the result > coming back to me on process/machine4. > > Can one refer to the value of a variable on a different machine ? >
Not directly, no. If you want to build something with the architecture you describe, you'll have to write the "glue" yourself to move the data values to wherever you want the processing to occur and then move the results to wherever you want them to reside (or be consumed). REBOL is a single-threaded language with a very conventional memory/storage model. On the other hand, the convenience of using the built-in networking features would allow you to extend it in a way that simulates what you describe. (No warranties on the code below; I'm sketching at the keyboard to get the idea out, but not validating all of my typing, etc.) fetch-remote-value: func [server label digits result] [ digits: charset "0123456789" if not parse read to-url rejoin [ "http://" server "/fetchvalue.cgi?label=" label ][ thru "VALUE=" copy result some digits to end ][result: "0"] to-integer result ] a: func [] [ fetch-remote-value "machine1" "A-GLOBAL" ] b: func [] [ fetch-remote-value "machine2" "B-GLOBAL" ] The above assumes that machine1 and machine2 can receive queries for state data via HTTP, and return the value associated with the specified label in a web page containing a string resembling VALUE=123 With the above "machinery" in place, I can now write a + b and get the sum of those two remote values. Point is that you can get what you're asking for, but you'll have to do a bit of work for yourself. -jn- -- ; Joel Neely joeldotneelyatfedexdotcom REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] { | e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]