4: Bitemporality with Crux – Neptune Assignment
This is the bitemporal installment of the Crux "choose your own adventure" tutorial series.
You need to get Crux running before you can use it.
Arrival on Neptune
You enter the Neptunian atmosphere and your communications panel lights up.
The government 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 Mercury or continue at your own risk.
On your way down to the landing site you take the time to read the Crux manual.
You are happy with what you have read, and in anticipation of the assignment you define the standalone node.
Upon landing on the ice giant, your communications panel lights up indicating that the job ticket is available.
Outside your ship you are met by a panicked looking Lyndon.
Choose your path:
"Yes, I'll give it a go." : Continue to complete the assignment.
"I'm not even sure how to begin" : Take some time to read through the Crux manual again. If you're still unsure then you can follow along anyway and see if things become clear.
Lyndon gives you some data for a client that you can use as an example. Coast Insurance need to know what kind of cover each customer has and if it was valid at a given time.
You show them how to ingest a document using a
valid-time so that the information is backdated to when the customer took the cover out.
The company needs to know the history of insurance for each cover. You show them how to use the bitemporality of Crux to do this.
This is the insurance that the customer had last year. Along with the start
valid-time you use an end
valid-time so as not to affect the most recent version of the document.
This is the previous insurance plan. Again, you use a start and end
There was a period when the customer was not covered,
and before that the customer was on a promotional plan.
Queries through time
You now show them a few queries. You know that you can query Crux as of a given
valid-time. This shows the state of Crux at that time.
First you chose a date that the customer had full cover:
Next you show them a query for a the customer in a time when they had a different type of cover:
And finally you show them a time when the customer had no cover at all.
Confident in their ability to put the remainder of their records into Crux, Lyndon thanks you.
You say goodbye to Lyndon and head back to the space port.
Back at your spaceship you check your communications panel. There is a new assignment waiting for you.
You add the new badge to your manifest
You enter the countdown for lift off the ringed plant. See you soon.