1. Roomware and the Internet of things
An introduction
Peter Kaptein | Instant Interfaces | The RoomWare project
2. Roomware and the Internet of things
@PeterKaptein
@roomware
Peter Kaptein | Instant Interfaces | The RoomWare project
3. Roomware and the Internet of things
Programming
Roomware things
in any language
Peter Kaptein | Instant Interfaces | The RoomWare project
4. Roomware and the Internet of things
Connecting anything
to anything
using sockets
Peter Kaptein | Instant Interfaces | The RoomWare project
5. Roomware and the Internet of things
Sensors
Devices
Applications
Peter Kaptein | Instant Interfaces | The RoomWare project
6. Roomware and the Internet of things
Mobile
Desktop
Real world
Peter Kaptein | Instant Interfaces | The RoomWare project
7. Roomware and the Internet of things
Open Source project
Peter Kaptein | Instant Interfaces | The RoomWare project
8. Roomware and the Internet of things
Goal:
To simplify
creating your own
“web of things”
Peter Kaptein | Instant Interfaces | The RoomWare project
9. Roomware and the Internet of things
Peter Kaptein | Instant Interfaces | The RoomWare project
10. The Roomware Server
Roomware
Basics
Peter Kaptein | Instant Interfaces | The RoomWare project
11. Roomware and the Internet of things
People Places
Data
Peter Kaptein | Instant Interfaces | The RoomWare project
12. Roomware and the Internet of things
People Places
RW
Server
Data
Peter Kaptein | Instant Interfaces | The RoomWare project
13. Roomware and the Internet of things
Actions Interactions Installations Devices
People Places Sensors
RW
Server
Local Data Web based
Peter Kaptein | Instant Interfaces | The RoomWare project
14. The Roomware Server
Basics #2
Peter Kaptein | Instant Interfaces | The RoomWare project
15. Roomware and the Internet of things
Bi-directional
Peter Kaptein | Instant Interfaces | The RoomWare project
16. Roomware and the Internet of things
Socket connection
Device Device
Peter Kaptein | Instant Interfaces | The RoomWare project
17. Roomware and the Internet of things
Socket connection
RW
Mobile ph. Server Application
Peter Kaptein | Instant Interfaces | The RoomWare project
18. Roomware and the Internet of things
Socket connection
RW
Mobile ph. Server Application
Action
Peter Kaptein | Instant Interfaces | The RoomWare project
19. Roomware and the Internet of things
Action!
Socket connection
RW
Mobile ph. Server Application
Peter Kaptein | Instant Interfaces | The RoomWare project
21. Roomware and the Internet of things
Using this principle
Socket connection
RW
Mediator Server Mediator
Device Device
Peter Kaptein | Instant Interfaces | The RoomWare project
22. Roomware and the Internet of things
Making this possible
Device Device
Device Device
Device Device
Peter Kaptein | Instant Interfaces | The RoomWare project
23. And this
Local machine
Device Device
Other machines
in the network
Device Device
The web
Device Device
24. And this
Local machine
Device Reader
Other machines
in the network
Service App
The web
Site Site
25. Roomware and the Internet of things
Peter Kaptein | Instant Interfaces | The RoomWare project
26. Roomware and the Internet of things
Basic structure
Peter Kaptein | Instant Interfaces | The RoomWare project
27. Roomware and the Internet of things
Roomware Server
Roomware Client
Basis
Peter Kaptein | Instant Interfaces | The RoomWare project
28. Roomware and the Internet of things
Client
Roomware - Broadcast to
Header - Type of message
RW Message Roomware
Handler Message
Data
Roomware Roomware
Communicator Connection
Server
Roomware
Socket Client Socket Server
Connector
- RW Server Address Client Socket Message
- Application Key
- Subscription list
Peter Kaptein | Instant Interfaces | The RoomWare project
29. Roomware and the Internet of things
Roomware Message
Peter Kaptein | Instant Interfaces | The RoomWare project
30. Roomware and the Internet of things
Roomware - Broadcast to
Header - Type of message
Roomware
Message
Data
ROOMWARE MESSAGE
ROOMWARE HEADER For Roomware
- Broadcast to Server
- Type
MESSAGE For Roomware
- Any data applications
Peter Kaptein | Instant Interfaces | The RoomWare project
31. Roomware and the Internet of things
Message Distribution
Basis
Peter Kaptein | Instant Interfaces | The RoomWare project
32. Roomware and the Internet of things
Client
Roomware Roomware
Message Message
Socket Server Client Socket Client
Client Socket
Client Socket
Client Socket
Message header
Subscriber list Client Socket Client
- Broadcast to:
Peter Kaptein | Instant Interfaces | The RoomWare project
33. Roomware and the Internet of things
Client
Roomware
Message
Roomware Client
Message
Roomware
Server Client
Client
Roomware Client
Message
Peter Kaptein | Instant Interfaces | The RoomWare project
34. Roomware and the Internet of things
Event
Data
Roomware
Message
Roomware Event
Client
Message Data
Roomware
Server Client
Client
Roomware Event
Client
Message Data
Peter Kaptein | Instant Interfaces | The RoomWare project
35. Summary
1. Client sends Event Data to Roomware
server
1. Using a Roomware Message
2. Roomware server reads Message Header
1. Message Header contains “broadcast
to” info
3. Roomware server pushes Message to all
Subscribed Clients
4. Subscribed Clients receive Message
containing Event Data
36. Additional info
• Each Roomware application connecting to
the Roomware Server is reflected in a
Client Socket on the Roomware Server
• The Client Socket reads the Message
Header and finds out who is subscribed to
the “subject” as stated in the “Broadcast
to” item in the Message Header
• The Roomware Server operates purely as a
switchboard for Roomware Messages
37. Making this possible
Local machine
Device Reader
Other machines
in the network
Service App
The web
Site Site
Roomware
Message
40. Event
• One way communication
• No response expected from other clients
41. Request
• Two way communication
• Client(s) send back a Response
• Roomware Server attaches a slotID to the
Message Header
• The slotID is the explicit return-address for
the response on the request
42. Response
• A Response is sent back to a requestor
using the slotID given by the Roomware
Server
• The Message Header contains the slotID
• The Socket Client of the respondant finds
the Socket Client with the slotID and
pushes the Response to that client
• The Response is then pushed via the
sockets to the Requesting application
43. Message
• A Roomware Message of type:Message has
the same structure as a message type:Event
• It is neutral / has no other purpose than to
send a message
• It does not expect a response
44. The Roomware Server
The Mediator
Concept
Peter Kaptein | Instant Interfaces | The RoomWare project
45. Roomware and the Internet of things
“Do something”
Event!
Something Something
Peter Kaptein | Instant Interfaces | The RoomWare project
46. Roomware and the Internet of things
“Do something”
Event! Huh?
#%sadfhs23
Something Something
Peter Kaptein | Instant Interfaces | The RoomWare project
47. Roomware and the Internet of things
Introducing Mediators
Roomware Client Roomware Client
Mediator Mediator
Something Socket connection Something
Peter Kaptein | Instant Interfaces | The RoomWare project
48. Roomware and the Internet of things
“Do something”
Roomware Client Roomware Client
Mediator Mediator
Something Something
Event!
Peter Kaptein | Instant Interfaces | The RoomWare project
49. Roomware and the Internet of things
“Do something”
“Do something”
Roomware Client Roomware Client
Mediator Mediator
Something Something
Event! OK
Peter Kaptein | Instant Interfaces | The RoomWare project
50. Brief
• Roomware Communication is between
Mediators
• A Mediator understands the needs and
“language” of both the Roomware Server
and the Application, Sensor or Device
• A Mediator “A” is created to understand a
Mediator “B” and vice versa
• A Mediator exists ONLY on the client side
• A Mediator exists NEVER on the server
side
• A Mediator solves all communication issues
51. Reasons for this design
• By keeping the Mediator on the side of the
Roomware Client, you keep all intelligence
and higher level decision making outside
the Roomware Server
• All changes with a simpleton Roomware
Server setup will happen on the client side
• This allows for maximum Application
Scalability and Server Stability
52. Roomware and the Internet of things
Connecting to a
Roomware Server
Peter Kaptein | Instant Interfaces | The RoomWare project
53. Connector Parameters
• Server location - Telling your
Roomware Client where to find the
Roomware Server
• Subcribe-to list - Telling your
Roomware Server which Messages to push
to your Roomware Client
• Is comma-separated
• Allows for reception of multiple of
Subjects of Roomware Messages
• Application key - representing the
Application Cluster to place the app in
54. The Roomware Server
Sending
messages
Peter Kaptein | Instant Interfaces | The RoomWare project
55.
56. Roomware and the Internet of things
Subscribe to: Subscribe to:
- Sensor_1_event - Sensor_all_event
- Sensor_2_event - Button_2_event
Roomware Client Roomware Client
Mediator Mediator
“A” No match Something
Broadcast to:
- Button_5_event
- Button_press
Peter Kaptein | Instant Interfaces | The RoomWare project
57. Roomware and the Internet of things
Subscribe to: Subscribe to:
- Sensor_1_event - Sensor_all_event
- Sensor_2_event - Button_2_event
Roomware Client Roomware Client
Mediator Mediator
Matching
“A” Message from
“A”
Broadcast to:
- Button_2_event
- Button_press
Peter Kaptein | Instant Interfaces | The RoomWare project
58. The Roomware Server
Application
Clusters
Peter Kaptein | Instant Interfaces | The RoomWare project
59. The Roomware Server
Roomware Server
Application
Cluster 2
Application
Cluster 1
Application
Cluster 3
Peter Kaptein | Instant Interfaces | The RoomWare project
61. The Roomware Server
Something Something
Something
Something
Application
Cluster 2
Application
Cluster 1
Something Something
Something
Something
Something
Peter Kaptein | Instant Interfaces | The RoomWare project
62. The Roomware Server
Something Something
Something
Something
Application
Cluster 2
Application
Cluster 1
Something Something
Something
Something
Something
Application
Peter Kaptein | Instant Interfaces | The RoomWare project
63. Summary
• One Roomware server can cater multiple
Application Clusters
• An Application Cluster is a sandbox which
allow you to put Roomware Clients in a
shielded area
• Application Clusters allow you to build and
host multiple Roomware Applications
separate from each other on the same
machine
64. Connecting
• To connect to an Application Cluster, you
state an Application Key in the connection
string
• One Roomware Client Application can
open multiple Roomware Connections to
multiple servers and clusters
• This opens the possibility to connect to
anything in an limitless scenario
66. The Roomware Server
Roomware Server
Application
Cluster 2
Application
Cluster 1
Application
Cluster 3
Peter Kaptein | Instant Interfaces | The RoomWare project
67. The Roomware Server
RW Server “A”
RW Server “B”
Application
Cluster 2
Application
Cluster X
Application
Cluster 1
Application
Application Cluster Y
Cluster 3
Application
Cluster Z
RW Server “C”
Application
Cluster 2
Peter Kaptein | Instant Interfaces | The RoomWare project
68. The Roomware Server
Something
RW Server “A”
RW Server “B”
Application Something
Cluster 2
Application
Cluster X
Application
Cluster 1
Application
Application Cluster Y
Cluster 3
Application
Cluster Z
Something
RW Server “C” Something
Application
Cluster 2
Peter Kaptein | Instant Interfaces | The RoomWare project