https://dzone.com/articles/whos-been-naughty-whos-been-nice-santa-gives-you-j
Since Christmas was just past I was wondering how Santa could handle so much data so quickly. This blog post seems to suggest that through the use of Java and Speedment is how he accesses this database of children and presents. Speedment is a software tool for enterprises that run Java applications and relational databases. It works by creating a virtual data object, retrieving only the data the application needs when it needs it. What it does is reduces the amount of develop time, increases data access, and builds a better infrastructure. How would Santa use Speedment though? Well he would implement Speedment into java code and call on his database of children in order to gather the information he needed.
An Example:
. var niceChildren = children.stream()
. filter(Child.NICE.isTrue())
. sorted(Child.COUNTRY.comparator())
. collect(Collectors.toList());
This stream will yield a long list containing only the kids that have been nice. To enable Santa to optimize his delivery route, the list is sorted by country of residence. What is exciting about a Java application like this is you can create code that easily checks on a database. I had created a SQLite program earlier in the year and the way the code was built felt clunky. In the case of Speedment you can do this process smoother. In terms of software development when looking into database access Speedment seems like a valuable tool to implement. Their website has a code generator for different databases, and languages to make sure you can quickly implement it in any program. I believe this is truly how Santa is able to access his list so quickly to make sure he can check it twice.
From the blog CS@Worcester – Computing Finn by computingfinn and used with permission of the author. All other rights reserved by the author.