OSEHRA Conference 2015: EWD.js - The Future Starts Here1. Copyright © 2015 M/Gateway Developments Ltd
EWD.js
The Future Starts Here
Rob Tweed
Twitter: @rtweed
rob.tweed@gmail.com
http://www.mgateway.com
2. Copyright © 2015 M/Gateway Developments Ltd
What if…
• EWD.js was adopted at the VA?
• What's the view like from up there?
3. Copyright © 2015 M/Gateway Developments Ltd
EWD.js: the bigger picture
• What does it make possible?
• A glimpse of the vision behind EWD.js
4. Copyright © 2015 M/Gateway Developments Ltd
What is EWD.js
• Development framework
• Run-time platform
http://ewdjs.com
5. 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
6. 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
7. 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
8. Copyright © 2015 M/Gateway Developments Ltd
Current VistA
VistA
Caché
VistA Server
Roll & Scroll
RPC BrokerCPRS
RPCsFileMan
Stateful
9. 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
10. Copyright © 2015 M/Gateway Developments Ltd
VistA
Caché
EWD.js
Application
Server
Caché
nginx
EWD.js
Application
Server
Caché
EWD.js
Application
Server
Caché
ECP
Networking
Mapped globals
for shared EWD Sessions
& VistA data
Mapped VistA
routines
Incoming
WebService
Traffic
Scaling Out
12. 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
13. 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
VistA
VistA
VistA
VistA
14. 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
VistA
VistA
VistA
VistA
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
Back-end
Servers
EWD.js
system
EWD.js
system
EWD.js
system
VistA
VistA
VistA
VistA
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
Aggregate
responses
VistA
VistA
VistA
VistA
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
Aggregate
responses
VistA
VistA
VistA
VistA
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
Intercept
Incoming
request
VistA
VistA
VistA
VistA
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
re-directIntercept
Incoming
request
VistA
VistA
VistA
VistA
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
Intercept
Incoming
response
VistA
VistA
VistA
VistA
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
response
re-direct
VistA
VistA
VistA
VistA
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
Aggregate
responses
VistA
VistA
VistA
VistA
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
Aggregate
responses
VistA
VistA
VistA
VistA
24. Copyright © 2015 M/Gateway Developments Ltd
So that's REST…
What about browser-based apps?
25. 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
26. Copyright © 2015 M/Gateway Developments Ltd
All good stuff, but
It's the narrow, technical perspective on why EWD.js
Can be considered to be just one potential option
28. Copyright © 2015 M/Gateway Developments Ltd
Benefits to the VA
• Single language skill
– JavaScript
29. Copyright © 2015 M/Gateway Developments Ltd
Benefits to the VA
• Single language skill
– JavaScript
• Controlled migration:
– from rare Mumps development resources
– To readily-available JavaScript developers
30. Copyright © 2015 M/Gateway Developments Ltd
Benefits to the VA
• Single language skill
– JavaScript
• Controlled migration:
– from rare Mumps development resources
– To readily-available JavaScript developers
– One-off interfacing of core VistA functionality
via JavaScript functions
31. Copyright © 2015 M/Gateway Developments Ltd
Browsers
JavaScript
Node.js
React Native
32. Copyright © 2015 M/Gateway Developments Ltd
Browsers
JavaScript
Node.js
React Native
There's never been a more exciting time to be in IT
And all the big innovations and developments are focused
In these 4 areas
33. Copyright © 2015 M/Gateway Developments Ltd
JavaScript:
Now the world's most popular language
Already huge, and only getting bigger
34. Copyright © 2015 M/Gateway Developments Ltd
Node.js:
JavaScript on the server
There's a module for everything!
Tap into a huge and growing pool
of innovations
35. Copyright © 2015 M/Gateway Developments Ltd
Browsers:
The ubiquitous desktop client
The target UI for all new applications
36. Copyright © 2015 M/Gateway Developments Ltd
So, browser-based VistA Apps
The right way to go?
37. 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
38. 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
39. 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?
40. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
41. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
• Sophisticated graphics:
• 2-d - charts, graphs – updated in real-time
• 3-d eg http://data-arts.appspot.com/globe/
42. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
See the work of Astute Semantics
VistA modernisation using EWD.js
43. Copyright © 2015 M/Gateway Developments Ltd
•Myth #1: Browser UIs just aren't good enough for clinical/medical apps
44. 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?
45. 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
46. Copyright © 2015 M/Gateway Developments Ltd
•Myth #2: Browsers and web technologies aren't fast enough / too much latency
47. 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….
48. Copyright © 2015 M/Gateway Developments Ltd
•Myth #3: Browsers and web technologies aren't secure enough
49. Copyright © 2015 M/Gateway Developments Ltd
The future is browser-shaped
• Web-sockets – used by EWD.js applications
– Redefines the way you can think about browser apps
– 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/
50. 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
51. 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
52. 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
53. Copyright © 2015 M/Gateway Developments Ltd
Chromecast Schematic
Chrome
Browser
Chrome OS
HDMIOutput
TV
Monitor
Projector
WirelessNetwork
Interface
54. 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/
55. 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
56. Copyright © 2015 M/Gateway Developments Ltd
The future is JavaScript-based
Costs $80
57. Copyright © 2015 M/Gateway Developments Ltd
What does it do?
Detects hand movements
and gestures in 3D area
above and around the device
58. 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
59. Copyright © 2015 M/Gateway Developments Ltd
The future is JavaScript-shaped
The Internet of Things will be powered by JavaScript and Node.js
60. Copyright © 2015 M/Gateway Developments Ltd
React Native:
Facebook's Open Source solution
to the mobile app dilemma
61. Copyright © 2015 M/Gateway Developments Ltd
React Native:
Facebook's Open Source solution
to the mobile app dilemma
• How to effectively develop apps for:
• desktop browsers
• iOS mobile devices
• Android devices
62. Copyright © 2015 M/Gateway Developments Ltd
React Native:
Facebook's Open Source solution
to the mobile app dilemma
• How to effectively develop apps for:
• desktop browsers
• iOS mobile devices
• Android devices
• without 3 different skill-sets
• JavaScript, HTML, CSS
• Objective C, Swift
• Java
63. Copyright © 2015 M/Gateway Developments Ltd
React Native:
Facebook's Open Source solution
to the mobile app dilemma
• How to effectively develop apps for:
• desktop browsers
• iOS mobile devices
• Android devices
• without 3 different skill-sets
• JavaScript, HTML, CSS
• Objective C, Swift
• Java
• or avoiding the compromises of
• mobile browser apps
• hybrid apps
65. Copyright © 2015 M/Gateway Developments Ltd
Copyright © 2015 M/Gateway Developments Ltd
66. Copyright © 2015 M/Gateway Developments Ltd
React
State Change
Re-render
Virtual DOM
iOS
UIKit
Components
Standard React.js
JavaScriptCore
67. Copyright © 2015 M/Gateway Developments Ltd
React
State Change
Re-render
Virtual DOM
iOS
UIKit
Components
Standard React.js
JavaScriptCore
68. Copyright © 2015 M/Gateway Developments Ltd
• Creates truly Native Mobile Applications
• Currently iOS only, but Android port due to
be released to Open Source any day
• Mobile apps can be built by JavaScript
developers
– Who can also create browser app equivalents
in the same way
• Note:
– NOT write once, run everywhere
– Learn Once, Write Anywhere
69. Copyright © 2015 M/Gateway Developments Ltd
React Native:
This is HUGE!
Provides the mobile solution
that the VA have been
searching for
EWD.js makes it possible for the VA
to use React Native TODAY!
https://www.youtube.com/watch?v=zOIwTU6oPuo
70. Copyright © 2015 M/Gateway Developments Ltd
Further benefits to the VA
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
Free up server
resources
71. Copyright © 2015 M/Gateway Developments Ltd
Further benefits to the VA
• all EWD.js apps would work
• highly secure
• insignificant cost per device
• significantly simplify and reduce
costs of security procedures
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
73. 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
• These are things the VA has been struggling to
find solutions for, for years
74. Copyright © 2015 M/Gateway Developments Ltd
What about the Open-Source VistA
Community?
• Everything I've described applies to them
also
– All these capabilities and features are
available for GT.M-based versions of VistA
• Fully supports the original aims of
OSEHRA
75. Copyright © 2015 M/Gateway Developments Ltd
So imagine if…
EWD.js was adopted at the VA..
76. Copyright © 2015 M/Gateway Developments Ltd
You really need to see the view
from up here!
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