U.S. Census presentation at DC API Meetup 12/13/12 by Alec Permison

  • 1,209 views
Uploaded on

 

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,209
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
3
Comments
0
Likes
1

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. The Making of the Census Bureau’s First Official Mobile AppAlec Permison, ADIT/ASDPaul Milbourne, ADIT/ASDGustavo Torrico, ADEP/EPD
  • 2. Agenda• Overview• Front-end Architecture• Back-end Architecture• Project Challenges• Lessons Learned
  • 3. Overview• First Census Bureau mobile app for Android/iOS both phone & tablet• Developed as part of ongoing Web Transformation effort• Displays 16 economic indicators • 13 from Census Bureau Central Indicators Database Repository • 2 from Bureau of Economic Analysis • 1 from Bureau of Labor Statistics
  • 4. Overview• Collaborative team effort • Communications Directorate – product owner & manager • Contractor – front-end development • Economics Directorate – data experts and back-end development • IT Directorate – technical guidance, back-end development, and technical support
  • 5. Overview• Mobile app front-end displays data• Three back-end API‟s supply data at App startup, refresh, and indicator release • CIDR Private API developed by Econ • BLS Private API developed by IT • BEA Public API• Config file on server queried at CIDR BLS BEAstartup BoC Private
  • 6. Front End Architecture• Adobe Flex 4.6• Adobe AIR 3.3• SWIZ 1.4• iOS 4+• Android 2.2+
  • 7. Front End Architecture
  • 8. Front End Architecture
  • 9. Front End Architecture
  • 10. Front End Architecture
  • 11. Front End ArchitecturePhone Core Tablet
  • 12. Front End Architecture• Skills Required • Tools Required – Adobe Flash Builder 4.6 – ActionScript – Xcode and Eclipse for some – CSS native components – XML
  • 13. Front End Architecture• Pros of Adobe Flex • Cons of Adobe Flex – Device agnostic from a – Larger footprint single code base (especially on iOS) – Easier than native – Android support varies by development device – Broad developer – Slower performance community – Requires AIR runtime
  • 14. Back End Architecture (CIDR)• LAMP stack: • JSON-based : – RHEL 5.8 – Economic dashboard data – Historical economic indicator – Apache 2.2.3 data – Mysql 5.0.95 – Simple format derived from – PHP 5.1.6 mobile application mockups. – Private through hash based “authentication”• Zend Framework 1.6 – Text-based, easily parse- – Simple, loosely-coupled able. component library for web – Data available as soon as applications upload process is completed on internal Census servers.
  • 15. Back End Architecture (CIDR) dashboard_data category time_slot data_type display_cell geo_level error_type
  • 16. Back End Architecture (CIDR)• JSON export of dashboard_data table
  • 17. Back End Architecture (CIDR)• Historical data available in CIDR database (display_cell table)
  • 18. Back End Architecture (CIDR)• Basic hash-key based authentication• Example URL: – http://www.census.gov/econ/currentdata/api/dashboard?id=sapient&ha sh=89704299208e7e9d16380e4384861396f3398cb0• Calculating hash: – sha1(secret key + time stamp + path requested) 1. Secret key – a 40 character alpha-numeric string 2. Time stamp – in the format YYYY-MM-DD 24HH (e.g. „2012-05-14 17‟) using UTC timestamp. 3. Path requested – excluding id and hash parameters. „/econ/currentdata/api/dashboard‟
  • 19. Back End Architecture• Skills Required • Tools Required – Dev/test environment – LAMP web dev – IDE – Enterprise-scale development experience (not for newbie‟s) – REST interface design
  • 20. Back End Architecture• Pros of Private API • Cons of Private API – Fast performance for – Additional skilled database on our server resources required – Customized to need of – Additional application to front-end developer support – Access more data than – Dependent on your public API infrastructure – Under your control
  • 21. Project Challenges• Limited insight into technical design and code at handoff (25,000+ LOC, few comments or technical docs initially)• Security framework still under development• Lack of dev/test tools & environment for mobile• Standardizing data formats from 3 API‟s (e.g. timestamps)• Timely technical support from other agencies• Coordination with external contractor (e.g. config updates)
  • 22. Lessons Learned• Early involvement with contractor on technical design• Schedule time for review and feedback at milestones• Early engagement from security to address framework• Identify and procure tools far in advance• Test external API‟s for reliability/accuracy