Download - The API-Application Semantic Gap
On Demand API Infrastructure: h,p://3scale.net h,p://www.apitools.com
h,p://apistrat.com @3scale me: @njyx on twi,er
Powering 650 APIs Billions API Calls / Month
REST and SemanOcs
• More Shared SemanOcs
• More ConvenOon v’s ConfiguraOon
• More Flexible Clients
Key: Explicit, Shared, Re-‐usable SemanOcs (Image: MarOn Fowler / Richardson Model)
But What Type of SemanOcs
ApplicaOon SemanOcs = Chocolate
REST-‐1-‐2-‐3 HTTP TCP/IP
Domain Objects AcOons
ObligaOons Rights…
Implicit v’s Explicit ApplicaOon SemanOcs
Server Client
API DefiniOon
Data Models / Ontology
AcOon DefiniOons
(Mental) State
Today’s REST APIs
Profile
Message: Object
Encoding
HTTP Post
Vocabulary
Human Readable Docs
• Implicit and Explicit SemanOcs
• Some is Machine Readable
• Message Bodies are limited
• HTTP Verbs touch ApplicaOon SemanOcs
“Agent”
There are Models: e.g. FIPA Agent CommunicaOon Model
(Speech Act: Inform :sender :receiver :content “(equal A B)” :language :ontology)
(Protocol: Info-‐Exchange…
(Context: -‐ Ontologies -‐ Protocols -‐ Logical Frameworks -‐ Rights, Roles, IdenOOes…
h,p://fipa.org/repository/index.html
A lot more is possible: • Ontologies • PerformaOves • Protocols • Content Logics:
DL, FOL, Temporal, Constraint
• Mental Models • P2P v’s Client/
Server
Full Stack ApplicaOon SemanOcs Level Example Context Ontology,
IdenOty, Protocol Request
Protocol Actude Request,
Agree, Cancel, Reject, Inform, …
AcOon “(Donald eats apple)”
Objects “Apple”, “Person”
A lot more is possible: • Ontologies • PerformaOves • Protocols • Content Logics: DL, FOL, Temporal, Constraint Logic
• Mental Models • P2P v’s Client/Server
Progress From Mike’s Talk…
• Pass Messages, Not Objects – J … although is REST pure message passing?
• Share Vocabularies, Not Models – Share (External) Vocabularies, Not (internal) Models
• Use Profiles – J … add more to them
• (from James’) AcOvity Streams Ontology – J … helps define context
• => on the right path
Two Paths to Progress
• More Formats, More Reasoning
Shared Explicit SemanOcs FTW!
apicommons.org
Experimental Work… Reasoning Clients
• More Share formats
References
• References: – h,p://fipa.org/repository/index.html – h,p://www.swagger.io – h,p://alps.io
• Images: – Dancing with Happiness – Yarn – Nestle – KitKat