What is a cross platform fast method of interprocess communication?
I've done some tests with the socket, and it appears that the over head
really is in creating a new client socket, and then asking to be sent
some data.
If I send 1MB of data total, to 10 users, it takes 10x as long as
sending 1MB of data total to 1 user. I'm getting 0.1 seconds of
overhead... Thats not good for a high volume server. Lets say I have a
website getting 1000 hits a second. Well you can see it won't add up, I
can only manage to create 10 connections a second if I have 0.1 seconds
of overhead.
Thats a really nasty overhead. For all I know, its inherant in Mac
sockets in general, but I don't know.
Is there some fast cross platform method of interprocess communication?
Otherwise... I guess it will be a mediocre solution.
It would be nice to create a solution for putting RB code into web
pages, using SSI. Like this.
<HTML>
<HEAD>
<BODY>
<!--#include virtual="/cgi-bin/grabarticle.rbscript?article=fred"-->
</BODY>
</HEAD>
The rbscript shell would be a tiny C app that passes the request to an
RB Daemon. That way, we could do our web development in RB. But NOT if
we have a really sucky overhead per script. So does anyone want to help
out with inter process communication ideas?
I envision having caching in my server, so that each RBScript only gets
compiled if its not in side the cache. The cache size would be server
configurable. I envision the server using my ElfData plugin, as my
plugin is really the solution you want when you want to do fast string
processing. People won't have to use my plugin, it will just be an
available feature.
Actually, the more I think about it, the less likely it seems to be. I
think that unless RS develop some kind of way explicitly for web
servers, it won't be practical. Look at DoEvents, it puts the app to
sleep, OR it hogs the CPU. There is no generalised "push" mechanism,
its all pull (polling).
For a webserver, you want a mean and lean push mechanism, all done
through STDIN/STDOUT not using sockets or other silly things in the
way.
Basically, I'd need RB to have these two things:
1) A very fast cross platform IPC technique that worked for C apps. IE
allocating some RAM that can be read and written to by any process.
This is quite easy in fact for someone with a knowledge of Mac Windows
and Linux. (I only have very good Mac knowledge).
2) A push mechanism for it's code. That is, I can get my C app to ask
something from my RB app and get the answer immediately, not having to
poll for answers or use sockets. Some kind of event messaging.
On Unix basically both of these things I need, are STDIN and STDOUT.
But unfortunately they don't work for Daemons!
I suppose, if there was some cross platform way to get Daemons to
respond to STDIN and STDOUT, that would be perfect.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>