Architecting a Social Enterprise Application

791
-1

Published on

How do you architect a Social Enterprise application? What are some of the unique considerations when designing a cloud application versus a traditional on-premise application? What are some of the unique use cases, design patterns, and best practices when developing on a cloud platform (like Force.com) and database (like Database.com)? This session will answer these questions and help you architect the next killer cloud app.

Published in: Business, Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
791
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
36
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Architecting a Social Enterprise Application

  1. 1. Architecting a Social EnterpriseApplicationDevelopers TrackRob Woollen, CTO Platform, salesforce.comGlenn Weinstein, CTO, Appirio
  2. 2. Safe HarborSafe 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 suchuncertainties materialize or if any of the assumptions proves incorrect, the results of salesforce.com, inc. could differmaterially from the results expressed or implied by the forward-looking statements we make. All statements other thanstatements 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 ofmanagement for future operations, statements of belief, any statements concerning new, planned, or upgraded servicesor 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 anddelivering new functionality for our service, new products and services, our new business model, our past operatinglosses, possible fluctuations in our operating results and rate of growth, interruptions or delays in our Web hosting, breachof our security measures, the outcome of intellectual property and other litigation, risks associated with possible mergersand 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 customerdeployment, our limited history reselling non-salesforce.com products, and utilization and selling to larger enterprisecustomers. Further information on potential factors that could affect the financial results of salesforce.com, inc. is includedin our annual report on Form 10-Q for the most recent fiscal quarter ended July 31, 2011. This documents and otherscontaining important disclosures are available on the SEC Filings section of the Investor Information section of our Website.Any unreleased services or features referenced in this or other presentations, press releases or public statements are notcurrently available and may not be delivered on time or at all. Customers who purchase our services should make thepurchase decisions based upon features that are currently available. Salesforce.com, inc. assumes no obligation anddoes not intend to update these forward-looking statements.
  3. 3. Agenda  What is a “social enterprise application?”  Development themes – mobile  Development themes – social  Development themes – optimized  Force.com data services  Force.com realtime applications  Force.com optimizations
  4. 4. Glenn Weinstein CTO, Appirio
  5. 5. What is a “Social Enterprise Application?” Architecture must account for MOBILE mobile as primary UI device Taking maximum advantage SOCIAL when “social”-izing apps Accessing ever-larger cloud- OPTIMIZED based data sources
  6. 6. Development Trends - Mobile
  7. 7. The New Architecture for Mobile Apps • Complex processing1980s: Desktop • Rich user experienceapps • Connectivity not required • Examples: MSFT Office, Adobe Photoshop • Desktop apps paired with a server1990s: Client-server • Complex local architectures • Examples: SAP, Oracle Apps • Browser as universal HTML client2000s: Web and • Rich UI and media; server does most logicRIAs • Examples: Web editions of enterprise software • Maximize use of local CPU2011+: Mobile • Minimize need for data throughput • Examples: Database.com
  8. 8. The New Architecture for Mobile Apps • Complex processing1980s: Desktop • Rich user experienceapps • Connectivity not required • Examples: MSFT Office, Adobe Photoshop • Desktop apps paired with a server1990s: Client-server • Complex local architectures • Examples: SAP, Oracle Apps • Browser as universal HTML client2000s: Web and • Rich UI and media; server does most logicRIAs • Examples: Web editions of enterprise software • Maximize use of local CPU2011+: Mobile • Minimize need for data throughput • Examples: Database.com
  9. 9. The New Mobile Architecture Requires aDifferent Approach App Server
  10. 10. The New Mobile Architecture Requires aDifferent Approach
  11. 11. The New Mobile Architecture Requires aDifferent Approach SOAP? REST?HTML5?Native (iOS, Android)?
  12. 12. The New Mobile Architecture Requires aDifferent Approach SOAP? REST?HTML5?Native (iOS, Android)? Key Themes Native > generic Multi-tenant > single-tenant Coarse-grained > fine- grained
  13. 13. Development Trends - Social
  14. 14. Does Your App Have Social Graces? Phase 1: “Socially Enabled” Chatter feed on business objects
  15. 15. Does Your App Have Social Graces? Phase 1: “Socially Enabled” Chatter feed on business objectsWhere should users look forthe narrative? • Record History • Notes & Attachments • Activity History • Chatter Feed • All of the above?Considerations • “Force” feed • Drop followers at close
  16. 16. Does Your App Have Social Graces? Phase 2: “Socially Witty” Have something interesting to say
  17. 17. Does Your App Have Social Graces? Phase 2: “Socially Witty” Have something interesting to sayConsiderations • Give your app a distinctive “voice” • Go beyond basic field changes
  18. 18. Does Your App Have Social Graces? Phase 3: “Socially Aware” Phones use geolocation…
  19. 19. Does Your App Have Social Graces? Phase 3: “Socially Aware” Phones use geolocation… …Chatter-enabled apps can use “social graph location” My Groups Who I’m Following What I’m Following
  20. 20. Development Trends - Optimized
  21. 21. Mobile and Social Apps Produce More Data! Business records change slowly
  22. 22. Mobile and Social Apps Produce More Data! Business records change slowly Chatter changes quickly
  23. 23. Mobile and Social Apps Produce More Data! Business records change slowly Chatter changes quickly  Larger volumes  Broader variety  Higher velocity  More business value
  24. 24. Mobile and Social Apps Produce More Data! Business records change slowly Chatter changes quickly  Larger volumes  Security optimizations  Broader variety  REST services  Higher velocity  Bulk data handling  More business value
  25. 25. Rob Woollen CTO, Platform salesforce.com @rwoollen
  26. 26. Cloud2 Data Services
  27. 27. Securing Cloud Data  Database.com provides a rich, row-level security model – Powering our CRM application for 10+ years – Separates the administration of security rules from application development  Query / Search natively support security model – Inaccessible records are automatically filtered out  Multi-Tenant Query Optimizer ensures security handled efficiently
  28. 28. Multi-tenant Query Optimizer GoShared Shared Run pre-Visibility Indexes queries User # of rows ID Data 1 Data 2 ID Data 1 Data 2 Check user = Visibility that the user Visibility 10002 unus erat toto naturae 10002 unus erat toto naturae 10003 vultus in orbe 10003 vultus in orbe 10004 quem dixere chaeos 10004 quem dixere chaeos 10005 10006 rudis meis indigestaque perpetuum 10005 10006 rudis meis indigestaque perpetuum can access Check filter 10007 deducite temopra 10007 deducite temopra 10008 carmen ante 10008 carmen ante 10009 mare et terras 10009 mare et terras selectivity 10010 tegit et quod 10010 tegit et quod 10011 omnia caelum 10011 omnia caelum 10012 unus erat totonaturae 10012 unus erat totonaturae Multi-tenant 10013 vultus in orbe 10013 vultus in orbe 10014 quem dixere chaeos 10014 quem dixere chaeos 10015 rudis indigestaque 10015 rudis indigestaque Filter How specific 10016 meis perpetuum 10016 meis perpetuum = 10017 deducite temopra 10017 deducite temopra 10018 10019 10020 10021 carmen mare tegit omnia ante et terras et quod caelum 10018 10019 10020 10021 carmen mare tegit omnia ante et terras et quod caelum Optimizer Write query- Selectivity is this filter? 10022 10023 10024 10025 unus erat vultus quem dixere rudis toto naturae in orbe chaeos indigestaque 10022 10023 10024 10025 unus erat vultus quem dixere rudis toto naturae in orbe chaeos indigestaque Statistics based on results of pre- 10026 meis perpetuum 10026 meis perpetuum 10027 deducite temopra 10027 deducite temopra 10028 carmen ante 10028 carmen ante 10029 mare et terras queries 10029 mare et terras 10030 tegit et quod 10030 tegit et quod 10031 omnia caelum 10031 omnia caelum 10032 unus erat toto naturae 10032 unus erat toto naturae 10033 vultus in orbe 10033 vultus in orbe Execute query Stop
  29. 29. Apex REST (Pilot)  APEX Web Services exposed via REST – Allow for custom built web services to be exposed by customers and partners using REST architecture – Well suited for Mobile and Cloud applications  Annotation in the APEX class: – @RestResource , @HttpGet, @HttpPost, @HttpPatch, @HttpDelete  Support XML and JSON formats
  30. 30. Apex Rest (Pilot)@RestResource(urlMapping=/CaseManagement/*)global with sharing class CaseManagementRESTSvc { @HttpGet global static Case getCaseRecord(RestRequest req, RestResponse res) { String caseNum = req.requestURI.substring(req.requestURI.lastIndexOf(/)+1); Case c = [select id, CaseNumber from Case where caseNumber = :caseNum]; return c; } @HttpPost global static Case createCaseRecord(RestRequest req, RestResponse res) { CompositeCaseRecord compositeCaseRec = new CompositeCaseRecord(); Case c = CreateCustomCaseRecord.createCase(compositeCaseRec); return c; } @HttpDelete global static void deleteCaseRecord(RestRequest req, RestResponse res) { String caseNum = req.requestURI.substring(req.requestURI.lastIndexOf(/)+1); Case c = [select id, CaseNumber from Case where caseNumber = :caseNum]; delete c; }}
  31. 31. Apex Rest (Pilot)public with sharing class CreateCustomCaseRecord { public static Case createCase( CompositeCaseRecord caseRecord ) { Savepoint sp = Database.setSavepoint(); try { Case c = new Case(); c.Status = New; Account a = new Account (Backend_Acct_Number__c = caseRecord.acctNumber); c.Account = a; insert c; c = [select id, CaseNumber, subject, Description, Priority from Case where id=:c.Id]; Labor__c labor = new Labor__c(); labor.Case__c = c.id; labor.Rate__c = caseRecord.labor_rate; insert labor; return c; }catch (Exception e) { Database.rollback(sp); throw e; } }} FAQ: http://blog.sforce.com/sforce/2011/05/apex-rest-services-in-summer-11.html
  32. 32. Real-time Cloud Apps
  33. 33. Streaming API (Pilot)  Provide a stream of updates based on data changes – Admin define topics via continuous queries – System runs queries based on a Topic – Relevance matching kicks in and fetch updates – Clients subscribe to Topics and listen for updates  Use Cases includes: – Near real time updates: Call Centers, Financial Apps, Calendar – Data synchronization – immediate updates – General purpose notifications upon saves and deletes – Push notifications to mobile devices
  34. 34. Streaming API - Logical Flow Data Changes Processing Updates NotificationsSalesforce.com Account App Server 1. Relevance Checks Contacts Manage 2. Push Notification Processor Leads Subscriptions 3. Event Dispatch Opportunities Send 4. Query, CRUD, FLS SharingCustom Objects Updates
  35. 35. Optimizing Cloud Applications Large Data Volumes
  36. 36. Bulk API Query  Allow for data to be retrieved via SOQL query – Up to 10 files of 1Gb each file – total of 10Gb – Query can run for up to 10 attempts, at 10 minutes each – Results are kept for 7 days in system – Supports XML and CVS formats – View results on Monitoring Page  Allow for full LDV lifecycle of data in/out of Salesforce
  37. 37. Scaling Apex Triggers  Basic Trigger Architecture (Bulkification) – Preprocessing • Query needed rows • Arrange into data structures – “The Main For-Loop” • Use a main for loop to ensure that no records are left behind • Avoid queries and DML operations within for loops – Clean up and final steps • DML operations • Emails/Notifications
  38. 38. Asynchronous Processing vs. NOW LATER Move processing that is large or not immediately needed by the user to async • Avoid limits • Better usability • Higher through-put
  39. 39. Scaling to Large Data  Asynchronous Apex – @Future methods • Lightweight • Easy to use (simple method annotation) • Great for smaller transactions – Batch Apex • Heavy duty (interface to implement) • Can process up to 50M rows
  40. 40. But wait, the DevZone has more!Hackathon Check out the Finale, Thurs, 2:30pmOpen Source Lab Discover new & interesting open projectsLightning Forum Drop in for a quick blast of knowledgeTech Demos See and learn the latest from the expertsCode Consultations Sign up for 1:1 sessions at the Welcome Desk @forcedotcom
  41. 41. How Could Dreamforce Be Even Better? Tell Us! Every session survey you submit is a chance to win an iPad 2! Watch your inbox at the end of each day for an email from our survey partner, Alliance Tech. Click on the personalized link to be directed to the survey page for the sessions you attended.
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×