build consumer-facing apps with heroku connect

17
Build Consumer-Facing Apps with Heroku Connect Jeff Douglas Developer Evangelist Architect @jeffdonthemic

Upload: jeff-douglas

Post on 12-Jun-2015

7.375 views

Category:

Software


2 download

DESCRIPTION

Dreamforce 2014

TRANSCRIPT

Page 1: Build Consumer-Facing Apps with Heroku Connect

Build Consumer-Facing Apps with Heroku ConnectJeff Douglas

Developer Evangelist Architect

@jeffdonthemic

Page 2: Build Consumer-Facing Apps with Heroku Connect

Safe Harbor

Safe harbor statement under the Private Securities Litigation Reform Act of 1995:

This presentation may contain forward-looking statements that involve risks, uncertainties, and assumptions. If any such uncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differ materially from the results expressed or implied by the forward-looking statements we make. All statements other than statements of historical fact could be deemed forward-looking, including any projections of product or service availability, subscriber growth, earnings, revenues, or other financial items and any statements regarding strategies or plans of management for future operations, statements of belief, any statements concerning new, planned, or upgraded services or technology developments and customer contracts or use of our services.

 

The risks and uncertainties referred to above include – but are not limited to – risks associated with developing and delivering new functionality for our service, new products and services, our new business model, our past operating losses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breach of our security measures, the outcome of any litigation, risks associated with completed and any possible mergers and acquisitions, the immature market in which we operate, our relatively limited operating history, our ability to expand, retain, and motivate our employees and manage our growth, new releases of our service and successful customer deployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprise customers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is included in our annual report on Form 10-K for the most recent fiscal year and in our quarterly report on Form 10-Q for the most recent fiscal quarter. These documents and others containing important disclosures are available on the SEC Filings section of the Investor Information section of our Web site.

 

Any unreleased services or features referenced in this or other presentations, press releases or public statements are not currently available and may not be delivered on time or at all. Customers who purchase our services should make the purchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation and does not intend to update these forward-looking statements.

Page 3: Build Consumer-Facing Apps with Heroku Connect

Jeff DouglasDeveloper Evangelist Architect

Page 4: Build Consumer-Facing Apps with Heroku Connect

What is the Heroku Connect?

Native bi-directional data sync service between Salesforce and Heroku Postgres allowing you

to build salesforce.com-powered apps faster and easier.

Page 5: Build Consumer-Facing Apps with Heroku Connect

Makes Developers Happy!

• Knows how to build customer-facing web and mobile apps

• Familiar with Heroku, Postgres and add-ons• Uses standard open source stacks• Already knows SQL• Uses familiar tools and workflows• Doesn’t need a deep understanding of how Salesforce works

[ForceLogic]

Page 6: Build Consumer-Facing Apps with Heroku Connect

Makes Salesforce Users Happy!

• Data is happy, safe & secure in Salesforce• Ensure data integrity.• Control & maintain business processes.• Easier to find development resources.

No need to build an admin interface for the web app. Use the standard Salesforce UI & save $$! Brilliant!

Page 7: Build Consumer-Facing Apps with Heroku Connect

How does Heroku Connect work?

• Synchronizes data with standard or custom Salesforce objects• Uses LastModifiedDate to detect changes to Salesforce objects and database triggers for Postgres changes

• Only syncs modified columns• Implements “last writer win”• Does not support inflight transformations• Does not automatically detect schema changes

Page 8: Build Consumer-Facing Apps with Heroku Connect

Mapping Object & Tables

• Creates database tables & columns during setup. Uses the same names as Salesforce, except with all lower-case letters

• Each database table defines a native, unique, auto-increment integer primary key column named ‘id’

• The Salesforce Id field is renamed as ‘sfid’ in the database table

• Supports external ids for master-detail relationship mapping (see docs)

Page 9: Build Consumer-Facing Apps with Heroku Connect

Syncing Data

• Salesforce modes: Read-only & Read/Write• Utilizes SOAP, Bulk, and other batch processes to optimize inbound Salesforce records and minimize API calls.

• Sync modes:– Polling

• Every 2-60 minutes (10 minutes default)• Drops to 3 minutes when in UI

– Evented (recommended)• Uses Streaming API if available for object• Still polls every 10 minutes

Estimate 300 API calls per day per bidirectional object

Page 10: Build Consumer-Facing Apps with Heroku Connect

Logging

Page 11: Build Consumer-Facing Apps with Heroku Connect

Operating Heroku Connect

Page 12: Build Consumer-Facing Apps with Heroku Connect

Examples in the Wild

Page 13: Build Consumer-Facing Apps with Heroku Connect

More Heroku Postgres Awesomeness

Fork databases for faster development

Create follower database for reporting or external access

Share SQL results with Dataclips

Page 14: Build Consumer-Facing Apps with Heroku Connect

Demo (Short)

Page 15: Build Consumer-Facing Apps with Heroku Connect

Best Practices

• Update mappings when you delete fields from Salesforce.• Be careful when creating validation rules or required fields as inserts may fail.• Connect to your org with a user with “View All Data” permissions or a SysAdmin user if possible.

• Watch your API consumption for hungry tables. Dial-down sync time if possible.• No record level permissions in Postgres so your app must implement them if necessary.

• If Heroku Connect stop syncing, try Restarting before reloading the object. • No support for image or file sync so store them in S3 and sync the URL.• Write to Postgres and Salesforce when real-time update necessary

Page 16: Build Consumer-Facing Apps with Heroku Connect

Questions?

Page 17: Build Consumer-Facing Apps with Heroku Connect