Java implementation of Book Sorting Service