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

New Rugby based chat client

 [1/41] from: gchiu::compkarori::co::nz at: 24-Sep-2001 8:46


Would you guys like to test my chat client? It uses a *single* Rugby server to process messages. I created it to provide internet gaming/chat facilities for my Gomoku program, but at present it is running as a standalone reblet. You can either chat in the lobby, or create a new room and move to there. If you don't send a message for over 5 mins, you may be disconnected by the server ( time out period ). I need to fix the displays in the lists so that it highlights just the one rather than all. And it would be nice to not poll while typing ... http://www.compkarori.co.nz/reb/gorim2.r -- Graham Chiu

 [2/41] from: koopmans:itr:ing:nl at: 24-Sep-2001 9:34


Alas.... although you use http transport, you don't use it initially! Change server-url to http://ip:8002 and do a get-rugby-server/http In order to get a rugby server you need to use the http transport layer when binding as well! I cannot bind from behind a firewall because of this. But other than that, it is incredibly cool. Please note how easy it is to do these things with Rugby. I hope this inspires other people to build Reblets that use client/server and P2P using Rugby. Thanks, Maarten

 [3/41] from: petr:krenzelok:trz:cz at: 24-Sep-2001 9:53


Hi, in my opinion, with current state of computing, it is completly wrong to have blocking keyboard input even for blink of an eye period ;-) I don't know if there is any chance to have keyboard input free from polling blocking? -pekr- Graham Chiu wrote:

 [4/41] from: gchiu:compkarori at: 24-Sep-2001 20:38


On Mon, 24 Sep 2001 09:34:50 +0200 Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
> Alas.... although you use http transport, you don't use > it initially! > > Change server-url to http://ip:8002 and do a
Oh, silly me. But of course when it starts up, you can alter the default url to :8002 :)
> I cannot bind from behind a firewall because of this.
Can you try it by changing the url when it starts up?
> But other than that, it is incredibly cool. Please note > how easy it is to do > these things with Rugby. I hope this inspires other > people to build Reblets > that use client/server and P2P using Rugby. >
Maarten, we *really* need non blocking behaviour ! -- Graham Chiu

 [5/41] from: gchiu:compkarori at: 24-Sep-2001 20:42


On Mon, 24 Sep 2001 09:53:47 +0200 Petr Krenzelok <[Petr--Krenzelok--trz--cz]> wrote:
> in my opinion, with current state of computing, it is > completly wrong to
<<quoted lines omitted: 3>>
> from polling > blocking?
I agree. Up to Maarten I guess. Or I could transform it to use SOAP ... but I think that would be too slow. I've tried checking to see if the talk window flag is dirty and if so, lengthening the timeout period, but it's not very succcessful. -- Graham Chiu

 [6/41] from: gchiu:compkarori at: 24-Sep-2001 20:52


On Mon, 24 Sep 2001 09:34:50 +0200 Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
> Alas.... although you use http transport, you don't use > it initially!
<<quoted lines omitted: 3>>
> transport layer when > binding as well!
Hi Maarten, This is from your online documentation do get-rugby-service/secure-code/http tcp://localhost:8001
> I cannot bind from behind a firewall because of this.
I tried do get-rugby-service/http tcp://IP:8002 but can't make a connection now. -- Graham Chiu

 [7/41] from: gchiu:compkarori at: 24-Sep-2001 20:53


> I've tried checking to see if the talk window flag is > dirty > and if so, lengthening the timeout period, but it's not > very
I meant *poll* interval
> succcessful. >
-- Graham Chiu

 [8/41] from: koopmans:itr:ing:nl at: 24-Sep-2001 10:27


First of all, you need to change the call to get-rugby-server to use the http refinement. It is either tcp (default) or http. You have to switch in the Reblet. You have to call: server-ctx: context get-rugby-service/http http://100.100.100.100:8002 The online docs have a typo there: the protocol should be http in stead of tcp. Rugby *is* non-blocking on the server side and on the client when using tcp. The problem is that the view event loop is suspended upon network activity. It is a Rebol feature ;-( And as Rebols http implementation is NOT non-blocking, you see the root of all evil... Writing my own http handler seems no good idea: COre 3.0 will be async which gives the same effect, and the current http handler has good proxy support. --Maarten

 [9/41] from: gchiu:compkarori at: 24-Sep-2001 21:27


On Mon, 24 Sep 2001 10:27:18 +0200 Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
> You have to call: > > server-ctx: context get-rugby-service/http > http://100.100.100.100:8002
Okay, I've made the changes and I can now connect. Anyone behind a firewall want to try it?
> The online docs have a typo there: the protocol should be > http in stead of > tcp.
Guess someone should fix it :)
> Rugby *is* non-blocking on the server side and on the > client when using tcp.
<<quoted lines omitted: 7>>
> gives the same effect, and the current http handler has > good proxy support.
Sounds as though all will be fixed in Core 3.0 then :) -- Graham Chiu

 [10/41] from: petr:krenzelok:trz:cz at: 24-Sep-2001 11:15


Graham Chiu wrote:
> On Mon, 24 Sep 2001 10:27:18 +0200 > Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
<<quoted lines omitted: 5>>
> Okay, I've made the changes and I can now connect. Anyone > behind a firewall want to try it?
I can't connect. What address should I connect to? tcp://209.207.225.184:8001 ? or http://209.207.225.184:8001? or 8002? No success though ...
> > Writing my own http handler seems no good idea: COre 3.0 > > will be async which > > gives the same effect, and the current http handler has > > good proxy support. > > Sounds as though all will be fixed in Core 3.0 then :) >
ah, well, that's when? ;-) Announcement of Express coming "soon" is now almost 2 months old ;-) -pekr-

 [11/41] from: gchiu:compkarori at: 24-Sep-2001 22:12


> I can't connect. What address should I connect to? > tcp://209.207.225.184:8001 ? or > http://209.207.225.184:8001? or 8002? No > success though ... >
Try using version 0.0.6 or higher which other people have managed to use behind a firewall. The defaults are fine. Goodluck :) -- Graham Chiu

 [12/41] from: petr:krenzelok:trz:cz at: 24-Sep-2001 12:35


Graham Chiu wrote:
> > > > I can't connect. What address should I connect to?
<<quoted lines omitted: 4>>
> Try using version 0.0.6 or higher which other people have > managed to use behind a firewall. The defaults are fine.
Hmm, I reloaded the script, but version still says 0.0.4. Where can I find 0.0.6, please? -pekr-

 [13/41] from: koopmans:itr:ing:nl at: 24-Sep-2001 16:41


Hi, I have looked at Graham's app again, and I don't think it is easy to get it any faster right now. We Europeans are simply too far from New Zealand in provider terms (at least I am). Loading the Reblet takes lots of time as well, as is logging in. Even when you have async behaviour this will be annoying because of the delay between messages. Would be interesting to host the server in Europe as well and see what happens. --Maarten

 [14/41] from: petr:krenzelok:trz:cz at: 24-Sep-2001 18:37


How's that? What is IRC client/server based upon then? It handles proxies, and is really real-time, non blocking ... -pekr-

 [15/41] from: m:koopmans2:chello:nl at: 24-Sep-2001 19:34


First of all, IRC implementations may be multithreaded. Second, they can have their own proxy handlers. Rugby is non-blocking, but not in http mode. Rugby uses Rebols client side http (and proxy support), and their implementation is simply not non-blocking. I may look at it if I find the time, but on the other hand.... I try to build on top of, instead of again, and again, and again.... --Maarten

 [16/41] from: m:koopmans2:chello:nl at: 24-Sep-2001 19:53


I think I figured it out. I'll see if I can get something working for non-blocking http through proxies the next week. Stay tuned.... --Maarten

 [17/41] from: gchiu:compkarori at: 25-Sep-2001 7:31


On Mon, 24 Sep 2001 16:41:55 +0200 Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
> We Europeans are simply too far from New Zealand in > provider terms (at least > I am). Loading the Reblet takes lots of time as well, as
Hi Maarten, The rebsite is in New Zealand - but presumably you will be loading from your local cache.
> is logging in. Even > when you have async behaviour this will be annoying
<<quoted lines omitted: 3>>
> and see what > happens.
But the chat server is in Texas :) ( I think ) -- Graham Chiu

 [18/41] from: gchiu:compkarori at: 25-Sep-2001 7:35


On Mon, 24 Sep 2001 12:35:37 +0200 Petr Krenzelok <[Petr--Krenzelok--trz--cz]> wrote:
> Hmm, I reloaded the script, but version still says 0.0.4. > Where can I > find 0.0.6, please?
Same place. I guess your ISP is caching the old version still :( Try again :) -- Graham Chiu

 [19/41] from: gchiu:compkarori at: 25-Sep-2001 8:16


The chat server died last night - I wonder if the ISP killed it or if it died for other reasons ... I was wondering whether I should use a cron process to keep reinvoking the server from my side ( just uses an http read to the server in my cgi-bin directory ) or get every client to invoke the server. The server then tries to import the rugby services from localhost. If it succeeds, it knows that another instance is running and quits. If it fails, it then carries on to become the server. Sound okay? New version now of 0.0.7 - fixes a few display problems, and increases the polling period correctly now when typing in the chat window. type /help for keyboard commands -- Graham Chiu

 [20/41] from: gchiu:compkarori at: 25-Sep-2001 14:06


New versions :) Game-server 0.0.3 -when it starts up, it does a rexec [ identity ] to see if another instance is running. If so, it quits. -loads up any saved data -saves all data to the server drive so that if it dies, it can be restarted without any data loss GoRim2 0.0.8 -if server is inaccessible ( down or network outage ), it offers to attempt to restart the server by invoking the cgi script at http://www.compkarori.com/cgi-local/game-server.r Feedback welcome ... The polling isn't so bad now when inputting to the keyboard - it might even be usable :) -- Graham Chiu

 [21/41] from: holger:rebol at: 25-Sep-2001 7:54


On Mon, Sep 24, 2001 at 07:34:09PM +0200, Maarten Koopmans wrote:
> First of all, IRC implementations may be multithreaded. > Second, they can have their own proxy handlers. > > Rugby is non-blocking, but not in http mode. Rugby uses > Rebols client side http (and proxy support), and their implementation is > simply not non-blocking.
Not entirely true. The problem is that no-wait only applies when reading data, not when opening a port, i.e. the part where the GET or POST is sent to the server and REBOL parses the response header is blocking (done within 'open), but reading the response afterwards is non-blocking. Core 3.0 will allow you to do all parts of an HTTP download, from the initial DNS lookup until the port has been closed, in a non-blocking way, using application-defined event handlers. -- Holger Kruse [holger--rebol--com]

 [22/41] from: koopmans:itr:ing:nl at: 25-Sep-2001 17:17


I see. I later realized that you can easily write your own http implementation and that it will automatically use the proxy settings. So if I really want to I can get that part non-blocking as well. But Graham seems to have it working rather fine now in his chat-room. --Maarten

 [23/41] from: gchiu:compkarori at: 26-Sep-2001 8:29


New version again 0.0.9 added - some features that need to wait for a server upgrade so need to test the server code first *But* Babelfish translation is now live ( and little tested ) /babelhelp /babel userid translation_mode will translate all text sent by userid into language of choice. Does this using SOAP. Big problem - I get character entities coming back for some characters. What to do?? -- Graham Chiu

 [24/41] from: ammoncooke:yaho:o at: 25-Sep-2001 18:20


----- Original Message ----- From: "Graham Chiu" <[gchiu--compkarori--co--nz]> To: <[rebol-list--rebol--com]> Sent: Tuesday, September 25, 2001 1:29 PM Subject: [REBOL] Re: New Rugby based chat client
<snip> > Big problem - I get character entities coming back for some > characters. What to do?? >
did you try 'to-string Enjoy!! Ammon

 [25/41] from: gchiu:compkarori at: 26-Sep-2001 14:18


On Tue, 25 Sep 2001 18:20:55 -0700 "Ammon Cooke" <[ammoncooke--yahoo--com]> wrote:
> > Big problem - I get character entities coming back for > some > > characters. What to do?? > > > > did you try 'to-string
I think what I need is parlez-vous fran&#231;ais? to-string to-char 231 more work :(( -- Graham Chiu

 [26/41] from: gchiu:compkarori at: 26-Sep-2001 15:09


New versions: server 0.0.5 - now returns timestamps for each message client 0.1.2 - displays the timestamps for each message -- Graham Chiu

 [27/41] from: koopmans:itr:ing:nl at: 26-Sep-2001 16:09


You got work to do ;-) See my Rugby announcement! Now you should change the event loop to match something like: [ wait-between-polls start-poll check every n millisecs for poll-result result? start again ] --Maarten

 [28/41] from: koopmans:itr:ing:nl at: 26-Sep-2001 17:19


BTW: currently the client hangs when trying to log on.

 [29/41] from: gchiu:compkarori at: 27-Sep-2001 8:19


On Wed, 26 Sep 2001 17:19:34 +0200 Maarten Koopmans <[koopmans--itr--ing--nl]> wrote:
> BTW: currently the client hangs when trying to log on.
But you managed to get on as I saw your messages time stamped 14:11 server time. Client version is now 0.1.4 and server is incompatible with earlier versions.
> > You got work to do ;-) See my Rugby announcement!
Yep. Once I get sometime to look at the new docs :) -- Graham Chiu

 [30/41] from: gchiu:compkarori at: 29-Sep-2001 10:00


New version of client 0.1.8 and server. Now can do: /msg "Graham Chiu" some private message /msg user some private message If user is online, it will be delivered to them when they next poll. If not, it will be delivered when they next log on. I'll probably purge undelivered messages after a couple of days ... I implemented a test client using the new non blocking version of Rugby. It certainly is non blocking, *but* after a few mins, the server goes into a busy loop :( Have to figure out what's going on there... -- Graham Chiu

 [31/41] from: gchiu:compkarori at: 4-Oct-2001 22:15


New version of the client: 0.3.0, and server which now uses Rugby 4.2 This means that none of the existing clients below this version will be even able to connect to the server :( Versions *after* this will switch to using the http-deferred *non-blocking* mode - the client for this is still being written/debugged :) -- Graham Chiu http://www.compkarori.co.nz/index.r

 [32/41] from: koopmans:itr:ing:nl at: 4-Oct-2001 12:25


Graham's next version will be illustrating some of the things we discussed in the P2P thread regarding multithreading. Thanks for all the good work! --Maarten

 [33/41] from: doug:vos:eds at: 4-Oct-2001 8:42


Maarten and all... Please ALWAYS include the URL of your latest software release. Is there a good reason to not include your URL each time? The URL links I have are out of date again... can't find 4.2... You will get hundreds more casual users exploring the rebol/rugby/revolution. What's that URL again? Promote, promote, promote, promote.... Location, location, location....

 [34/41] from: petr:krenzelok:trz:cz at: 4-Oct-2001 15:18


Vos, Doug wrote:
> Maarten and all... > Please ALWAYS include the URL of your latest software release.
<<quoted lines omitted: 3>>
> rebol/rugby/revolution. > What's that URL again?
http://www.rebolforces.com/~erebol/ -pekr-

 [35/41] from: koopmans:itr:ing:nl at: 4-Oct-2001 17:02


www.rebolforces.com/~erebol

 [36/41] from: gchiu:compkarori at: 6-Oct-2001 19:04


I've got a test version up that uses the asynchronous non blocking i/o of Rugby 4.2 http://www.compkarori.co.nz/reb/gorimnb.r It has not been debugged yet, and a few things that worked in earlier versions do not work now, but you can easily see the speed difference betweeen the earlier versions. http://www.compkarori.co.nz/reb/gorim2.r -- Graham Chiu

 [37/41] from: gchiu:compkarori at: 9-Oct-2001 21:57


Okay, the chat client is now up to version 0.5.1 If you couldn't log on behind a firewall with 0.5.0, that ommission has now been rectified. ( I don't run a firewall and so have to wait for these reports. ) I am happy to say that performance is greatly improved over *all* previous clients. You should not notice any blocking of any import. There is now a bug report form built in to the chat client, and of course it comes with it's own bug :-) If you close the bug report form down using the close gadget at the top right, it closes down the Gorimnb as well. Anyone care to share on how to determine which layout a close event is coming from? http://www.compkarori.co.nz/reb/gorimnb.r -- Graham Chiu

 [38/41] from: koopmans:itr:ing:nl at: 9-Oct-2001 10:35


I'd like to add that Graham's current version is *the* example of why you can live without multithreading when using non-blocking I/O (in Rugby) and do efficient programming. Very very good! Thanks, Maarten

 [39/41] from: petr:krenzelok:trz:cz at: 9-Oct-2001 10:51


Maarten Koopmans wrote:
> I'd like to add that Graham's current version is *the* example of why you can > live without multithreading when using non-blocking I/O (in Rugby) and do > efficient programming. > > Very very good!
I have to second that! The client feels now very snappy! If Rebol 3.0 will bring in even more i/o granularity, it will be cool! Maybe RT could replace their RIM with new, Rugby based version, as many ppl could come from behind the firewall ... Cheers, -pekr-

 [40/41] from: gchiu:compkarori at: 5-Nov-2001 17:28


Gorim2 is now at version 0.6.2. The only change of note is that it now points to the *new* server at www.xrebol.net:8003. I'll be taking down the old server at compkarori.com:8004 soonish. If you can't access the service, you can check it's status at: http://www.xrebol.net/cgi-bin/services.r Hopefully European users will notice some speed increase as xrebol is in the UK. Thanks to Phil for the use of his box. -- Graham Chiu

 [41/41] from: gchiu:compkarori at: 5-Nov-2001 17:47


On Mon, 05 Nov 2001 17:28:36 +1300 "Graham Chiu" <[gchiu--compkarori--co--nz]> wrote:
> Gorim2 is now at version 0.6.2. >
Oops, and it's at: sites/compkarori/gorim2 Or, http://www.compkarori.co.nz/reb/gorim.r It's a Rebol based chat/game server that uses http tunneling to pass thru firewalls courtesy of Rugby. -- Graham Chiu

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted