More Related Content
Similar to EWD.js: The Future Starts Here (20)
EWD.js: The Future Starts Here
- 1. Copyright © 2015 M/Gateway Developments Ltd
EWD.js
The Future Starts Here
Rob Tweed
Twitter: @rtweed
rob.tweed@gmail.com
http://www.mgateway.com
1Wednesday, 25 March 15
- 2. Copyright © 2015 M/Gateway Developments Ltd
How EWD.js tends to be viewed
• Just one of many possible technical options
• Tomorrow will bring another shiny technology
• Rob's hobby horse
2Wednesday, 25 March 15
- 3. Copyright © 2015 M/Gateway Developments Ltd
What if…
• EWD.js was adopted at the VA?
• What's the view like from up there?
3Wednesday, 25 March 15
- 4. Copyright © 2015 M/Gateway Developments Ltd
EWD.js: the bigger picture
• What does it make possible?
• A glimpse of the vision behind EWD.js
4Wednesday, 25 March 15
- 5. Copyright © 2015 M/Gateway Developments Ltd
What is EWD.js
• Development framework
• Run-time platform
http://ewdjs.com
5Wednesday, 25 March 15
- 6. Copyright © 2015 M/Gateway Developments Ltd
What is EWD.js
• Development framework
– Client-server applications in the browser
– Web Services
– Legacy Mumps application modernisation
• Run-time platform
6Wednesday, 25 March 15
- 7. Copyright © 2015 M/Gateway Developments Ltd
What is EWD.js
• Development framework
• Run-time platform
– Node.js-based application server
– Web Server
– Integrated JSON database
• Caché, GT.M, GlobalsDB, MongoDB
7Wednesday, 25 March 15
- 8. Copyright © 2015 M/Gateway Developments Ltd
EWD.js key features
• 100% JavaScript
– Browser
– Back-end (business logic): Node.js
• 100% JSON-based data
– Browser
– Back-end
– Database
• Legacy Mumps code can be accessed from Node.js
• High performance
– Node.js
– In-process interface to database
• Highly scalable
– stateless
8Wednesday, 25 March 15
- 9. Copyright © 2015 M/Gateway Developments Ltd
Current VistA
VistA
Caché
VistA Server
Roll & Scroll
RPC BrokerCPRS
RPCsFileMan
Stateful
9Wednesday, 25 March 15
- 10. Copyright © 2015 M/Gateway Developments Ltd
EWD.js-enabled VistA
EWD.js
VistA
Caché
Node.js
VistA Server
cache.node
Roll & Scroll
RPC BrokerCPRS
RPCsFileMan
Interface functions
Web
Service
Clients
HTTPS +
HMAC SHA256
Stateful
JavaScript /Node.js
business logic
Stateless
10Wednesday, 25 March 15
- 11. Copyright © 2015 M/Gateway Developments Ltd
VistA
Cache
EWD.js
Application
Server
Cache
nginx
EWD.js
Application
Server
Cache
EWD.js
Application
Server
Cache ECP
Networking
Mapped globals
for shared EWD Sessions
& VistA data
Mapped VistA
routines
Incoming
WebService
Traffic
Scaling Out
11Wednesday, 25 March 15
- 12. Copyright © 2015 M/Gateway Developments Ltd
Benefits to the VA
• Single language skill
• Controlled migration:
– from rare Mumps development resources
– To readily-available JavaScript developers
12Wednesday, 25 March 15
- 13. Copyright © 2015 M/Gateway Developments Ltd
Benefits to the VA
• Single language skill
• Controlled migration:
– from rare Mumps development resources
– To readily-available JavaScript developers
– One-off interfacing of core VistA functionality
via JavaScript functions
13Wednesday, 25 March 15
- 14. Copyright © 2015 M/Gateway Developments Ltd
Federated access across the VA?
14Wednesday, 25 March 15
- 15. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
HTTP-based
Web Service
REST-based
Service
Back-end
Servers
HTTP
REST
HM
AC-SHA256
Signed
HTTP
https://github.com/robtweed/ewd-federator
15Wednesday, 25 March 15
- 16. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
16Wednesday, 25 March 15
- 17. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
17Wednesday, 25 March 15
- 18. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
18Wednesday, 25 March 15
- 19. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Aggregate
responses
19Wednesday, 25 March 15
- 20. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Aggregate
responses
20Wednesday, 25 March 15
- 21. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Intercept
Incoming
request
21Wednesday, 25 March 15
- 22. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
re-directIntercept
Incoming
request
22Wednesday, 25 March 15
- 23. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Intercept
Incoming
response
23Wednesday, 25 March 15
- 24. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Intercept
Incoming
response
re-direct
24Wednesday, 25 March 15
- 25. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Aggregate
responses
25Wednesday, 25 March 15
- 26. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
Cache / GlobalsDB / GT.M
persistent JSON cacheing, storage
Node.jsREST
Clients
REST
Requests
EWD.js
system
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
Aggregate
responses
26Wednesday, 25 March 15
- 27. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
• Ability to create complex "dances"
between EWD.js and other Web/REST
servers
– Single Sign On
– BSE rules
• Ability to save information on ewd-
federator
– Caching to avoid repeated "dances"
– Storing authorisation tokens
27Wednesday, 25 March 15
- 28. Copyright © 2015 M/Gateway Developments Ltd
Potential benefits to the VA
• Open source, lightweight, JavaScript-
based solution to federation
• Very fast, scalable
– Same ECP-based scale-out could be used
• Secure:
– EWD.js web service traffic encrypted using
HMAC-SHA256 (cf Amazon Web Services)
– EWD.js web services inaccessible without
authorisation at each EWD.js server
28Wednesday, 25 March 15
- 29. Copyright © 2015 M/Gateway Developments Ltd
So that's REST…
What about browser-based apps?
29Wednesday, 25 March 15
- 30. Copyright © 2015 M/Gateway Developments Ltd
ewd-federator
EWD.js
Application
Server
EWD.js
VistA
EWD.js
VistA
Site 1
Site 2
EWD.js
VistA
Site 3
REST
Browser
WebSockets
HTTP
Web
Services
30Wednesday, 25 March 15
- 31. Copyright © 2015 M/Gateway Developments Ltd
EWD.js Browser Applications
• Single Page Applications
• Use Web Sockets instead of Ajax / HTTP
– Bi-directional persistent connection
• Server or browser can send at any time
• No more polling
– Many studies suggest faster than HTTP
• Client-server in a browser
• Works with any JavaScript framework
31Wednesday, 25 March 15
- 32. Copyright © 2015 M/Gateway Developments Ltd
All good stuff, but
It's the narrow perspective on why EWD.js
32Wednesday, 25 March 15
- 35. Copyright © 2015 M/Gateway Developments Ltd
JavaScript
Brendan Eich
Netscape 1995
35Wednesday, 25 March 15
- 36. Copyright © 2015 M/Gateway Developments Ltd
JavaScript credibility raised
36Wednesday, 25 March 15
- 37. Copyright © 2015 M/Gateway Developments Ltd
Browsers
JavaScript
Node.js
37Wednesday, 25 March 15
- 38. Copyright © 2015 M/Gateway Developments Ltd
Browsers
JavaScript
Node.js
There's never been a more exciting time to be in IT
And all the big innovations and developments are focused
In these 3 areas
38Wednesday, 25 March 15
- 39. Copyright © 2015 M/Gateway Developments Ltd
Node.js:
There's a module for everything!
Tap into a huge and growing pool
of innovations
39Wednesday, 25 March 15
- 40. Copyright © 2015 M/Gateway Developments Ltd
So, browser-based VistA Apps
The right way to go?
40Wednesday, 25 March 15
- 41. Copyright © 2015 M/Gateway Developments Ltd
• Myth #1: Browser UIs just aren't good enough for clinical/medical apps
• Myth #2: Browsers and web technologies aren't fast enough / too much latency
• Myth #3: Browsers and web technologies aren't secure enough
41Wednesday, 25 March 15
- 42. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
It seems they're good enough for everyone else
There's nothing a browser can't do these days
The days of being limited to simple pages were decades ago
42Wednesday, 25 March 15
- 43. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
Do you use:
• Google Docs
• Microsoft Office 365
• Do you bank, shop, watch videos, etc on your browser at home?
43Wednesday, 25 March 15
- 44. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
44Wednesday, 25 March 15
- 45. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
• Sophisticated graphics:
• 2-d
• 3-d eg http://data-arts.appspot.com/globe/
45Wednesday, 25 March 15
- 46. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
http://gradvs1.mgateway.com/main/simon3d.html
46Wednesday, 25 March 15
- 47. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
Finally, see the work of Astute Semantics
VistA modernisation using EWD.js
http://astutesemantics.com/
47Wednesday, 25 March 15
- 48. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
48Wednesday, 25 March 15
- 49. Copyright © 2015 M/Gateway Developments Ltd
•Myth #2: Browsers and web technologies aren't fast enough / too much latency
Are the following hopelessly slow for you?
• Amazon
• EBay
• Google
• Do you watch Netflix or YouTube in your browser?
49Wednesday, 25 March 15
- 50. Copyright © 2015 M/Gateway Developments Ltd
•Myth #2: Browsers and web technologies aren't fast enough / too much latency
Demonstrations showing federated access to multiple
VistA systems using ewd-federator and EWD.js:
!Sub-second response
Asynchronous pre-emptive data fetching based on usage statistics
50Wednesday, 25 March 15
- 51. Copyright © 2015 M/Gateway Developments Ltd
•Myth #2: Browsers and web technologies aren't fast enough / too much latency
51Wednesday, 25 March 15
- 52. Copyright © 2015 M/Gateway Developments Ltd
•Myth #3: Browsers and web technologies aren't secure enough
It seems they're good enough for online banking….
52Wednesday, 25 March 15
- 53. Copyright © 2015 M/Gateway Developments Ltd
•Myth #3: Browsers and web technologies aren't secure enough
53Wednesday, 25 March 15
- 54. Copyright © 2015 M/Gateway Developments Ltd
So what's the view like from up there?
54Wednesday, 25 March 15
- 55. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
• Web-sockets
– Server can send messages to the browser at any
time:
• Alerts, message of the day
– Real-time graphing of clinical results on tablet
browser by the bed-side
– Real-time bed state display
– Cross-browser inter-communication between provider
and patient
– Legacy green screen terminal in browser
• https://robtweed.wordpress.com/2014/03/04/vista-the-hackable-open-source-ehr-hackable-platform/
55Wednesday, 25 March 15
- 56. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
• WebRTC
– Real time communications
– Skype-like behaviour in a browser, without
plug-ins
• Video
• Audio
• File transfer
– Key to browser-based telemedicine
56Wednesday, 25 March 15
- 57. Copyright © 2015 M/Gateway Developments Ltd
Asm.js
• Subset of JavaScript that can be compiled and
run at near native C++ speed in asm.js-enabled
browsers
• Emscripten compiler
• Being driven by the games industry
– Unreal Engine ported to run in browser, without plug-
ins
– Try this:
• http://www.flohofwoe.net/demos/dsomapviewer_asmjs.html
57Wednesday, 25 March 15
- 58. Copyright © 2015 M/Gateway Developments Ltd
Asm.js
• Application of gaming thinking to
healthcare problems
• High performance UIs with extremely rapid
user interaction
• Gaming is all about high-speed reaction to
highly optimised visualisations of large
amounts of data
– Sound familiar?
58Wednesday, 25 March 15
- 59. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
• ServiceWorkers:
– New upcoming feature for the web platform
– Designed particularly for offline browser problem
– HTML5 AppCache is declarative and has many
known limitations
– ServiceWorkers:
• Allow a script to persistently cache resources
• Can handle all resource requests
• Even when network unavailable
– See: https://github.com/slightlyoff/ServiceWorker/blob/master/
explainer.md
59Wednesday, 25 March 15
- 60. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
Chromecast
• $35 Device from Google
• Marketed as a video streaming
device for your TV
• It actually has a lot more potential,
particularly in healthcare
60Wednesday, 25 March 15
- 61. Copyright © 2015 M/Gateway Developments Ltd
Chromecast Schematic
Chrome
Browser
Chrome OS
HDMIOutput
TV
Monitor
Projector
WirelessNetwork
Interface
61Wednesday, 25 March 15
- 62. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
Chromecast
• Turns an HDMI-
interfaced monitor or TV
into a sophisticated,
controllable display
https://robtweed.wordpress.com/2014/04/05/chromecast-understanding-its-potential/
62Wednesday, 25 March 15
- 63. Copyright © 2015 M/Gateway Developments Ltd
VistA Chromecast Applications
Chromecast
PC or Mac
Chrome
Chromecast
JavaScript APIs
Sender
Application
WirelessNetwork
Chrome
HTML Page
Chromecast
JavaScript APIs
EWD.js
Application
EWD.js Application
JavaScript
EWD.js / Node.js
Server
EWD.js JavaScript
WebSocket
messaging
VistA
63Wednesday, 25 March 15
- 64. Copyright © 2015 M/Gateway Developments Ltd
The future is JavaScript-based
Costs $80
64Wednesday, 25 March 15
- 65. Copyright © 2015 M/Gateway Developments Ltd
What does it do?
Detects hand movements
and gestures in 3D area
above and around the device
65Wednesday, 25 March 15
- 66. Copyright © 2015 M/Gateway Developments Ltd
How do you use it?
• USB Device
• Move one or more hands
above it
• Software can detect:
– Palms
– Fingers & thumbs
• Including joints
– Position
– Rotation in 3D
• Samples at whatever
frequency you wish
• Sub-millimeter accuracy
• Program in JavaScript
http://osehra.org/sites/default/files/QuantitativeHandTremorTweed.pdf
66Wednesday, 25 March 15
- 67. Copyright © 2015 M/Gateway Developments Ltd
The future is JavaScript-shaped
67Wednesday, 25 March 15
- 68. Copyright © 2015 M/Gateway Developments Ltd
The future is JavaScript-based
Google Authenticator for 2-factor authentication
EWD.js provides support "out of the box"
More info:
http://bit.ly/1ERPXRf
Video:
http://gradvs1.mgateway.com/main/authenticator.html
68Wednesday, 25 March 15
- 69. Copyright © 2015 M/Gateway Developments Ltd
Consequences for the VA
• Applications move to browser using
stateless EWD.js architecture
• Resource-hungry stateful applications
diminish
• Resources freed up on VistA servers
69Wednesday, 25 March 15
- 70. Copyright © 2015 M/Gateway Developments Ltd
Consequences for the VA
• Convergence of mobile & desktop
development:
– Responsive design
– Build once, run on all platforms
– One language skill: JavaScript
• All but the most demanding mobile
applications can be browser-based
• ServiceWorkers seen as solution for offline
70Wednesday, 25 March 15
- 71. Copyright © 2015 M/Gateway Developments Ltd
Consequences for the VA
• VistA access moves to browser
• Why are PCs needed any more?
• Chromebooks would support all applications
– Including roll & scroll
• Cheap: $200 - 300
• Highly secure
• No risk if stolen
• No need for such costly and complex security
procedures
• https://robtweed.wordpress.com/2013/12/19/chromebooks-the-ideal-healthcare-desktop/
71Wednesday, 25 March 15
- 72. Copyright © 2015 M/Gateway Developments Ltd
Consequences for the VA
• ewd-federator:
– Code distribution
– Software update management
– Synchronising configurations
– Federated control over user privileges
– Centralised performance monitoring /
dashboards
72Wednesday, 25 March 15
- 73. Copyright © 2015 M/Gateway Developments Ltd
I could go on….
73Wednesday, 25 March 15
- 74. Copyright © 2015 M/Gateway Developments Ltd
So imagine if…
EWD.js was adopted at the VA..
74Wednesday, 25 March 15
- 75. Copyright © 2015 M/Gateway Developments Ltd
You really should see the view up here!
Client-server browser-based applications
able to exploit all the IT industry's major advances
Browsers, JavaScript & Node.js:
the powerhouses of innovation
75Wednesday, 25 March 15
- 77. Copyright © 2015 M/Gateway Developments Ltd
EWD.js
The Future Starts Here
Rob Tweed
Twitter: @rtweed
rob.tweed@gmail.com
http://www.mgateway.com
77Wednesday, 25 March 15