<div dir="ltr">+1 Melanie!<div><br></div><div>Functions are way too overloaded in OpenSim in general.</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Mar 31, 2014 at 8:50 AM, Melanie <span dir="ltr"><<a href="mailto:melanie@t-data.com" target="_blank">melanie@t-data.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Oren,<br>
<br>
the correct way is to create an additional post handler that is reachable at a different URL, e,g, /AssetQuery/<br>
<br>
Servers that don't implement it would return 404. Don't try to shoehorn this functionality into the existing post handler.<br>
<br>
Melanie<br>
<br>
On 31 Mar 2014, at 13:55, Oren Hurvitz <<a href="mailto:orenh@kitely.com">orenh@kitely.com</a>> wrote:<br>
<br>
I have implemented this method. I found that the Assets Service already had a<br>
method to check for assets' existence, so I just had to extend it to check<br>
multiple asset ID's at once, and make it available remotely. But now I'm not<br>
sure what to do about backwards compatibility.<br>
<br>
I'm sending the request using POST, because sending a lot of data is better<br>
done using POST than GET. But as it turns out, AssetServerPostHandler<br>
doesn't handle unknown requests well. First, it assumes that all requests<br>
will contain an AssetBase, but this request doesn't. Second, its try/catch<br>
clause doesn't catch the exception that is generated, because it's an<br>
InvalidOperationException and not an XmlException (which is what's currently<br>
caught). The unfortunate result is that the server doesn't send back *any*<br>
reply, which means that the caller must wait for the full timeout (100<br>
seconds!) before giving up. [BTW, I'm going to investigate this further<br>
because it may explain the 100-second timeouts users occasionally<br>
experience.]<br>
<br>
I've already fixed this problem in the current patch (not yet submitted), so<br>
that in the future AssetServerPostHandler will return an error code<br>
immediately for unknown requests (HTTP 400). But that won't help when<br>
connecting to old grids.<br>
<br>
I see two ways to fix this:<br>
<br>
1. Send the request using GET instead of POST. AssetServerGetHandler handles<br>
unknown requests a little better than POST: it tries to find the parameter<br>
as an Asset ID, but if not found then it just returns HTTP 404 immediately.<br>
<br>
2. Add a way to query the server for its capabilities, to find out if it<br>
supports this request.<br>
<br>
I prefer approach #2 because it can be used in the future for many other new<br>
features. How about adding a method to IGatekeeperService, something like<br>
this:<br>
<br>
Dictionary<string,string> GetServerCapabilities();<br>
<br>
In this example, the capability will be: "SupportsAssetsExist"="true"<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://opensim-dev.2196679.n2.nabble.com/Optimize-pushing-assets-to-other-grids-tp7579093p7579100.html" target="_blank">http://opensim-dev.2196679.n2.nabble.com/Optimize-pushing-assets-to-other-grids-tp7579093p7579100.html</a><br>

Sent from the opensim-dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
<br>
<br>
_______________________________________________<br>
Opensim-dev mailing list<br>
<a href="mailto:Opensim-dev@lists.berlios.de">Opensim-dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/opensim-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/opensim-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>No essence.  No permanence.  No perfection.  Only action.
</div>