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

World: r3wp

[!Uniserve] Creating Uniserve processes

Rebolek
13-Feb-2007
[521]
so if we bring some czech beers, we can probably get whole source 
code? ;)
Pekr
13-Feb-2007
[522]
Rebolek - that is for sure!
Graham
13-Feb-2007
[523]
He wouldn't drink Jaime's free beer!  ...
Graham
26-Feb-2007
[524x2]
Is there a ftp client for uniserve?
Or, at least an example of a uniserve client copes with using a command 
and a data port.
Dockimbel
26-Feb-2007
[526x3]
Not yet, but I would like to add one.
It would require to control a "data port service" from a "command 
port service".
Never really investigated deeply such construction, but at first 
look, I don't see any  issue doing that.
Oldes
26-Feb-2007
[529x3]
I have somewhere testing script (not for uniserver) working as simple 
ftp server.
maybe I could try to rewrite it
but at this moment have other things to do
Graham
26-Feb-2007
[532]
I'm looking more for client than server :)
Oldes
26-Feb-2007
[533]
Yes, but if you know how works server, you should know client as 
well:]
Graham
26-Feb-2007
[534]
off topic oldes, but are your postgres driver fixes folded back into 
the offficial driver ?
Pekr
26-Feb-2007
[535]
Graham, btw., what would be needed for Rebol FireBird support? Does 
it use typical tcp scheme as mySQL e.g.? This week I met with two 
ppl using FireBird, and there seem to be no answer from Rebol part. 
Well, maybe ODBC, but that is not free ...
Graham
26-Feb-2007
[536x2]
It has an undocumented tcp protocol .. so for Linux, there is no 
option but to move to something else
Or, to try and reverse engineer the protocol from another product
Maxim
26-Feb-2007
[538]
maybe someone else did this and documented it?  somewhere on the 
net... just thinking loud...
Graham
26-Feb-2007
[539x2]
I asked a year ago on the developer list .. they said, don't even 
think about it!
there is a client java module in CVS
Pekr
26-Feb-2007
[541x2]
eh? I thought that Firebird is being regarded being one of the best 
open-source offerings? No driver documented? Strange - each language 
except the Rebol has driver, so how they did it?
hmm, wrong channel, sorry...
Graham
26-Feb-2007
[543]
not if someone uses uniserve to write a driver :)
Pekr
26-Feb-2007
[544x2]
:-) How would it be usefull?
Well, hmm, why not, right?
Graham
26-Feb-2007
[546]
If you're going to head IT services at this new company .. perhaps 
you could get someone to write this :)
Pekr
26-Feb-2007
[547]
hehe ... well, they are mostly MS based - tried their website and 
I got some aspx Microsoft db OLE provider error. Will have to talk 
to guys a bit :-)
Oldes
27-Feb-2007
[548]
graham: what I know, my postgres driver changes are not in the original 
version. At this moment I'm not using it as I even don't have postgres 
installed. Do you need it?
Graham
27-Feb-2007
[549]
Not yet ..but wanting to make sure that forks are folded back in 
:)
[unknown: 5]
1-Mar-2008
[550]
Doc, does the Cheyenne version of Uniserve also have the mono-thread 
execution.  If so, what should I be concerned about with regard to 
blocking?
Dockimbel
1-Mar-2008
[551x4]
Cheyenne uses the latest Uniserve's version. There's no special version 
of Uniserve for Cheyenne, so it's mono-thread. Uniserve also brings 
IPC between several slave processes using the task-master protocol 
(part of Uniserve, used in Cheyenne to run CGI and RSP scripts).
The main process (Uniserve process) should only do minimal work in 
processing port events so that other events can be processed in a 
short delay, giving the feeling of multitasking with several clients.
So, you should be concerned about not doing heavy computation inside 
network event callbacks (like in 'on-received). If longer processing 
is needed, you should use the task-master service in Uniserve to 
send the request to a slave process (this has also the advantage 
of fully using the power of modern multicores processors).
To determine if you can leave the work inside the callback, just 
do some simple maths. E.g., if a request needs 50ms to be processed, 
that means that your server cannot do more than 20req/s. So it also 
depends on the load your server need to handle.
[unknown: 5]
1-Mar-2008
[555]
I would most likely have a lot of that going on with TRETBASE since 
the searches could take some time to produce results.
Dockimbel
2-Mar-2008
[556]
In that case, you need to rely on slave processes, each one executing 
TRETBASE. This means that you have to set up a distributed architecture, 
think about disk-writing synchronization between slaves, caches consistency,... 
All these could be easier done if we had multi-threading support 
in REBOL. It can be done without, but it's more complex and much 
less efficient.
Kaj
2-Mar-2008
[557]
I'm currently integrating the UniServe software stack into Syllable 
Server
[unknown: 5]
2-Mar-2008
[558]
Thanks Doc.
BrianH
2-Mar-2008
[559x2]
Paul, you'd still need to think about all of those concurrent consistency 
problems if you went multi-threaded. Without serialization of some 
form, concurrent use will still be an issue, whether you are using 
processes or threads.
Not discouraging you, just warning you :)
[unknown: 5]
2-Mar-2008
[561]
I do see the problem Brian.
BrianH
2-Mar-2008
[562]
Of course.
[unknown: 5]
2-Mar-2008
[563]
I think that Doc has the most available and supported Async offering 
right now that can even quality for my needs.
BrianH
2-Mar-2008
[564]
I wonder if it would make sense to make some kind of a multi-LNS 
layer over Uniserve.
[unknown: 5]
2-Mar-2008
[565]
Wouldn't LNS currently have the same problem as Uniserve with respect 
to mono-processing?
BrianH
2-Mar-2008
[566]
You could take advantage of Uniserve's task dispatch and process 
management to do load balancing between LNS servers.
Graham
19-Oct-2008
[567x2]
Doc, what I want to do is do some text to speech using a 3rd party 
web service.  I need to download the generated wave file and play 
it by inserting it into a sound port.

The read would be blocking if I use sync read, and then playing it 
thru a sound port in my experience does interfere with async tcp.

In a nutshell, is this sort of activity suitable for a task-master 
service .. and is there a simple sample of such a service?
The task would be triggered from an RSP page
Since any client could be accessing the cheyenne server, I want a 
response returned immediately so that it doesn't block the client. 
 And the sound can be played later on ...
Dockimbel
19-Oct-2008
[569]
So, if I understand correcty, you need to download a file on client 
side from a web server without blocking on the client side ?
Terry
19-Oct-2008
[570]
You can't send a response, then another and another unless you use 
Comet technologies