Cache_HTTP_Request (was: Net_Server)
| From: | Stefan Neufeind | Date: | Wed, 27 Aug 2003 17:29:39 +0000 |
| Subject: | Cache_HTTP_Request (was: Net_Server) | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-20661@lists.php.net to get a copy of this message | ||
On 27 Aug 2003 at 14:41, Tomas V.V.Cox wrote:
> I'm -1 on this package. I just imagine a user downloading 10Mb and the
> rest of users hanged until he finished. A Net_server component is a
> must for us, every language has one, so it can't have such
> limitations.
But this is a general problem of Cache_HTTP_Request, right? I've just
discussed the same thing with Fabien (author of Cache_HTTP_Request)
via private mail. I see a general problem in that class here:
It might occur that one client fetches a new file. This would not
only hang this one task (and probably hang it for too long when the
file is big or the internet-connection of the server is slow). But it
might also result in several other instances of the script to hang or
even worse download the same file again. On a high-traffic-site,
couldn't this result in 50 tasks downloading the same file because
none knows of the other already downloading it?
So Tomas, do you see any option that we would be able to still use
the cached data and fork a new, completely separate process for
downloading new data and only after it has finished then swapping the
data-files? I bet this could work.
And one more thing: Why do we need to download the data anew every
hour? Because of the "expires" being one hour - okay. But couldn't
Cache_HTTP_Request make use of the "Last-modified"-HTTP-header to
save bandwidth?
Tomas and others - please comment on this.
Stefan
> Pd.- Sorry I was on vacations, that's why I couldn't reply before.
Don't be sorry about a vacation. I hope you enjoyed it! :-))
> On Thursday, July 17, 2003 13:29, Stephan Schmidt wrote:
>
> > Hi,
>
> > I'd like to release my generic server class through PEAR.
> > It makes use of ext/sockets to provide a simple API and callbacks
> > for any kind of server. I've currently implemented an HTTP server
> > with it as well as a server for Flash multiplayer games and chats.
> > Furthermore I'm working on a Jabber server based on the server
> > class. I think that illustrates that the class is generic and can be
> > used in different scenarios. There's no limit for simultaneous
> > connections. It supports callbacks for - onStart() - onConnect() -
> > onClose() - onDataReceived() - onConnectionRefused() (you may set a
> > max of simultaneous connections) - onShutdown()
>
> > You can take a look at the documentation, the code and examples at
> > http://www.php-tools.net/?file=patServer/overview.xml
>
> > Stephan