2: Put Transactions with Crux – Pluto Assignment
NOTICE: Crux has been renamed to XTDB. This tutorial is now available at https://nextjournal.com/xtdb-tutorial instead. Please consider the following tutorial deprecated.
This is the second part of the Crux tutorial. The Earth installment looked at setting up a simple Crux standalone node and a very simple
You need to get Crux running before you can use it.
Arrival on Pluto
As you enter the Plutonian atmosphere, a message pops up on your communication panel:
The government of Pluto is asking to see your flight manifest.
Choose your path:
You have your manifest : You have permission to land, continue to the space port.
You do not have your manifest : You do not have permission to land. You can either return to Earth, or continue at your own risk.
As you circle the dwarf planet to land, you have a quick read of your Crux manual. You know you will be using the
put operation a lot for this assignment and although you used the operation to add your manifest before you left, you think it is a good idea to brush up on your knowledge.
You are happy with what you have read, and in anticipation of your first assignment you define the standalone node.
You land on the surface of the dwarf planet. As you do, the job ticket for this assignment is unlocked.
You make your way over to the mines on the next shuttle. On your way you decide to get a head start and put the commodities into Crux.
Since it takes six hours for each transaction to reach your Crux node on Earth from here, it is a good idea to batch up all the commodities in a single transaction.
You arrive at the mine and are met by the CEO, Reginald Glogofloon, a 150 year old Plutonian.
Choose your path:
"Yes I'll give it a go" : Continue to complete the assignment.
"I'm not sure how to even begin" : Go back and read the manual entry.
You remember that with Crux you have the option of adding a
valid-time. This comes in useful now as you enter the weeks worth of stock takes for Plutonium.
You notice that the amount of Nitrogen and Methane has not changed which saves you some time:
The CEO is impressed with your speed, but a little skeptical that you have done it properly.
You gain their confidence by showing them the entries for Plutonium on two different days:
As a parting gift to them you create an easy ingest function so that if they needed to add more commodities to their stock list they could do it fast.
Tombaugh Resources Ltd. are happy that this will be simple enough to use. They thank you for the extra help and you head back to your ship.
You are back at your ship and check your communications panel. There is a new assignment waiting for you:
It’s a long flight so you refuel, and update your manifest. You have been awarded a new badge, so you add this to your manifest.
You enter the countdown for lift off to Mercury. See you soon.