r3wp [groups: 83 posts: 189283]
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

World: r3wp

[!Uniserve] Creating Uniserve processes

Terry
4-Feb-2006
[273x4]
So simply put.. how can I process an incoming message using an external 
page of code, and be able to respond from that page?  

I may need to create an "OUTPUT" value (the response) and then use 
the 'write-client' function once Im back in the service ON-RECEIVED 
function?
That last bit works.. seems the global context  functions, such as 
'write-client' dont pass to the script that is being DOne
Ok.. so now I can run the external script by placing waiting till 
i finsh the external, and get back to the 'on-received' function... 
but I have a number of functions that I use to process my external 
script.. 
Do I need to load those functions with every on-received event???
For example:  
If I place this function just after the "install-service [ "

testFunk: func [it][print it]


and if at anytime i DO an external script that uses that function, 
it doesn't work
Volker
4-Feb-2006
[277x2]
Not used to uniserv much, but usually such things use contexts for 
services. so 
 install-service [testFunk: func [it][print it]
should be similar to
  make object![  testFunk: func [it][print it]
you could try
  install-service [  set 'testFunk func [it][print it]
if that is the problem. then testFunk should be globally.
Terry
4-Feb-2006
[279x10]
Hmm, that's it.
I see here a new law...  the query is exponentially  greater than 
the answer.
Also, it seems that this stuff is handled by a seperate module (for 
background processing)?
Nenad, do you have an y Task-master examples?
Another question.. where could I put a piece of code to handle unknown 
(aka unserviced) ports?  Should be able to create a catch-all or 
a port-analyzer etc... check for scanning or other security issues.
Graham, your http://www.compkarori.com/vanilla/display/Smtpd.rdoesn't 
appear to be working?
actually, working now.. Vanilla is sooo slow.
graham, what do I need to do with your smtp service to allow a localhost 
domain.. getting this.. "waiting 20s as {MYLAPTOPNAME} fails domain 
rule"
it then dies
with.. "Server error: tcp 553 sorry, that domain is not in my list 
of allowed rcpthosts"
Terry
5-Feb-2006
[289x5]
Nenad.. for some reason, Uniserve seems to be struggling with inlcludes.. 
like CSS files  have you noticed this?
Where ... <link rel="stylesheet" href="the.css" type="text/css" /> 
 works anywhere else, it's not with Uniserve??
(hte httpd.r service, that is)
I found it, the paths aren't relative from the page, but from the 
wwwroot
Althogh.. it struggling with j<avascript src="" .. > files in the 
header?  If I paste the code, it worsk, but if I SRC= .. it doesn't.. 
no matter what path I use.
Volker
5-Feb-2006
[294]
Mime-tpyes? (just a thought)
Terry
5-Feb-2006
[295x3]
mime types seem ok
I did add a.. 
text/javascript	js
Here's an example.. prototype ( a javascript framework uses prototype.js 
 and that file uses includes to add other JS files.. like this.. 

<%= include 'ajax.js', 'dom.js', 'form.js', 'event.js', 'position.js' 
%>

the problem seems to be here somewhere?
Thør
4-Apr-2006
[298]
manual resync...
Terry
10-Apr-2006
[299]
Nenad, your softinnov.org site has been offline for awhile now.  
How's the progress on Cheyenne going?
DideC
10-Apr-2006
[300]
Offline or outdated?
http://www.softinnov.orgworks fine here
Terry
10-Apr-2006
[301]
It was offline.. it's back, and updated too.
Terry
11-Apr-2006
[302]
(or not)
Dockimbel
8-May-2006
[303x2]
There were some OS upgrades on this server in mid-april that required 
to put down the web site.
There's currently some issues on the domain name softinnov.org, please 
use http://softinnov.netfor now to access our web site.
Philippe
10-May-2006
[305]
Doc, when will you release a beta of Cheyenne and a new version of 
Uniserve ?
Terry
11-May-2006
[306]
I second that request
Dockimbel
13-May-2006
[307x3]
:-). I could release a new Uniserve version, but there's no much 
new protocols added yet. Uniserve also deserves some better docs. 
Cheyenne is still under development, my priority is to finish it 
asap. I'll release a beta as soon as I have a stable and almost feature-complete 
version. Cheyenne is meant to be a end-user product, so it needs 
some polishing and enhancement before giving it to users.
I want it to be as good as possible starting from the first release 
because, it may become a major tool for the REBOL community.
I expect that the community will be very enthusiastic about it, so 
I don't want to disappoint you all ;-).
Pekr
13-May-2006
[310]
:-) isn't it just a - webserver? :-)
Dockimbel
13-May-2006
[311]
Basically yes, but with the RSP module, it becomes a fast and flexible 
web application framework !
Pekr
13-May-2006
[312]
RSP? rebservices-like protocol?
MichaelB
13-May-2006
[313]
I guess more like ASP or JSP.
Louis
13-May-2006
[314x2]
Rebol Server Pages
If this list doesn't fulfill all your needs, here's the additionnal 
features planned for the 1.0 release :

    * RSP: REBOL Server Pages support.
    * General CGI support (run any CGI script).

    * Chunk-encoding transferts support (streamed data transferts).
    * Standard compression methods support: gzip, deflate, bzip2.

    * Byte-ranges request support (ability to request files in parts 
    and resume broken downloads).

    * mod-rewrite module for powerful request URL transformations (without 
    the regexp complexity!).

    * mod-map-url module for direct URL to REBOL functions or objects 
    mapping.
    * SSL support.
    * Advanced GUI client for local and remote administration.
Philippe
13-May-2006
[316x2]
Salut Doc, I have sent some informations about Uniserve on http://www.rebolfrance.info/projets/uniserve?s=Uniserve.
  I.e. the ability for Uniserve to use the lib Magic (O. Auverlot), 
with a lot of shorcuts to quickly create forms, check boxs, etc.
Have you planned a target date for a beta of Cheyenne ?
Dockimbel
13-May-2006
[318]
Not yet, I can only work on Cheyenne and other REBOL projects on 
my spare time, I'm currently almost full time on a big project for 
a customer (until end of july). I expect to make a first beta release 
of Cheyenne before that.
Terry
13-May-2006
[319]
Be sure to add some encap notes too please.
Oldes
31-Aug-2006
[320]
I changed this line:
if not find ti: third third :in port! [append ti port!]
to:

if not find ti: first find/tail third :in 'word port! [append ti 
port!]
to be able run uniserv in Rebol/Base
Will
31-Aug-2006
[321]
Mike, I started using Apache and rebol as cgi, this is not suited 
for performances as on every call to the cgi, a new instance of rebol 
is  initialized, run and closed.

I thought about using fastcgi, but never came to a working solution.
Now I use uniserve as main webserver, here some advantages:

-it is fast! On my local machine I get +- 600 req/sec for static 
pages and a max of 160req/sec for dynamic rsp pages

-it is written in rebol, I could easly(less than 10 lines code) add 
a rewrite engine

-child process are persistent, this mean you can keep state of your 
web applications, implement caching, keep a pool of connection to 
databases open (in apache + rebol/cgi you'd have to open and close 
the connection for every request)
-it is written by Dock whom I may be the biggest fan ;-)

btw I'm running an unreleased version (have bought commercial support) 
 that support http 1.1, stuff like If-Modified etc..

If you have more specific questions, I'll be glad to try and answer.
MikeL
31-Aug-2006
[322]
Thanks Will.   I would like to see how to put together a simple web 
form application that posts to a Uniserve script and provides an 
acceptance message.  When I looked at Uniserve I couldn't see how 
this simple thing could be done and how / which services to use. 
  Do you have a "Hello World" level example that follows that post/reply 
approach?