Designing IA for AI - Information Architecture Conference 2024
The Full Power of REST: Executing Code On The Client With HyperMap
1. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
The Full Power of REST
Executing Code on the Client with HyperMap
2. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
What if our REST
APIs could be much
more powerful?
3. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
The future of REST APIs is
client-side code execution
You can use it today with
HyperMap
4. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
You can lose
potential customers
because of a
complex integration
6. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
REST is expressed as constraints
Client–server architecture
Statelessness
Cacheability
Layered system
Uniform interface
Code on demand (optional)
20. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
Use case #3 — On-device analytics
{
"@": {
"script": "/sentiment.js"
},
"input": null,
"sentiment": null
}
21. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
Use case #3 — On-device analytics
import Sentiment from 'https://esm.sh/sentiment';
hypermap.addEventListener('changed', () => {
const inputText = hypermap.at('input');
const sentiment = sentimentAsText(inputText);
hypermap.set('sentiment', sentiment);
});
22. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
Use case #3 — On-device analytics
{
"@": {
"script": "/sentiment.js"
},
"input": "HyperMap is awesome",
"sentiment": "pos"
}
23. Daniel Feichtinger @auxilit // All-Purpose Machines @APMachines
To recap…
Code on demand is an essential part of REST
We should bring that capability to our APIs
It is usable today with HyperMap