[sakai-core-team] directurl in site duplicate; URL shortener question

Charles Hedrick hedrick at rutgers.edu
Tue Jan 13 06:45:59 PST 2015


I’m concerned that in 2.9 or so we added a feature to produce a “direct URL”, but didn’t make sure site duplicate would handle those URL’s. I have a fairly simple patch to site-manage that will do it, except for short URL’s.

The simplest way to handle direct URL’s is to add them to the map, so that the existing kernel code will pick them up when it updates HTML blocks. That’s pretty easy. But if the URL shortened is in use (which it is by default) this presents an issue. i can easily call the shortener to get the short URL for all the direct URL’s, but this presents a possible issue:

* for randomized URL’s (which seem to be the default, even though the code seems to default to no-op), this will make a database entry. This may not be terrible, but in the end a lot of sites are copied, so we have to be prepared to get shortener database entries for every tool in Sakai eventually
* for bitly URL’s, this could significantly increase the rate at which requests are made. For large sites it might be impractical.

The randomized implementation has a function to see whether a short URL has been created. That would allow us to put only URLs that have been created in the map, and avoid increasing the size of the database. But I’m not sure how to do that with the bitly implementation, or whether it’s even possible.

PROPOSAL:
For the moment, I suggest adding a method shouldCopy(String url) to the shorten API, which returns true for randomized URLs that have been generated and false for both no-op and bitly URL’s. This would make the default case work correctly, and leave the bitly case up to someone who understands bitly.

I really wish someone had caught these issues when the direct URL feature was added. When adding UI features we need to think how they interact with site duplication.



More information about the sakai-core-team mailing list