Technical Elements and Interoperability - TinyUrlService Dry Run
General Technical:
- What kind of project is this?
TinyUrlService is lightweight service that creates a shortened URL for any given URL. This is very useful for emailing links to documents or for creating permalinks to sites, pages or tools. It is a lightweight API that can be injected into any API via the normal Spring based methods. On the other end is a lightweight servlet which looks at the incoming request token (ie http://your.sakai.server/tiny/Xk4cD7) and translates it back into the original URL and redirects.
All security is handled by the Sakai container like any other external link. If you prefer a more secure key, there is a method that will produce a not-so-tiny 22 character key. The key space for 22 character length keys is a nonillion (a number with 30 zeroes). The keys are generated through a standard Apache Commons Lang class, RandomStringUtils. - What level of code review has been applied?
Several eyes in the Sakai community have been over the code. Some comments were made on-list in regards to the way that the URL keys were created. These were taken on board and the URL key generation algorithm was changed. The more eyes the better, it's only one class and a servlet! - What architectural or technical documentation exists?
All documentation is available as Javadoc in the service itself.
JIRA has been used to track improvements, but only since recently
I also blog about it - How many people have been working through the code?
Steve Swinsburg, formerly of Lancaster University UK, now at ANU Australia. - What is the lifetime of the code? How long has this code been around?
First SVN checkin in its current location was at r58034 on 13th February 2009 but it was developed a few days before then. I blogged about it on the 11th February (http://steve-on-sakai.blogspot.com/2009/02/tinyurlservice-for-sakai.html) - How long and where has been it in production?
Lancaster University has been running it in production since January/February. It is tightly coupled to Profile2 so anyone using Profile2 is using TinyUrlService as well. - Is the project planning on independent releases?
TinyUrlService is on an independent release cycle. It has been at 0.9-SNAPSHOT for some time, it will be officially released as 1.0 in the coming weeks. This release will be a dual binary/source release in line with other projects on independent release cycles. - What happens if an instance uses, then uninstalls the project?
If an institution is using Profile2 they cannot uninstall it. If they have no other dependant applications, they can safely uninstall it. It uses a single database table called TINYURL_MAPPINGS_T and a corresponding sequence (in certain database dialects).
Code Maintenance / Metrics:
- How large is the project? (Lines of code / modules)
http://cloc.sourceforge.net v 1.08 T=1.0 s (30.0 files/s, 1924.0 lines/s)
Language
files
blank
comment
code
scale
3rd gen. equiv
XML
18
157
53
967
x 1.90
1837.30
Java
5
114
293
253
x 1.36
344.08
SQL
7
25
68
62
x 2.29
144.98
SUM:
30
296
346
1282
x 1.52
2323.36
- How many non-kernel Sakai dependencies?
None. - How many non-Sakai dependencies?
None that aren't already in a Sakai build (ie Hibernate, Spring, Commons Lang etc).
- Are there core dependencies on libraries not typically used in Sakai?
No. - How tightly coupled is your tool with non-Sakai dependencies?
There are none. - What is the persistence mechanism?
Hibernate. - Any known JVM version dependencies preventing or forcing a Java 6 or Tomcat 6 upgrade?
I have been using Java 1.6 since late 2008, no issues. Tomcat 6 should be fine as well so long as everything is deploying in the right spot by the Sakai Maven plugin. - Are there automated tests?
No, although these are Jira'd and will be coming in the next few weeks. - Are changes logged?
Yes, see Jira: http://jira.sakaiproject.org/browse/TINYURL - Is the documentation up to date with the tool?
Yes, see the Javadocs. - Are there kernel changes required to support the project?
No.
Production Setup / Maintenance:
- Are there any conversions, migrations or other administrative preparations required in order to start using the tool?
No, there is a single database table that is propagated via Hibernate or can be manually created via the included SQL scripts. - Is there required configuration or does it work out of the box?
No configuration at this stage. - Can complex or objectionable features be disabled?
Possibly, but there is only one real feature! - Does this tool depend on a file storage mechanism other than Content Hosting?
No. - Are there any special requirements for deploying this project in a cluster? For example, does this project assume JGroups, shared network storage, UDP multicasting, or Terracotta server.
No. - Was load testing performed? What were the results? Is a load testing report available?
Key generation was performed on one million different keys and not a single collision was detected. More load testing will be coming as part of the automated testing. - Are there features that are database intensive, either in terms of large data or heavy CPU demand?
No.
Interoperability:
- Does any other Sakai tool or service depend on this functionality?
Yes, Profile2 uses it to generate short links. - Are there overlaps in functionality with other tools or services?
Some may argue it overlaps with the Alias service somewhat, but TinyUrlService has no limitations to what you can throw at it to make shorter. - Is content created within sites? If so, are archive, import, search and duplicate features implemented?
No content, only entries in a relational database table. - Are there any data feeds (RSS, XML, JSON) exposed via the Entity broker, sdata, or a one-off implementation?
Not yet but the ability to create short links via AJAX will be implemented via EntityBroker. - Does the work implement particular notable standards?
It uses a standard Apache Commons Lang class called RandomStringUtils.
Time tracking
Started: 11.00pm 13/11/09
Stopped: 11:25pm 13/11/09 - that was quick!