SMArt ArchitectureBen Adida
Josh Mandel
26 August 2010SMArt Developers’ Meeting
Goal-Driven Architecture•we want end-user apps
to be installable and substitutable oni2b2, CareWeb, Indivo (+ commercial vendors)
•Why?An ecosystem that fosters innovation.
•so, the best approachis to derive requirements fromthe POV of SMArt app developers.
•+ requirements of usability of integration.
Let’s go DeeperWe need more details
(software components are not legos)
inspiration
- (void)viewDidLoad { [super viewDidLoad]; EKEventStore *eventStore = [[EKEventStore alloc] init]; EKEvent *event = [EKEvent eventWithEventStore:eventStore]; event.title = @"EVENT TITLE"; event.startDate = [[NSDate alloc] init]; event.endDate = [[NSDate alloc] initWithTimeInterval:600 sinceDate:event.startDate]; [event setCalendar:[eventStore defaultCalendarForNewEvents]]; NSError *err; [eventStore saveEvent:event span:EKSpanThisEvent error:&err]; }
An app connectsto one app container
A container connects to multiple data
sources
different containersfulfill the contractin different ways.
The app does not contact data sources
directly.
That’s the container’s job.
App
Container
DataSource
Substitutabilityworks both ways
The App gets...
•one API, data from many sourcesadd a source, no change to app.
•unambiguous patient recordapp never performs fuzzy matching,data de-duplication, etc.
Web APIs
•inspired by successful APIs:Facebook, OpenSocial, ...
•REST
•Apps can be run on separate serversusing different implementation stacks
•UX Integration via IFRAME
Screen real estateScreen real estatecontrolled by appcontrolled by app
Authentication?
•i2b2, Indivo, CareWeb, don’t havethe same authentication mechanism!
•How can the same app possibly workagainst all of these?
•Each container implements a consistentmechanism for delegating access: oAuth.
•The app only needs to speak oAuth.
User delegates access
to SMArt app
UI Integration
•Augmenting i2b2, Indivo, CareWeb natively is ideal: existing authentication reused, just add oAuth delegation.
•IFRAME wrapped bycontainer-specific context.
Faster: SMArt Connect
Faster: SMArt Connect
Faster: SMArt Connect
Data Representation
•single data representation across platforms(make it easy for the app)
•accommodate varying detail granularity
•rely on existing technology for transforming existing data to this rep
•RDF & SPARQL
In Summary•make life easier for the app,
reduce likelihood of errors in the app,do the hard stuff in the container
•datasource != containerthese legos are not all the same
•ideal SMArt container doesoAuth and SMArt Connect nativelyso as to leverage existing (i2b2/Indivo)... features.
•RDF universal representation + toolset