World: r3wp
[Core] Discuss core issues
older newer | first last |
BrianH 19-Jun-2009 [14113] | I get out-of-memory errors sometimes even with a swap file :) |
Maxim 19-Jun-2009 [14114] | increase it and it will disapear... and don't let the OS auto-increase the size.... that leads to other out-of memory conditions when your disks are near full. |
BrianH 19-Jun-2009 [14115] | However, I tend to not get out-of-memory errors on this computer, which has 1GB of RAM and no swap file. This is because I am careful about which programs I use (no IE, no Firefox). |
Henrik 27-Jun-2009 [14116x2] | has anyone been successful in compressing data in php and decompressing it again in R2? I see I asked such a question 7 years ago on the mailing list, but no solution was found back then. :-) |
I think I've figured it out. Anyhow, the solution I have working here seems stable. | |
Oldes 28-Jun-2009 [14118] | using ZLIB? |
Janko 30-Jun-2009 [14119x4] | I was nagging you about the actors+message passing rebol lib I was playing with.. Now I have a real thing running with it .. I will post source code on blog soon. It's not that exciting video .. just some text changing :) but I hope it will help in getting a picture when I post the code. On left is a Linux server with work dispatcher on right are two workers on windows. There can be as many workers on many computers or none and workers can drop out at any time without work being undone/"halfdone". It uses message passing and actors for everything.. and comunication works like at tuple spaces so you get autobalancing. It's not something that special, you could do something roughly the same with http server app probably, although it would be a little more messy. |
video is here: http://screencast.com/t/ieXjmEz2b9:) | |
I needed this setup because I need to make screenshots of websites in browsers for websites in site assistant and you can't make a screenshot of IE browser on linux. I don't intend to have any windows servers running but I will have workers on mine and computers of colegues running on background and doing it's job silently. Thats why it's all made so that there is nothing wrong even if no workers are avalable for bigger amounts of time | |
and they can get on and off work as they please :) .. I call this "casual workers system" :) | |
Graham 30-Jun-2009 [14123x2] | So, is this like doc's task manager except the tasks are on different computers |
I'd be interested in trying this library out ... | |
Graham 1-Jul-2009 [14125] | Janko, I see you were using rebXR in 2002 ... so why not just use xml-rpc for this as well? |
Janko 1-Jul-2009 [14126x6] | I haven't seen it but heard of doc's task manager, and he uses multiple worker processes in cheyenne. I am certain those two (or one if it's the same) are much faster and robust. I am mostly experimenting here on how a "message passing with actors" system would or could look in REBOL , so I am not focused on implementation, but for now more on look of code. |
I will post the code shortly so you can try it, but I am about to do big changes to it.. if actors will remain rebol objects then I will make whole lib more OO, refine the methods etc.. I have another option where actors would become just functions (this would make them more lightweight (which is important at actor systems) and it would enable some cool things, but I am not 100% if it will all work. | |
RPCs and message passing are quite different things and whole code logic works differently .. async message passing is " send and pray " (quote by Erlang inventor) model while RPC are "request response" .. I have been folowing erlang and message passing for so long but I wanted to see how it really is in practice thats why I started making this actor-net rebol library | |
I wrote something about XMLRPC into webservices channel.. | |
two processes ping ponging to eachother 10 times with actor-net would look something like this now pinger: make actor [ act-match: [ [ 'pong count addr ] [ ~send addr compose [ ping (count) (get-my-addr) ] ] [ ''bye ] [ print "ok, bye" ] ] ponger: make actor [ act-match: [ [ 'ping count addr ] [ ~send addr compose ( either lesser? count 10 [ [ pong (count) (get-my-addr) ] ] [ [ bye ] ] ) ] ] and you would add the third actor that would act only once to "lend them the ball" to start them server: make once-actor [ act-once: [ ~send get-actor 1 compose [ ping 0 (get-actor 2) ] ] ] But the library is still quite messy .. especially with adresses of actors, global vars, I have a big list of things now to improve after I made that thing on the screencast | |
(ping pong above can run in the same rebol process, multiple on same computer or on different computers (it's just the matter of addreses-- which are not well thought out yet) | |
Graham 1-Jul-2009 [14132x2] | I need to view various files in a browser and if I use 'browse, then this blocks the UI until the browser appears with the file. I just tried with a xmlrpc server accepting the url and it works fine. |
the xmlrpc-exe returns immediately ( with an error though - no matter ) and the page pops up. | |
Janko 1-Jul-2009 [14134x3] | btw.. because I think Doc uses TCP with task master I think it should be no problem to work over different computers also |
how do you get a return value .. with xmlrpc-exe ... what do you mean a page pops up? | |
(the previous version sources , examples and 2 more blog posts about actor-net can be found here http://itmmetelko.com/blog/2009/06/08/playing-with-making-an-actor-like-distributed-system-in-rebol-3/ ) | |
Graham 1-Jul-2009 [14137x3] | xmlrpc-exec/async pc [ f ] :local-function |
what I mean is that I use xmlrpc to start up the browser and bring up the page I want | |
result: xmlrpc-exec pc [ add 2 4 ] | |
Janko 1-Jul-2009 [14140] | I have to admit I don't get what borwser (you mean like IE FF?) has to do with xmlrpc in this case ... and I.. aha this is a GUI app you you don't mean that xmlrpc-exec returns imediately (without waiting for result -- thats why I ask how you get the resut then) .. but that GUI doesn't block while waiting for it |
Graham 1-Jul-2009 [14141x8] | Yes, that's correct. My gui doesn't block while I wait for FF to start up and load the page I want. |
Doc wrote async-call which would also work .. except it locks up VID when I recently tested it. | |
How does one determine which of the interfaces reported by get-modes tcp:// 'interfaces is the active one?? | |
I see lo0, if11, if25, if13 | |
This is pretty cool ... I am sitting in front of my laptop, and on the other side of the room is my 46" LCD screen with my media PC attached. I installed the rebxr xmlrpc server on it .., and I have cheyenne installed on the laptop. I click on a file in my application, it gets downloaded to the www directory in cheyenne, and then I send a command to the xmlrpc server to browse to that file so that it displays on the big screen but is served up by the laptop's cheyenne server. | |
It's now quite remote controlling a browser on another PC because all I can do is tell it to open a new page. | |
not quite | |
I presume using xmlrpc I can ask the server to spawn more instances of itself on different ports so that I cah have a number of different "tasks" available | |
DideC 1-Jul-2009 [14149] | Question : I have a script like this : ctx: context [ markup: "my script with <%val1%> and <%val2%>" val1: "Hello" val2: "Bye" build: does [build-markup markup] ] It produce this result : >> ctx/build == {my script with ***ERROR no-value in: val1 and ***ERROR no-value in: val2} Its because 'build-markup use 'parse and 'parse looks its word in the global context. Is there any binding tricks to solve this ? |
james_nak 1-Jul-2009 [14150] | Smart Guys... What's the trick to using a variable to hold an email address when using "Send" Send/header some-email-address Some-text myheader I always get a failed email because the "To:" word is not set. If you directly type in an email address such as Send/header [confused-:-rebol-:-com] Some-text myheader It works. I've tried composing, reducing, scrubbing and washing and the stains still don't come out, if you know what I mean. There must be some trick. (And I know you know) |
Henrik 1-Jul-2009 [14151] | what is the type of some-email-address? |
james_nak 1-Jul-2009 [14152x2] | It's an email |
Its weird. I've tried placing it in a block, etc. | |
Henrik 1-Jul-2009 [14154] | then it would be a bug, if it doesn't get passed to 'send. |
james_nak 1-Jul-2009 [14155] | I can't believe after all these years that it's still there. |
Ladislav 1-Jul-2009 [14156x2] | just had a look at the SEND source and from what I saw it is highly unlikely that it does not work Moreover, I am actually using the SEND function from time to time and no such problem occurrred. |
so, I bet, that your description is missing some detail | |
james_nak 1-Jul-2009 [14158] | Henrik and Ladislav, OK, stupid me. I was using a word name that I shouldn't have. Thanks! |
Gregg 1-Jul-2009 [14159] | Didier, assuming you can't preface the markup fields with the context name, e.g. markup: "my script with <%ctx/val1%> and <%ctx/val2%>" either manually or programmatically, hacking build-markup may be best. e.g., add a /with refinement that takes the object and bind to that. |
sqlab 2-Jul-2009 [14160] | DideC. even this does not really use markup, it works at least ctx: context [ markup: ["my script with" val1 "and" val2] val1: "Hello" val2: "Bye" build: does [build-markup form reduce markup] ] |
DideC 2-Jul-2009 [14161] | Obviously, I was tired yesterday !! If not I would have done this without asking. By the way, thanks sqlab! |
Janko 3-Jul-2009 [14162] | I wrote a blogpost with code about the usage of actor-net lib that we chatted with Graham a little (few days back) http://itmmetelko.com/blog/2009/07/03/rebols-actor-net-used-for-real-distributed-system/ |
older newer | first last |