osehra conference 2015: ewd.js - the future starts here

77
Copyright © 2015 M/Gateway Developments Ltd EWD.js The Future Starts Here Rob Tweed Twitter: @rtweed [email protected] http://www.mgateway.com

Upload: rob-tweed

Post on 17-Aug-2015

88 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

EWD.jsThe Future Starts Here

Rob Tweed

Twitter: @[email protected]

http://www.mgateway.com

Page 2: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

What if…

• EWD.js was adopted at the VA?

• What's the view like from up there?

Page 3: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

EWD.js: the bigger picture

• What does it make possible?• A glimpse of the vision behind EWD.js

Page 4: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

What is EWD.js

• Development framework

• Run-time platform

http://ewdjs.com

Page 5: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 6: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 7: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 8: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Current VistA

VistA

Caché

VistA Server

Roll & Scroll

RPC BrokerCPRS

RPCsFileMan

Sta

tefu

l

Page 9: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

EWD.js-enabled VistA

EWD.js

VistA

Caché

Node.jsVistA Server

cache.node

Roll & Scroll

RPC BrokerCPRS

RPCsFileMan

Interface functions

WebServiceClients

HTTPS +HMAC

SHA256

Sta

tefu

l

JavaScript /Node.jsbusiness logic

Sta

tele

ss

Page 10: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

VistACaché

EWD.jsApplication

Server

Caché

nginx

EWD.jsApplication

Server

Caché

EWD.jsApplication

Server

Caché

EC

PN

etworking

Mapped globalsfor shared EWD Sessions

& VistA data

Mapped VistAroutines

Inco

min

gW

eb S

ervi

ceT

raff

ic

Scaling Out

Page 11: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Federated access across the VA?

Page 12: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

HTTP-basedWeb Service

REST-basedService

Back-endServers

HTTP

REST

HMAC-SHA256

Signed HTTP

https://github.com/robtweed/ewd-federator

Page 13: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

VistA

VistA

VistA

VistA

Page 14: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

VistA

VistA

VistA

VistA

Page 15: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

VistA

VistA

VistA

VistA

Page 16: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

Aggregateresponses

VistA

VistA

VistA

VistA

Page 17: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

Aggregateresponses

VistA

VistA

VistA

VistA

Page 18: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

InterceptIncomingrequest

VistA

VistA

VistA

VistA

Page 19: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

re-directInterceptIncomingrequest

VistA

VistA

VistA

VistA

Page 20: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

InterceptIncomingresponse

VistA

VistA

VistA

VistA

Page 21: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

InterceptIncomingresponse

re-direct

VistA

VistA

VistA

VistA

Page 22: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

Aggregateresponses

VistA

VistA

VistA

VistA

Page 23: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-federator

Cache / GlobalsDB / GT.Mpersistent JSON cacheing, storage

Node.jsRESTClients

RE

ST

Re

qu

est

s

EWD.jssystem

Back-endServers

EWD.jssystem

EWD.jssystem

EWD.jssystem

Aggregateresponses

VistA

VistA

VistA

VistA

Page 24: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

So that's REST…What about browser-based apps?

Page 25: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ewd-

fede

rato

r

EWD.jsApplication

Server

EWD.js

Vis

tA

EWD.js

Vis

tA

Site 1

Site 2

EWD.js

Vis

tA

Site 3

RESTBrowser

Web

S

ocke

ts

HTTPWeb

Services

Page 26: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 27: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Page 28: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Benefits to the VA

• Single language skill– JavaScript

Page 29: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 30: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 31: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Browsers

JavaScript

Node.js

React Native

Page 32: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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 focusedIn these 4 areas

Page 33: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

JavaScript:

Now the world's most popular language

Already huge, and only getting bigger

Page 34: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Node.js:

JavaScript on the server

There's a module for everything!

Tap into a huge and growing poolof innovations

Page 35: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Browsers:

The ubiquitous desktop client

The target UI for all new applications

Page 36: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

So, browser-based VistA Apps

The right way to go?

Page 37: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 38: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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 daysThe days of being limited to simple pages were decades ago

Page 39: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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?

Page 40: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #1: Browser UIs just aren't good enough for clinical/medical apps

Page 41: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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/

Page 42: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #1: Browser UIs just aren't good enough for clinical/medical apps

See the work of Astute SemanticsVistA modernisation using EWD.js

Page 43: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #1: Browser UIs just aren't good enough for clinical/medical apps

Page 44: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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?

Page 45: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #2: Browsers and web technologies aren't fast enough / too much latency

Demonstrations showing federated access to multipleVistA systems using ewd-federator and EWD.js:

Sub-second response

Asynchronous pre-emptive data fetching based on usage statistics

Page 46: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #2: Browsers and web technologies aren't fast enough / too much latency

Page 47: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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….

Page 48: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

•Myth #3: Browsers and web technologies aren't secure enough

Page 49: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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/

Page 50: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 51: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 52: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 53: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Chromecast Schematic

ChromeBrowser

Chrome OS

HD

MI O

utput

TVMonitor

Projector

Wire

less

Net

wor

kIn

terf

ace

Page 54: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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/

Page 55: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

VistA Chromecast Applications

Chromecast

PC or Mac

Chrome

Chromecast

JavaScript APIs

SenderApplication

Wireless N

etwork

Chrome

HTML Page

ChromecastJavaScript APIs

EWD.jsApplication

EWD.js Application

JavaScript

EWD.js / Node.jsServer

EWD.js JavaScript

WebSocketmessaging

VistA

Page 56: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

The future is JavaScript-based

Costs $80

Page 57: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

What does it do?

Detects hand movementsand gestures in 3D areaabove and around the device

Page 58: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 59: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

The future is JavaScript-shaped

The Internet of Things will be powered by JavaScript and Node.js

Page 60: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

React Native:

Facebook's Open Source solutionto the mobile app dilemma

Page 61: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

React Native:

Facebook's Open Source solutionto the mobile app dilemma

• How to effectively develop apps for:• desktop browsers• iOS mobile devices• Android devices

Page 62: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

React Native:

Facebook's Open Source solutionto 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

Page 63: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

React Native:

Facebook's Open Source solutionto 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

Page 64: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Page 65: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Copyright © 2015 M/Gateway Developments Ltd

Page 66: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ReactState Change

Re-renderVirtual DOM

iOSUIKit

Components

Standard React.js

JavaScriptCore

Page 67: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

ReactState Change

Re-renderVirtual DOM

iOSUIKit

Components

Standard React.js

JavaScriptCore

Page 68: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 69: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

React Native:

This is HUGE!Provides the mobile solutionthat the VA have beensearching for

EWD.js makes it possible for the VAto use React Native TODAY!

https://www.youtube.com/watch?v=zOIwTU6oPuo

Page 70: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

Further benefits to the VA

EWD.js

VistA

Caché

Node.jsVistA Server

cache.node

Roll & Scroll

RPC BrokerCPRS

RPCsFileMan

Interface functions

WebServiceClients

HTTPS +HMAC

SHA256

Sta

tefu

l

JavaScript /Node.jsbusiness logic

Sta

tele

ss

Free up serverresources

Page 71: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 72: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 73: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 74: OSEHRA Conference 2015: EWD.js - The Future Starts Here

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

Page 75: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

So imagine if…

EWD.js was adopted at the VA..

Page 76: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

You really need to see the view from up here!

Page 77: OSEHRA Conference 2015: EWD.js - The Future Starts Here

Copyright © 2015 M/Gateway Developments Ltd

EWD.jsThe Future Starts Here

Rob Tweed

Twitter: @[email protected]

http://www.mgateway.com