280 likes | 401 Views
Architecture. Architecture. Orchestration. Message box stores messages Messages have rich properties Subscriptions link messages to services Declarative correlation Content-based routing Large Message Support. Activation & Instance Management. Correlation & Content-Based Routing.
E N D
Architecture Orchestration • Message box stores messages • Messages have rich properties • Subscriptions link messages to services • Declarative correlation • Content-based routing • Large Message Support Activation & Instance Management Correlation & Content-Based Routing MESSAGE BOX Message Pipeline Decode Encode Decrypt Encrypt Auth Sign Parse Serialize Extract Props … Message Transport SOAP MSMQ HTTP MQSeries Custom Adapters
Orchestration Adapter Adapter Decrypt Parse Resolve Party Serialize Sign Encrypt Send Pipeline Receive Pipeline Message Box BizTalk Solution Flow
Hosts Host 2 (SvcAcct2) Host 3 (SvcAcct3) Host 1 (SvcAcct1) Transport Transport Decrypt Parse Resolve Party Serialize Sign Encrypt Message Box
Scalability • BizTalk 2004 System is “mostly” stateless • Routing is done in SQL Server by stored procs • As long as DB is common it’s possible to add many processing machines • Allows scale out message parsing, conversion, extraction of properties, as well as transport • Enables use of Network Load Balancing • Stateless Exceptions • Orchestration – persisted (long running transactions) • Correlation messages are routed to the correct machine • Session-based protocols (e.g., MSMQT)
Machine Machine Machine Machine Host Host Host Host Scaling Out Processor Machines Network Load Balance SQL Server Message box Stored procs Data (messages, subscriptions, etc.)
Machine Machine Machine Machine Host Host Host Host SQL Server Machine SQL Server Machine (Master) Message box Message box Stored procs Stored procs Data Data Scaling Out Storage Network Load Balance
Machine Host SQL Server Machine SQL Server Machine Message box Message box Stored procs Stored procs Data Data Storage Fail Over • Generic SQL Cluster failover support • 30-60 sec pause (!) SQL Cluster
Item Header Header Record Item Item Customer Field3 Field1 PO Field2 Status Field3 Name Field2 ItemID Qty UnitPrice Field1 Field1 Status Date Field2 PO Field3 Title PO Status Order PO Date Detail FieldA FieldB Biztalk Dev Environment Define Business Documents Schemas Orchestration Model the Business Process Pipelines Visual Studio .NET Mapping Process Messages Transform Data
public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } public static void Main(String[] args ) { String usr; FileStream f; StreamWriter w; try { usr=Environment.GetEnvironmentVariable("USERNAME"); f=new FileStream(“C:\\test.txt",FileMode.Create); w=new StreamWriter(f); w.WriteLine(usr); w.Close(); } catch (Exception e){ Console.WriteLine("Exception:"+e.ToString()); } } Item Compiler Assembly Field1 Field2 Field3 Source code Orchestration Mapping Schemas Biztalk Development DEVELOPMENT • Developer produces • Orchestrations • Pipelines • Schemas • Maps • Rules • Use abstractions for physical locations • Built into assemblies for deployment
GlobalAssemblyCache (GAC) Assembly Install Biztalk Deployment DEPLOYMENT DEVELOPMENT • Get the bits on the box • Deploy assemblies into GAC • Register with Biztalk config db • Configure the environment • Map the developer logical to the real world environment • Configure Relationships • Partners, Roles Setup Copy Browser Biztalk Config Db
Node Structure Start Length Description Delmited 0 50 UnitPrice Delmited 50 10 Quantity Delmited 60 10 TotalPrice Delmited 70 10 Delmited 80 10 ItemID Delmited 99 1 Status Supported Schema Types Schema Type Details XML • Supports native XML message types • Defined in XML Schema definition language (XSD) Flat File • Supports delimited or positional file formats • Attribute tags are used to represent values • Tag information is stored using the annotation capabilities of XSD Property • Special purpose schema type • Defines promoted property fields • Property fields can then be accessed by various BizTalk Server components
Record Date ItemID Qty UnitPrice PO Status What is a Map? • Defines the correspondence between records and fields in two different schemas Data Transformation • Perform computational and other data operations • Automatically inserts the data from one message into another during runtime Data Translation • Change the format of data between messages • Example: translate to and from a flat file and an XML file Destination Schema Source Schema Order PO Number Date Item No Quantity Order Status
Order Item Header Record PO Number Field3 Status PO Field2 Field1 ItemID Qty UnitPrice PO Status Date Date Item No Quantity Order Status Order PO Date Detail FieldA FieldB Types of Maps Mapping Operation Usage Basic • Most common type of mapping • Values simply copied from input message to output message • Supports most types of transformations and translations Complex • Records can occur multiple times for a single message (looping) • Used for variable count record mapping
demo Solution Development - 1
BizTalk Explorer • Defines the deployment topology • Integrated with Visual Studio • UI for defining physical environment • Define Send and Receive Ports • Maps logical Orchestration ports to physical locations • Maps applications to Hosts
Deployment Tools • Deployment Wizard • UI and Command Line • GACs and registers assemblies • Export config created by Explorer • Biztalk Installer • BizTalk specific VS Setup project • Auto-packages BizTalk project output • Point-n-click to add your projects • Updates MSI package with every build • Imports configuration scripts • Extensible • WMI APIs
BizTalk Orchestration • Model and execute business processes • .NET Integration • .NET based engine • Orchestration Designer Hosted in Visual Studio • Rich semantics • Long-Running Transactions and Compensation • Flexible processes through business rules • Deep Web Services Support including BPEL4WS • Custom and advanced correlation • Compose Orchestrations • Rich document normalization • Flexible binding options (Early, Late, Dynamic)
Add shapes to represent business process actions Assign or transform data between messages Define send and receive ports for messages Define orchestration variables and types Bind send and receive shapes to ports Build the orchestration and test for errors 2 3 4 5 6 7 Stages of Orchestration Development Define schemas to describe message formats 1
Orchestration Debugger Replay • What path did this message take through an Orchestration? • Replay shape for shape what happened • Follow calls into other Orchestrations • View exceptions thrown • Examine compensation code executed
Orchestration DebuggerLive • Why did the Orchestration do that? • Attach to live Orchestrations • Set Breakpoints • Watch variables as you step through • Retrieve current message contents • Resume processing to next breakpoint
demo Solution Development - 2