Commit Graph

12 Commits (e09c8681ad5f6a645ef433e86166795a5c7dd762)

Author SHA1 Message Date
Diva Canto 9e35b069a4 Reverting the reverts I did yesterday. cpu-branch has now been
successfully tested, and I'm merging back those changes, which proved to
be good.
Revert "Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:""

This reverts commit fa2370b32e.
2013-07-18 12:23:27 -07:00
Diva Canto fa2370b32e Revert "Cleared up much confusion in PollServiceRequestManager. Here's the history:"
This reverts commit e46459ef21.
2013-07-17 15:05:36 -07:00
Diva Canto e46459ef21 Cleared up much confusion in PollServiceRequestManager. Here's the history:
When Melanie added the web fetch inventory throttle to core, she made the long poll requests (EQs) effectively be handled on an active loop. All those requests, if they existed, were being constantly dequeued, checked for events (which most often they didn't have), and requeued again. This was an active loop thread on a 100ms cycle!
This fixes the issue. Now the inventory requests, if they aren't ready to be served, are placed directly back in the queue, but the long poll requests aren't placed there until there are events ready to be sent or timeout has been reached.
This puts the LongPollServiceWatcherThread back to 1sec cycle, as it was before.
2013-07-17 11:19:36 -07:00
Justin Clark-Casey (justincc) 1b7b664c86 Add request received/handling stats for caps which are served by http poll handlers.
This adds explicit cap poll handler supporting to the Caps classes rather than relying on callers to do the complicated coding.
Other refactoring was required to get logic into the right places to support this.
2013-07-15 23:27:46 +01:00
Melanie 75631e0267 Supply proper type information for the various types of requests 2013-06-07 23:55:03 +01:00
Melanie 7c0bfca7a0 Adding Avination's PollService to round out the HTTP inventory changes 2013-06-07 23:43:45 +01:00
Justin Clark-Casey (justincc) dca04c7b61 Avoid a race condition where an incoming request to a script external URL can trigger an exception is the URL was being removed at the same time.
This involves three steps
1) Return gracefully in UrlModule.HttpRequestHandler() instead of throwing an exception when the url cannot be found in its index
2) Return true instead of false in HasEvents() if no matching request is found in the map.  This call will only happen in the first place for raced requests.
3) Return a 404 in GetEvents() if the request is not in the index, rather than a blank 200 OK.

Many thanks to Tom Haines in http://opensimulator.org/mantis/view.php?id=6051 for doing some of the work on this.
2012-06-22 23:16:18 +01:00
Melanie 97c18caa76 Thank you, Intari, for a patch that implements the missing pieces of
Http-in and makes the host name for URL generation configurable.
Applied with changes:
llGetSimulatorHostname was not changed, because the change breaks
existing behavior and carries a data exposure risk. That value needs
to be configurable, the proposed fixed change is not acceptable.
2009-09-22 17:04:34 +01:00
Melanie dafe5bf05f Completely remove the prior implementation of the request event handling
on poll handlers. Introduce a new delegate on the PollServiceEventArgs that
allow access to the request headers and body.
2009-09-22 06:19:02 +01:00
Melanie bc9e4cfd96 Add a RequestID (UUID.Random()) to the PollRequest and pass it to all
even hander delegates.
2009-09-21 18:11:40 +01:00
Melanie 04170521f0 Add a UUID param to NoEvents in PollServiceEventArgs to make it more generic 2009-09-21 14:59:31 +01:00
Teravus Ovares 032aeb8b5d * Adds the ability to have a thread efficient long poll service (such as the eventqueue)
* If this doesn't melt the Http Server, this will significantly reduce the number of threads in use on regions with many users.
* Adds AddPollServiceHTTPHandler, and RemovePollServiceHTTPHandler to BaseHttpServer
* Generic enough to be used for many long poll services, not only the EventQueue.
2009-07-29 02:15:45 +00:00