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

ANN: Rugby configurable (with compression)

 [1/6] from: koopmans:itr:ing:nl at: 18-Feb-2002 15:36


All, Added a configuration dialect (very little) to control the threading behaviour and compression. Added the getting started from Pat (thanks!) and Brett's Request brokers and dark times funny story. Also use make-doc format so there is a docs.html now as well. --Maarten

 [2/6] from: petr::krenzelok::trz::cz at: 18-Feb-2002 20:12


Maarten Koopmans wrote:
>All, > >Added a configuration dialect (very little) to control the threading >behaviour and compression. Added the getting started from Pat (thanks!) and >Brett's Request brokers and dark times funny story. > >Also use make-doc format so there is a docs.html now as well. > >--Maarten >
Hi! just a few questions: - I can read in the doc, that max no of threads is 100? Or just simply - what happens to new connections, if max number of threads is hit? - are my following thoughts correct? I want to build following scenario (will soon do so, once I get my new comp running) - Let's say I have web server (Apache) + FastCGI in external mode, which just connects to listening rebol process. Let's call such Rebol process main-server. - This main-server then accepts the query, and has three or more, local or remote, Rugby powered, additional child servers available, so it can do simple load balancing. Apache (FastCGI protocol) | | main-server (Rebol proxy = multiplexed listen mode + Rugby client) | ------------------------------------------------ | | | child1 child2 child3 | | | ODBC ODBC ODBC | | | ------------------------------------------------- | RDBMS I hope my drawing makes it easier to understand (I just hope my email client wraps it correctly :-) Now the question/brainstorming: - Main-server uses chaining to call to one of three (or more) child servers, so it acts as proxy. Each of child servers is allowed to maintain e.g. 20 simultaneous connections to database, or just accept 20 request from main-server. Each database query response is e.g. 20 KB, formatted http output. If we will send responses from all three childs in parts, it means 60 responses at a time, each of 20 KB, it means 1.2 MB - not that bad. Let's just say it is a peak on our 10 Mbit line. But - as for webserver responses, it is a well known issue, that it is better to send request once complete, at a time, not just in parts - it is much faster. So, - should also child1,2,3 send responses one at a time, or just in parts, as they build various phases of html page? Or does it even really matter? - Question no 2 - main-server, our proxy, needs to use some listening loop, store pairs of connections, do some primitive load balancing, etc. So I need something like Rugby server, without actually Rugby server message format :-) Well, - Imagine I want to provide above described mechanism to other app developers - Delphi, Visual Objets, etc. - they surely have some kind of socket or eve http classes available - so - going thru Apache is one more step. What about to allow them to connet directly to my proxy? What protocol should I use to communicate with such apps? Is it good to stay with http, and some part of GET or POST method, holding encapsulated query from above mentioned Delphi, etc. systems? Thanks for helping me to set my test environment. If I will be succesfull with my tests, it will be time to build "Renata", visual configurable Rugby based server, where you can select number of child servers, max requests per server, etc. Time to prove even women can play Rugby ;-) Cheers, -pekr-

 [3/6] from: ptretter:charter at: 18-Feb-2002 16:33


Hmmmm... why stop there... consider making rugby run in a cluster. Two rugby servers that can communication and exchange operational parameters on a per transaction (communication) basis. For example, send a request to the server and it goes to both servers. One will allow the other to process the request (the master rugby server) while the (slave rugby server) monitors the processing of the master server. If the master server communications fail then the slave rugby server processes the request. Maybe a new REBOL clustering transaction protocol and cluster server app. Damn to much brain storming in so little time. till next beer... Paul Tretter

 [4/6] from: petr:krenzelok:trz:cz at: 19-Feb-2002 1:53


Paul Tretter wrote:
>Hmmmm... why stop there... consider making rugby run in a cluster. Two >rugby servers that can communication and exchange operational parameters on
<<quoted lines omitted: 5>>
>clustering transaction protocol and cluster server app. Damn to much brain >storming in so little time.
Well, another level I suggested to Maarten for Rugby was - Rebol 'cluster - transparent propagation of functionality. Rebol clustering servers would just exchange exposed functionality, so call to any of them would do the work, but well, it needs probably some deep thinking before implementation .... -pekr-

 [5/6] from: koopmans:itr:ing:nl at: 19-Feb-2002 9:19


Well, first I had to getthe basics right (including the threading engine). I am thinking along these lines as well. I think you will have a Rugby 'team' witha 'coach' or so.... --Maarten

 [6/6] from: koopmans:itr:ing:nl at: 19-Feb-2002 9:54


> - I can read in the doc, that max no of threads is 100? Or just simply - > what happens to new connections, if max number of threads is hit?
The last one. If there are more than max-threads waiting, threads are processed despite network activity. So you can either choose for threading (set this number low, i.e. 1 or 5 or so) or network serving, set this very high (i.e. 1000+)
> - are my following thoughts correct? > I want to build following scenario (will soon do so, once I get my new
<<quoted lines omitted: 15>>
> I hope my drawing makes it easier to understand (I just hope my email > client wraps it correctly :-)
This looks good.
> Now the question/brainstorming: > - Main-server uses chaining to call to one of three (or more) child
<<quoted lines omitted: 9>>
> time, or just in parts, as they build various phases of html page? Or > does it even really matter?
First "chaining" is implemented in servers. To use it in main-server you'd have to use /deferred and check with get-result in the event loop. But that should be easy. Then it is easy: child1..3 just do local Rebol code generating HTML from one ODBC connection. Remember that only one thing happens at once, so there is no need opening 20 connections here. Unless you use the Rugby threading API, but I think you should not for this. If child# is done, it transparently returns the result to main-server, where main-server picks it up using get-result. main-server then prints the HTML out, and you are done.
> - Question no 2 - main-server, our proxy, needs to use some listening > loop, store pairs of connections, do some primitive load balancing, etc.
<<quoted lines omitted: 7>>
> method, holding encapsulated query from above mentioned Delphi, etc. > systems?
I'd use the fastcgi like loop as in the REBOL docs, read the params, make the request, store the id. If you do a wait with a timeout you can iterate every x millisec. over your list with ids to see which are ready to be sent back. Don't forget to store the fastcgi connection and the Rugby id in a 1-1 mapping. You may look at the main loop in hipe.r in Rugby, which does exactly this for TCP.
> Thanks for helping me to set my test environment. If I will be > succesfull with my tests, it will be time to build "Renata", visual > configurable Rugby based server, where you can select number of child > servers, max requests per server, etc. Time to prove even women can play > Rugby ;-) >
That would be fun!

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