Page 1 of 1

CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 8:55 am
by ale870
Hello,
anyone has good news about CGI with RunRev 4.5?
I found that CGI "-ui" does not work any more with versions more than 3.5

I tried with 4.5 but... no success. Anyone knows something more about it?

Thank you!

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 10:17 am
by RRobert
It works.

demo.rev

Code: Select all

on startup
    send "quit" to me in 10 seconds 
    wait 10 milliseconds
    
    put "Content-Type: text/plain" & cr & cr
    put "Hello World! :)"
    quit
end startup
1) Compile the application (e.g. Linux)
2) Check your CGI settings (e.g. .htaccess)

Code: Select all

Options +ExecCGI
AddHandler cgi-script cgi
3) Create a CGI wrapper to call your binary with -ui

demo.cgi

Code: Select all

#!demo -ui
Dont forget to change file access permissions under Linux (chmod +x demo.cgi, chmod +x demo).

Robert

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 12:31 pm
by Klaus
Officially version 4.5 (maybe even 4.0, I'm not sure) cannot be run as a (faceless) CGI engine anymore!
Simply because a new server-side engine "ON-REV" is currently being developed!

But Robert obviously works with a funny trick :D

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 12:45 pm
by ale870
Yes, I know that, but I think RunRev company should consider that, for companies, it is not feasible using online On-Rev (as in my case).

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 1:01 pm
by Klaus
The new ON-REV server-side engine is currently still in BETA and will of course be availalbe for the public once it is finished!
But I have no idea about pricing, if there is any.

On the other hand, what features are you missing with CGI engine 3.5?

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 1:07 pm
by ale870
One question: do you think that I will be able to buy On-Rev server to install it in the company where I work for?
Do you think the price could justify some free or open source alternatives (like Apache, PHP, Python, etc...).
If I have a consolidated server, I like to write CGI in RunRev, but I cannot ask to the company XYZ to spend a lot of money to use a server that I use only to program in RunRev. They simply say: "learn PHP!".

About RunRev 3.5: I cannot imagine to develop long-term jobs using a language that will not be updated any more. So the problem is not the gap 3.5->4.5, but 3.5->....<all future versions>!!

Re: CGI for RunRev 4.5

Posted: Tue Apr 06, 2010 1:13 pm
by Klaus
ale870 wrote:One question: do you think that I will be able to buy On-Rev server to install it in the company where I work for?
Yes, sure, once the engine is ready!
ale870 wrote:Do you think the price could justify some free or open source alternatives (like Apache, PHP, Python, etc...).
If I have a consolidated server, I like to write CGI in RunRev, but I cannot ask to the company XYZ to spend a lot of money to use a server that I use only to program in RunRev. They simply say: "learn PHP!".
As I wrote, I have no idea about pricing, but I think they should NOT charge anything for that to be able to compete with free enginines like PHP and to spread REV even more.
ale870 wrote:About RunRev 3.5: I cannot imagine to develop long-term jobs using a language that will not be updated any more. So the problem is not the gap 3.5->4.5, but 3.5->....<all future versions>!!
The new engine will of course be developed in the future, so I think you do not need to worry :D
We still use the old 2.x engine here on our OS X server and we never missed a feature so far.


Best from germany

Klaus

Re: CGI for RunRev 4.5

Posted: Wed Apr 07, 2010 1:50 am
by BvG
ale870 wrote:About RunRev 3.5: I cannot imagine to develop long-term jobs using a language that will not be updated any more. So the problem is not the gap 3.5->4.5, but 3.5->....<all future versions>!!
Here on the forum, you can let off Steam. But only when you write RunRev directly, then they will be aware that this might be an issue for you, their customer.

Re: CGI for RunRev 4.5

Posted: Thu Apr 08, 2010 12:32 am
by FourthWorld
ale870 wrote:About RunRev 3.5: I cannot imagine to develop long-term jobs using a language that will not be updated any more. So the problem is not the gap 3.5->4.5, but 3.5->....<all future versions>!!
As others have already noted, a more powerful free replacement for the current CGI engine is in development.

In the meantime, what specific features from v4.0 or v4.5 do you need to use from a CGI?

Re: CGI for RunRev 4.5

Posted: Thu Apr 08, 2010 7:56 am
by ale870
No particular feature. I was talking for the future.
Thank you!

Re: CGI for RunRev 4.5

Posted: Thu Apr 08, 2010 2:03 pm
by FourthWorld
Hopefully that future will be soon, but in the meantime the v3.5 engine is pretty useful. Most new features in recent versions have been the sorts of things that are useful only in GUI environments, like graphic effects, data grids, etc. But nested arrays are part of v3.5, and of course everything else from earlier versions as well, so I suspect you'll have a good time using it while we wait for an updated server engine.

Re: CGI for RunRev 4.5

Posted: Fri Apr 09, 2010 1:24 am
by RRobert
As long as you could build console applications with RunRev you could build CGI applications in the way mentioned above. Even with the 4.0 engine. Where is the problem?

Robert

Re: CGI for RunRev 4.5

Posted: Mon May 17, 2010 6:50 am
by Ocean
[quote="RRobert"]

Code: Select all

    send "quit" to me in 10 seconds 
    wait 10 milliseconds
What is the purpose of those 2 lines in the CGI?

Would there be any problems if those 2 lines are not present?

Re: CGI for RunRev 4.5

Posted: Mon May 17, 2010 11:10 am
by RRobert

Code: Select all

 send "quit" to me in 10 seconds 
Quits the script if it runs longer than 10 seconds. So in case something went wrong you could be sure that the engine is not in the memory anymore.
wait 10 milliseconds
I found the line in a Revolution CGI tutorial. You simply provide the engine 10 milliseconds to breath.

Both lines are not mandatory.

Robert

Re: CGI for RunRev 4.5

Posted: Mon May 17, 2010 11:13 am
by ale870
Generally speaking, that instruction is used to allow a "better" multitasking acitivites, for the engine self and other applications (queue management, etc...). In the past that instruction was very useful since Win 95/98 used "cooperative multitasking". In "modern" OS that instruction, generally, is no more required. Sometimes, we insert that since it "helps" the OS to manage other processes/threads.

EDIT: did yoou notice in windows, if you have a long task running, if you click over the application, Windows says "the application is not responding"? Well, introducing that instruction will "help" the OS, for example, to detect application activity.