[Building Sakai] aspell spellchecker.jsp pain and suffering

John Bush john.bush at rsmart.com
Thu Jan 31 20:33:00 PST 2013


So hopefully no one else uses the spellchecker.jsp option that I
suggested in https://jira.sakaiproject.org/browse/SAK-4069.

If you do, there's a big problem.  According to this:
http://stackoverflow.com/questions/13531211/need-inputs-on-troubleshooting-runtime-getruntime-exec-on-low-memory-system

Java's Runtime.exec() before 1.7 uses fork()/exec() to spawn a
process. Forking means duplicating the current process, which being a
Java application is probably huge. To be able to fork() an
application, you need to have enough virtual address space available

We've been happily running aspell like this for years.  But of course
once things got in a virtualized env where swap space is much more
controlled, very bad.  Think about all the memory you run tomcat with,
yikes!

So today we rewrote this POS to use the google spell check service
instead. Which means no outside dependencies and it even supports a
bunch of languages ootb, which is pretty cool, we just honor the
user's current sakai locale.  I can't find any information on google's
policy around use of this thing.  The library we are using is Apache
License 2.0 so that is safe for consumption in Sakai.

http://code.google.com/p/google-api-spelling-java/

This solution of course is for fckeditor right now.  I'm not sure what
it takes to move to ckeditor, but probably not too bad.  If you are
interested in the code let me know.

Curious to hear what people think about relying on a google service in Sakai ?


--
John Bush
602-490-0470


More information about the sakai-dev mailing list