Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Extending D365 with Azure

594 views

Published on

Explore how Microsoft Azure can be used in extending your Dynamics 365 instances to support a rich set of business processes. We’ll compare options for building extensions such as a Service Bus, Worker Roles, Azure Functions and Microsoft Azure Logic Apps

Published in: Software
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y3nhqquc } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ➤➤ How Long Does She Want You to Last? Here's the link to the FREE report  http://ishbv.com/rockhardx/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • ★★ How Long Does She Want You to Last? ★★ A recent study proved that the average man lasts just 2-5 minutes in bed (during intercourse). The study also showed that many women need at least 7-10 minutes of intercourse to reach "The Big O" - and, worse still... 30% of women never get there during intercourse. Clearly, most men are NOT fulfilling there women's needs in bed. Now, as I've said many times - how long you can last is no guarantee of being a GREAT LOVER. But, not being able to last 20, 30 minutes or more, is definitely a sign that you're not going to "set your woman's world on fire" between the sheets. Question is: "What can you do to last longer?" Well, one of the best recommendations I can give you today is to read THIS report. In it, you'll discover a detailed guide to an Ancient Taoist Thrusting Technique that can help any man to last much longer in bed. I can vouch 100% for the technique because my husband has been using it for years :) Here's the link to the report ■■■ http://ishbv.com/rockhardx/pdf
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Hello! Get Your Professional Job-Winning Resume Here - Check our website! https://vk.cc/818RFv
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Extending D365 with Azure

  1. 1. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 112/20/2017 Nelson Johnson Extending CRM with Azure www.broadpoint.net 1 Extending the Dynamics 365 World With Microsoft Azure By Nelson Johnson Solution Architect BroadPoint Technologies
  2. 2. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 2 Target Audience • Interest in Cloud Architecture • IT Managers • Developers • System Architect • Azure curious • On-prem CRM and considering moving to Dynamics 365 (D365) • Direct integration with SQL • Dealing with D365 Limitations
  3. 3. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 3 Introduction Reasons to extend D365 to Azure High level concepts Services that fit your needs Choices in Azure Architecture Share our Best Practices
  4. 4. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 4 Who is Nelson Johnson? • Started programming 1977…in high school…on a mainframe • Became full time software consultant in 1982 • BS in MIS and Decision Science from George Mason University • Worked at DARPA creating web apps in 1996 • Working with CRM since version 3 • Solution Architect for BroadPoint Technologies, LLC • Email: njohnson@broadpoint.net
  5. 5. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 5 Why would you want to extend D365 to Azure? • Inconsistent workload demands • Consolidate business logic • Scheduled jobs are not easily managed within D365 • SQL stored procedures are not an option • Limitations of FetchXML, Rollup fields • Offload processing • Plugins, workflows, and API in D365 have a timeout limit of 2 minutes • Chain of plugins or workflows are getting too long • Need to create or update a large number of records • Waiting for external services to respond • SQL timeout
  6. 6. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 6 Introduction Reasons to extend D365 to Azure High level concepts Services that fit your needs Choices in Azure Architecture Share our Best Practices
  7. 7. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 7 Tools for extending to Azure • Integration • Endpoint Config in D365 • Service Bus / REST API • Scheduled Tasks • Storage • SQL Server Replication • Azure Cosmos DB • Azure Tables • Compute • Azure Functions • Azure Web Jobs • Azure Service Fabric • Azure Worker Role • Logic Apps • Worker Roles (see Best Practices) • Service Plan • Controls CPU, Memory
  8. 8. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 8 What is Service Bus? • A first-in-first-out message queue • Separates events from actions • Enforces decoupled architecture • Increases options for re-usuable business logic • Lock & complete • High availability • Scalable • Nearly free • Handles failures Source: https://docs.microsoft.com/en-us/azure/service-bus- messaging/service-bus-java-how-to-use-topics-subscriptions
  9. 9. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 9 How does D365 integrate with Azure? Register Step Create EventServiceBus Entity Endpoint Endpoint ServiceBus ServiceBus Manager Batch Workflow Register Step Create EventServiceBus Entity Endpoint Dues Billing Workflow LOB Service Configure with Plugin Registration Create using Azure UIConfig with CRM Solution Your code Service Fabric WebJobs Functions
  10. 10. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 10 Service Bus vs Webhooks (D365 CE 9) • Service bus is always up – Web hooks only work when the service is working • SB has low latency • SB can ingest 1000’s of messages per second • 1000 concurrent connections • Publish/subscribe supports a decoupled architecture
  11. 11. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 11 How do you connect an entity to the Service bus? • Plugin Registration Tool – no code needed! • Endpoint • Step DeveloperSidebar
  12. 12. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 12 Introduction Reasons to extend D365 to Azure High level concepts Services that fit your needs Choices in Azure Architecture Share our Best Practices Service Fabric, WebJobs, Functions, Logic Apps
  13. 13. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 13 How low will you go? Source: https://blogs.technet.microsoft.com/kevinremde/2011/04/03/saas-paas-and-iaas-oh-my-cloudy-april-part-3/
  14. 14. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 14 Azure Compute • Light – Azure Functions, Logic Apps • Mid-size – Azure Webjobs • Heavy – Service Fabric
  15. 15. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 15 Azure Functions Pros Cons Deployment Consumption plan – ideal for intermittent services Dynamic Scaling More triggers than WebJobs Integration with more services than WebJobs Complements Azure Logic Apps Control – what is that? Up to 10 minute Timeout unless you pay for a service plan Local Dev and Debug Version Control Deploy directly from VS Continuous Integration/deployment
  16. 16. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 16 Logic Apps Pros Cons Deployment Can schedule jobs Can query and update D365 data Can interface with Service Bus Can connect to over 165 other services Configuration through JSON – no code Price based on # of executions “Server-less” Weekly Updates No code – anything more than simple tasks requires a Function UI to develop is inside Azure – not easy to figure out Documentation is sparse Programing skill level Limited triggers: Min trigger schedule 15 seconds 60 seconds Version control built in to web UI Visual Studio – Publish ARM template deployment
  17. 17. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 17 Azure App Service WebJobs Pros Cons Deployment PaaS – Managed VM, High availability Multiple apps on single service plan Easier (than SF) for developer to start developing apps Can run continuously or triggered Scales with App Service plan – setup manually You pay for it while it is deployed Timeout limit No remote desktop Local Dev and Debug Version Control Deploy directly from VS Continuous Integration/deployment
  18. 18. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 18 Azure Service Fabric Pros Cons Deployment Best for Microservices Control over how workloads are run Load-balancing, scaling, failover, replication, stateful VM Scale Sets in clusters Self-hostable Fault Analysis Service Learning curve Code changes will be necessary to forklift code. Re-architect is better approach. Expensive initially because a production system uses 5 VM’s - Value increases as you add more services No remote debugging Local Dev and Debug Deploy directly from VS PowerShell and CLI deployment Deploy many services at one time
  19. 19. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 19 Wrap up - Which one is best? • Azure Functions • Just getting started and want to experiment • Specialized integration • Extending Azure Logic Apps • Azure Logic Apps • Glue for mashups • Azure WebJobs • Already have a website and want to piggy-back on that service plan • Credit card processing • Azure Service Fabric • Re-architecting a legacy environment • Require high level of control and resilience
  20. 20. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 20 Introduction Reasons to extend D365 to Azure High level concepts Services that fit your needs Azure Architecture Share our Best Practices Microservice
  21. 21. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 21 Design Considerations • Must read: Azure Architecture Center(https://docs.microsoft.com/en-us/azure/architecture/) • Application Architecture Guide • Reference Architectures • Cloud Design Patterns (32 of them) • Best Practices • Performance Antipatterns • Design Checklists
  22. 22. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 22 Microservice Architecture Design Patterns Increase the velocity of application releases by decomposing the application into small autonomous services that can be deployed independently Source: https://azure.microsoft.com/en-us/blog/design-patterns-for-microservices/ D365
  23. 23. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 23 BASE - Design Patterns for Eventual Consistency • Use Event Sourcing and CQRS Pattern • Data Consistency • Decouple recording the transaction from updating • Reconciliation between services is easier • Retry Pattern • Best for transient faults like timeouts • Service Bus provides this (to a degree) • Idempotent methods • Same result if called multiple times
  24. 24. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 24 Potential for Inconsistent Data • Two transactions are created to update the same account • They both get the starting balance • They both are adding a different amount to the balance • Last one “wins” Competing Updates Process 1 CRM Process 2 Time Fetch Current Balance Calculate new Balance Update Balance Fetch Current Balance Calculate new Balance Update Balance Balance=100 Balance=110 $10 transaction $20 transaction Balance=120
  25. 25. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 25 Event Sourcing and CQRS to the rescue! • Two transactions are created to update the same account • They both append their update to a journal • They both send a message to another process to update the balance • The balance is calculated twice, but it is accurate Decoupled Updates Process 1 CRM Process 2 Process 3 Time Write transaction to journal Update Balance Event Update Balance Write transaction to journal Update Balance Event Update Balance Balance=100 Balance=130 $10 transaction $20 transaction Balance=130 Journal=100 Journal=10 Journal=20
  26. 26. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 26 Plan for Failure! • Compensating transaction Pattern • Un-do in reverse order • Create Exception entity to manage resolution • Provide a view of exceptions in the dashboard • Provide error with steps to resolve it Source: https://docs.microsoft.com/en- us/azure/architecture/patterns/compensating-transaction
  27. 27. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 27 Introduction Reasons to extend D365 to Azure High level concepts Services that fit your needs Azure Architecture Share our Best Practices
  28. 28. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 28 Cloud Service Lessons Learned • “Classic” service – not part of ARM deployments • It was an easy starting point • No timeouts or code size limits • You should employ Async Tasks • Doesn’t run under CSP license • Runs all the time like a VM • No options to use KeyVault • No options for dynamic configuration of Web.config/App.config
  29. 29. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 29 Best Practices • Test Location and latency • Check which datacenter your CRM instances is located https://<instance>.crm.dynamics.com/home/home_debug.aspx Server Name First Two Letters Region BL East US BN North Central US BY West US
  30. 30. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 30 Best Practices • Time Zone • Integration account in customers timezone • Work with localized datetime fields using UTC • Service Plan • Stress test with the smallest one and work up • Azure Resource Manager • Group by Resource (compute, service plan, storage, service bus) • Tags: Owner, Environment, LoB Function(s), Tier, Project • Test Driven Development • Minimize “chatter” using API Transactions, ExecuteMultiple • Monitor your usage
  31. 31. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 31 Best Practices • Do not include the Service Endpoints in the D365 Solution file that gets promoted to production • Have your subscribing service validate that the message is coming from the right domain • SB message has the sending domain – compare it to the D365 connection • Use one service bus “namespace” per D365 instance • Configure to use many queues or topics • Use a non-interactive account in D365 • Reduce license cost
  32. 32. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 32 Use EntityCollection() for Transactions • EntityCollection() • Relationship() • EntityCollection Entities.Add() • <entity>.RelatedEntities.Add() (early bound) • Create(<entity>) DeveloperSidebar
  33. 33. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 33 Transaction code sample Code Description Guid duesHeaderId = Guid.NewGuid(); Create a new ID so that we can create a reference in each detail record EntityCollection duesHeaderDetailCollection = new EntityCollection(); Create a collection that will hold all the child records Relationship duesHeaderDetailRelationship = new Relationship("bpt_bpt_duesheader_bpt_duesdetail"); Define the relationship that links the entities together duesHeader.bpt_DuesHeaderId = duesHeaderId; Assign the PK of the header record duesHeader.bpt_MemberId = Contact.ToEntityReference(); Assign some values to the header - this is the member Xrm.bpt_duesdetail duesDetail = new Xrm.bpt_duesdetail(); Create an instance of the child entity record duesDetail.bpt_DuesBillId = new CrmEntityReference( Xrm.bpt_DuesHeader.EntityLogicalName, duesHeaderId); Populate the entityreference from the child back to the parent record duesHeaderDetailCollection.Entities.Add(duesDetail); Add the child record to the parent duesHeader.RelatedEntities.Add(duesHeaderDetailRelationship, duesHeaderDetailCollection); Complete the relationship by adding the child collection to the parent entity service.Create(duesHeader); Call the service to create both records at the same time DeveloperSidebar
  34. 34. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 34 Resources: • Platform feature comparison: https://docs.microsoft.com/en-us/azure/app-service/choose- web-site-cloud-service-vm • Azure Architecture: https://docs.microsoft.com/en-us/azure/architecture/ • Azure Functions Tools for Visual Studio: https://docs.microsoft.com/en-us/azure/azure- functions/functions-develop-vs • Write and test functions locally: https://blogs.msdn.microsoft.com/webdev/2016/12/01/visual-studio-tools-for-azure-functions/ • Azure Functions forum: https://social.msdn.microsoft.com/Forums/azure/en- US/home?forum=AzureFunctions&filter=alltypes&sort=firstpostdesc • Continuous Deployment: https://docs.microsoft.com/en-us/azure/azure-functions/functions- continuous-deployment • Subscription Governance: https://docs.microsoft.com/en-us/azure/azure-resource- manager/resource-manager-subscription-governance
  35. 35. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 35 Resources (cont): • Design Patterns for Microservices: https://azure.microsoft.com/en-us/blog/design- patterns-for-microservices/ • WebJobs Extensible Triggers: https://azure.microsoft.com/en-us/blog/extensible-triggers- and-binders-with-azure-webjobs-sdk-1-1-0-alpha1/
  36. 36. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 36www.broadpoint.net Q&A
  37. 37. 12/20/2017 Nelson Johnson Extending D365 with Azure www.broadpoint.net 37www.broadpoint.net Thank You! Nelson Johnson njohnson@broadpoint.net 301-634-2442

×