Progress Acquires MarkLogic! Learn More

Santa Scales Out

Back to blog
3 minute read
Back to blog
3 minute read
Santa on a Computer

Over the years, I’ve heard from sources up North about how Santa has been a data pioneer.

First, he progressed to NoSQL for more flexibility to manage his list and do his matching in record time. It turns out the Big Syndicate up North was actually an innovator!

Then his team upped his game and invested in semantics to improve his matches. Getting the gifts to the right kids meant nothing if they weren’t the right ones. In fact, when kids didn’t like their gifts, sometimes Santa would get sad. So his team upgraded the system to take into account the context of the kid.

However, transforming your business to be data-centric is never done. Recently my source at the North Pole revealed that Secret Santa, one of Santa’s early crowdsourcing projects, was in need of some help.

Spreading the spirit of Santa to families and workplaces with Secret Santa was a great idea, but the process was getting pretty antiquated. Putting names in the hat and picking them works great … as long as it’s a simple group. But like all social networks, Secret Santa is about mixing together multiple types of people and as it goes digital, scaling it out. Multiple families picking together and not getting their siblings can be complicatedand then enterprise applications like departments in a company, take it well beyond simple paper and a hat.

So, it was back to the keyboard for his programming elves. The goal was simple: start with the list of people that includes their group. Then, for each person, assign a pick that isn’t part of their group and (of course) hasn’t been picked before.

But like all transformations from physical to digital, there were some challenges, the most notable being data security. Santa was early into data, but he was also early into security, demanding that all of his projects not only be run in secure environments, but also properly enforce permissions with appropriate access.

But, my source up North told me the elves were up to the task. In fact, more than one team was assigned to it. Ever since Santa adopted NoSQL and semantics, the team has gotten used to taking multiple approaches to solving a problem. It all starts with the data, but sometimes the elves can get an advantage with some old-skool XML processing. It turns out that XML is still everywhere in enterprises. And for good reason as self-describing data has a great deal of power. But programming directly with this model isn’t for everyone, so many on the team have gravitated to Javascript.

This time around, Santa let each team have a go. And the results are pretty interesting:

  • The Old Skool team started with a simple data structure and then used some nice tricks to trim the list based on the picker’s group. But things get complicated with the already-picked list as a global variable needs to be updated with the picks. Fortunately, maps enable you to update data during the processing. Finally, the team noticed what all of those hat pickers have encounteredthis problem is a multi-pass problema given random match doesn’t always distribute the picks between groups, and it has to be redone until you get a good match.

For all the details, see the really old-skool post on the original XQuery blog.

  • Team Javascript got more ambitious and really tackled the enterprise scaling and security. Instead of just doing the processing, they proceeded to creating and managing data. This enterprise approach means that picking is resilient and secureperhaps suitable for some really big inter-departmental pickingbut it was also a bit tougher to deliver

      Read all about this robust and accessible approach.

Once again, Santa is ahead of the curve, enabling groups to automate their Secret Santa and scaling out his crowdsourcing to a new generation!

Matt Turner

Matt Turner is the CTO, Media and Manufacturing at MarkLogic where he develops strategy and solutions for the media, entertainment and manufacturing markets. Matt works with customers and prospects to develop MarkLogic enterprise NoSQL operational data hubs that enable them to get the most of their data and deliver their products to the fans, audiences and customers that love them.

Before joining MarkLogic, Matt was at Sony Music and PC World developing innovative information and content delivery applications.

Read more by this author

Share this article

Read More

Related Posts

Like what you just read, here are a few more articles for you to check out or you can visit our blog overview page to see more.

Developer Insights

Multi-Model Search using Semantics and Optic API

The MarkLogic Optic API makes your searches smarter by incorporating semantic information about the world around you and this tutorial shows you just how to do it.

All Blog Articles
Developer Insights

Create Custom Steps Without Writing Code with Pipes

Are you someone who’s more comfortable working in Graphical User Interface (GUI) than writing code? Do you want to have a visual representation of your data transformation pipelines? What if there was a way to empower users to visually enrich content and drive data pipelines without writing code? With the community tool Pipes for MarkLogic […]

All Blog Articles
Developer Insights

Part 3: What’s New with JavaScript in MarkLogic 10?

Rest and Spread Properties in MarkLogic 10 In this last blog of the series, we’ll review over the new object rest and spread properties in MarkLogic 10. As mentioned previously, other newly introduced features of MarkLogic 10 include: The addition of JavaScript Modules, also known as MJS (discussed in detail in the first blog in this […]

All Blog Articles

Sign up for a Demo

Don’t waste time stitching together components. MarkLogic combines the power of a multi-model database, search, and semantic AI technology in a single platform with mastering, metadata management, government-grade security and more.

Request a Demo