iot smart apis using nomos rulex
TRANSCRIPT
amkbcloud amkbcloud.com
Your Presentation Title
Goes Here
Real World IoT
Use Cases –
Model-driven API Prototyping
with Automated Technical
Support using Nomos RuleX
Cliff C. Faurer
AMKB Cloud & Nomos Software
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Contents
• What is IoT?
• What connects the Things of the Internet?
• Design, Publish & Support IoT APIs
– MagicDraw, Swagger UI & RuleX
• Internet-based Design, Publish & Support for IoT APIs
– RuleX Swagger Editor
• Use Case – Connected Car IoT APIs
• Summary
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Internet of Things (IoT)
http://www.devx.com/enterprise/why-apis-are-critical-for-iot-success.html
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car Services
Live Agent
Assistance
Vehicle Monitoring
& Controls
Location-Based
Services
Communication Infotainment
Apps
Emergency
Assistance
Performance Metrics Navigation Hands-free Calling Music Streaming
Roadside Assistance Diagnostics Points of Interest
Search
Text-to-Speech News Apps
Collision Detection Remote Vehicle
Controls
Stolen Vehicle
Recovery
Wi-Fi Hot Spot Weather Apps
Live Concierge
Service
Usage-Based
Insurance
Traffic and
Alternative Routing
Web Browsing
Over-the-Air System
Updates
Social Network
Updates
Ticketing and
Reservations
http://www.mbtmag.com/articles/2013/06/evolution-m2m-other-mobile-marketplace
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
The Network makes IoT Possible
http://www.sbd.co.uk/wp-content/uploads/2013/05/50pc-growth-in-telematics-but-no-convergence-Prepare-for-the-future-with-SBDs-Ultimate-Connected-Car-Guide-2.jpg
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
It’s APIs of course!
http://nordicapis.com/apis-power-the-internet-of-things/
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Definition of API
http://sproutsocial.com/insights/what-is-an-api/
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
API Users
API Provider
View of an API Program
API Platform
Public
Partner
Internal
API Endpoints :
service provider
systems
Publishes APIs
on
RESTful JSON
APIs and/or
WSDL SOAP
APIs provide access to
services
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
“Telco” APIs “Partner Engagement” APIs
SMS Billing
Service Provider APIs
WebRTC
Etc.
Product Order
Ticket SLA
Customer Etc
Area of focus for this slideset
© 2013 TM Forum | 13
V2013.5
85,000 PROFESSIONALS
900+ MEMBER COMPANIES
195 COUNTRIES
1 FORUM
TM Forum is the largest global trade association focused on bringing together the digital ecosystem, including communication service providers, digital service providers and enterprises, with the goal of enabling an open digital world. TM Forum members represent 85% of global communications revenue.
© 2013 TM Forum | 14
V2013.5
Open Digital Ecosystem (ODE)
Enabled by Digital Service Reference Architecture (DSRA) that delivers three key value propositions
Great User Experience – Users are able to access the business application and use the content in the manner they expect
Robust Operations – Ecosystem participants, including partners, service providers and enterprises, are able to conduct rich commerce as well as create deploy and measure end-to-end performance
Robust Developer Environment – Developers (both providers of component services and end-to-end product developers) have the tools and infrastructure to support both of the above goals
Who Should Get Involved
TMF is harnessing best practices of member companies and working with other SDOs to deliver reference blueprint for digital services, including; APIs, information models, business processes and extensive best practices for partnership and on-boarding
Beneficiaries extend beyond communications industry to all stakeholders in the digital economy including; Automotive, Media, Healthcare, Government and the Internet of Things (IoT)
From: TMF Introduction to DSRA v2
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Catalog of TM Forum REST APIs
• Billing Management
• Customer Management
• Party Management
• Performance Management
• Product Catalog Management
• Product Inventory Management
• Product Order Management
• SLA Management
• Ticket Management
• Usage Management
Additional APIs under specification:
• Service Catalog Management
• Service Inventory Management
• Service Order Management
• Resource Catalog Management
• Resource Inventory Management
• Resource Order Management
• MEF – Service Activation
Management
See https://www.amkbcloud.com/blog for more details
The 16 + 1 TM Forum Digital Service APIs
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
TM Forum Frameworx Open Digital API Business Guide
Open Digital Business Scenarios and Use Cases
July 2014
APIs in a Typical Customer Journey
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Detailed Interactions & APIs
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Interactions
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Create New Offer
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Order & Deliver
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Use Product
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Trouble & SLA Mgmt
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Example Scenario
• Setup New Customer
– Party Management API
• Create Individual
– Customer Management API
• Create Customer
• Create Customer Account
• Create Payment Mean
– Billing Management API
• Create Billing Account
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Traditional software
APIs / Digital Services
Support – must be of high quality or
customers will move to competitors
Build and deliver – requires lower effort: simpler offering,
no customization for individual customers; provides lower
value: simpler services that are just expected to work
Design – services must be exactly
right or adoption will be limited
New areas of
focus in software
lifecycle
API Lifecycle Challenge
time
eff
ort
& v
alu
e
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
On ‘commercial’ API Platform
On proprietary portal
With interactive
documentation
As a service – no user
interface
Design
Online documentation
Troubleshooting /
sandbox environment
Support desk
High level: What set
of APIs does the
business require?
Low level: API
descriptions
consumable by
software systems
API Lifecycle – API Provider View
Publish Support
Note: We are considering aspects of the lifecycle visible to the API program team & the API users
– not the API endpoint implementation. Also not considering security. This is usually handled by
API Platform.
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Autocreated interactive
documentation with Swagger UI
Ease integration to API platform
developer portals
Automated support
services : replacing
support desks
High level: leverage
TMF Frameworx
Low level:
MagicDraw models,
Swagger & RuleX
Where Tools can Help
Rich diagnostics,
helping users learn API
Rapid prototyping for APIs with MagicDraw,
Swagger, and RuleX
Design Publish Support
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
MagicDraw
Available from
http://www.nomagic.com
We have used MagicDraw to
Commercial tool for software modelling • Model REST APIs
• Capture rules about API behavior
• Generate documentation for APIs
• Generate Swagger for APIs
• Generate rules & functions from model
in format that can be ingested by RuleX
MagicDraw Overview
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Swagger Specification
https://github.com/swagger-api/swagger-spec
Uses JSON schema to define API parameters
and responses
Swagger Tools
Swagger UI =
interactive
documentation
SDK Generator Server Side Code
Generator
Code Annotation to
Swagger Generator
For language-agnostic descriptions of REST APIs Developer-centric tools for working with Swagger
Swagger
Editor
Swagger Overview
Swagger 2.0 is 100% open source software
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Example Swagger Description
The paths / operations
POST customer
GET customers
GET customer based on id
PUT (update) customer based on id
PATCH (update) customer based on id
DELETE customer based on id
The data model
for API request parameters and responses
Based on JSON schema
For a ‘telecoms’ customer management API based on TMForum defined API, reference https://www.amkbcloud.com/blog for details
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Generate Swagger Spec
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Swagger Tools – UI
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Swagger Tools – Editor
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Virtual
API Can generate server for:
- JAX-RS
- Node.js
- Scalatra
- Spring MVC
Swagger Editor
However:
- No JSON syntax validation
- No JSON schema validation
- No business rules validation
- No definition of what the API should
return when it receives a valid
request
Swagger
Description
Server Side Code
Generators
Rapid Prototyping of Virtual API
using Swagger Server Generators
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
RuleX
Available from
http://www.nomos-software.com
We have used RuleX to
RuleX Code
Generation
Commercial ‘code generation’ product
from Nomos Software
• Generate Prototype APIs that can be
called from Swagger UI or REST client
• The API prototypes are generated from
• Swagger.json
• Rulex.json5 – rules, functions &
actions
RuleX Overview
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Basic Possible from Swagger +
RuleX
Swagger editor JAX-
RS Codegen
RuleX Codegen RuleX Codegen - with rules,
functions & actions
Server with stub endpoints
Dummy responses
JSON syntax validation
Validation against swagger
definitions (json schema)
Validation based on rules
Simulated responses based
on functions
Sample (pass and fail) API
requests based on actions
(not included in Server)
Generate Server from Swagger
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
RuleX Code
Generation
Swagger
API
Description
Prototype API
Validates JSON syntax
Validates against schema
Validates against API
behavior rules
Returns simulated
responses
Model-driven API Prototyping
RuleX
API Rules,
Functions &
Actions Design in
MagicDraw &
generate Swagger
JSON and RuleX
JSON
MagicDraw
Model
WAR with JAX-RS endpoints
Java readable source code
Edit Swagger +
RuleX JSON
directly
100%
generated
100% generated
Swagger UI 100% generated
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
What we do now: parallel documents in .json & .json5
format
Swagger
Description
RuleX
.json5 format : for multi-lines
Rules – for validation
Functions – for simulated responses
Actions – for test data generation
Generated from definitions in
MagicDraw UML and thus aligned with
Swagger .json
.json format
defining API
behaviour more
completely
Extending Swagger with RuleX
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Generate RuleX Rules
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Validation rules expressed in OCL from omg.org:
- http://clients.nomos-software.com/RuleXOCLUserGuide.html
Simulation and test generation rules expressed in proprietary actions language (extension of OCL):
- http://clients.nomos-software.com/RuleXActionsUserGuide.html
These types of ‘rules’ are often
found in API documentation
and appendices, and
sometimes … embedded
somewhere in the code
Example Business Rules
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Generate RuleX Functions
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Example RuleX Functions
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Compile RuleX WAR
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Code RuleX Actions
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Sample Payment Mean CC
amkbcloud amkbcloud.com
Your Presentation Title
Goes Here Internet-based Design,
Publish & Support for
IoT APIs
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Edit a rule in the “rule expression
editor” pane. Includes syntax
checking.
“Rule metadata” pane. Edit information
about the rules here : name, error message
etc. To edit the rule expression itself, click
the link for the rule in the righthand pane
and the rule expression is displayed in the
rule editor pane above.
Future: may incorporate rule metadata into
swagger pane as vendor extensions.
View swagger and rules here - also
provides means to call the API.
To add / edit a rule expression, click
the rule link. The rule is loaded to the
“rule expression editor” pane.
Swagger 2.0 pane – edit
swagger description here
Generate RuleX jax-RS server and
download.
Swagger Editor for RuleX - alpha
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
RuleX Code
Generation
Swagger
Description
Prototype
API
MagicDraw as Super Enabler
RuleX
Rules,
Functions &
Actions
MagicDraw
Model 100%
generated
100% generated
Swagger UI
100% generated
Manage multiple APIs
together - share ‘common
elements’ across APIs
Autogenerate
documentation
API
Documentation
Visual Model
Manage API structure and business
rules together
Guarantee generated Swagger is
correct & consistent
100% generated
Functioning API with
- rich diagnostics and
- simulated responses
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Example
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Connected Car – Example Scenario
• Setup New Customer
– Party Management API
• Create Individual
– Customer Management API
• Create Customer
• Create Customer Account
• Create Payment Mean
– Billing Management API
• Create Billing Account
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Party Mgmt – Create Individual
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Customer Mgmt – Create Customer
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Customer Mgmt – Create Customer Acct
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Customer Mgmt – Create Payment Mean
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Using generated Sample
Payment Mean CC
Customer Mgmt – Create Payment Mean
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Billing Mgmt – Create Billing Acct
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Benefits of Model-driven IoT APIs
Visual Model
Manage API structure
and business rules
together
Manage multiple APIs
together - share
‘common elements’
across APIs
Model Driven
Generate
Documentation
Guarantee generated
Swagger .json is
correct & consistent
Generate
RuleX .json5
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Reduced
Dependencies on
Internal Project
Timelines
API Users can Play
with and Test against
APIs
While APIs are still under
development
Benefits of Rapid Prototyping
for IoT APIs
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Improved
API User Experience
90% faster to
onboard
Reduced Support
Effort
Smoother onboarding
process
Benefits of Automated Technical
Support for IoT APIs
amkbcloud.com Copyright © AMKB Cloud & Nomoséire Limited 2015 trading as Nomos Software amkbcloud
Find out more
Virtual APIs - http://104.154.77.16:9090/swagger-ui
party_swagger.json, billing_swagger.json,
customer_swagger.json
Visit amkbcloud.com
Visit nomos-software.com
Email cfaurer(at)amkbcloud.com
We have Implemented the 17 TMF REST APIs – Billing, Customer, Party,
Performance, Product Catalog, Product Order, Product Inventory, Service Catalog,
Service Order, Service Activation (MEF), Service Inventory, Resource Catalog,
Resource Order, Resource Inventory, Service Level Agreement, Ticket & Usage