Monday, February 18, 2008

Peeping Inside BizTalk

 

Developers can easily develop Interfaces using BizTalk. On the Stage the BizTalk Show looks cool but have you thought about who writes the Scripts in background. Its only Drag and Drop for developers and once the solution is deployed and it's up to be tested. At times one must have thought what happens when I drop a message, where it goes and how the whole mechanism works. Just go through the artifacts below ….its worth having a look and I bet you would say…."Hey I dint knew this at all".

Message

1.      Information about the promoted properties is extracted and stored in the bts_documentSpec table in the Management database.

2.      Items that are marked with PropertyField annotations in your message schema will lead to the pipeline disassembler putting a Promoted property in the context. Items that are marked with DistinguishedField annotations in your message schema will lead to the pipeline disassembler putting a Written property into the context.

3.      One of the benefits of promoted properties is that the value of the element that is promoted is available in the context of the message. This means that retrieving that value is inexpensive, as it does not require loading the message into memory to execute an XPath statement on the message. Instead, a simple property bag can be used along with a key to get the value.

4.      Writing a value into the context with the same name and namespace that were used previously to promote the property causes that property to no longer be promoted. The write essentially overwrites the promotion.


Suscriptions:-Instance, Activation

1.      An activation subscription is one specifying that a message that fulfills the subscription should activate, or create, a new instance of the subscriber when it is received. Examples of things that create activation subscriptions include send ports with filters or send ports that are bound to orchestrations, and orchestration receive shapes that have their Activate property set to true. An instance subscription indicates that messages that fulfill the subscription should be routed to an already-running instance of the subscriber. Examples of things that create instance subscriptions are orchestrations with correlated receives and request/response-style receive ports waiting  for a response from BizTalk Server.
 
2.      The difference between the two types of subscription at the information level is that an instance subscription includes the unique instance ID, stored in the subscription table in the master MessageBox database. When an  orchestration instance or receive port completes processing, instance subscriptions are removed from the MessageBox while activation subscriptions remain active as long as the orchestration or send port is enlisted

 
ReceiveSubscription
 
 
Picture above shows what Biztalk actually does when a message comes in or is going out.We dont see it in Biztalk architecture diagram.


What Adapter does with the Message

1.      The adapter creates a message (an implementation of the Microsoft.BizTalk.Message.Interop.IBaseMessage interface), adds a part to it (an implementation of the Microsoft.BizTalk.Message.Interop.IBasePart interface), and provides the  stream of data as the part content, the adapter writes and promotes into the message context properties related to the location, adapter type, and others related to the adapter. After the message and its context have been created, the adapter passes the message to the Endpoint Manager. The message is then processed through the receive pipeline, which has been configured for the receive location. After the message has been processed by the pipeline, a map may  be used to transform the message into the format desired before the Endpoint Manager publishes the message with the  Message Agent.
 

Out of Memory Problems: Why?

1.      Routing only If BizTalk Server is only used only for routing messages based upon promoted message properties, then  the message is streamed into the Messagebox database using the .NET XmlReader interface, and message parts are not  individually loaded into memory. In this scenario, out of memory errors are not an issue and the primary  consideration is the amount of time that is required to write very large messages (over 100 MB) into the Messagebox  database.The BizTalk Server development team has successfully tested the processing of messages up to 1 GB in size   when performing routing only.


2.       Mapping Transforming a document with a map is a memory-intensive operation. When a document is transformed by a map, BizTalk Server passes the message stream to the .Net XslTransform class, which then loads the document into a .NET  XPathDocument object for processing. Loading the document into the .NET XPathDocument can potentially expand the original file size in memory by a factor of 10 or more. This expansion may be more pronounced when mapping flat files because flat files must be parsed into XML before they can be transformed.


Solution:-

1.       Adjust the message size threshold above which documents are buffered to the file system during mapping. To modify the size threshold, create a DWORD value named TransformThreshold at the following location in the BizTalk Server  registry:

        HKLM\Software\Microsoft\BizTalk Server\3.0\Administration\TransformThreshold

        After you have created this value, enter a decimal value with the number of bytes to set the new threshold to. For  example, enter a decimal value of 2097152 to increase the message size threshold to 2 MB (from the default of 1 MB). Increase this value on systems with a large amount of available memory to improve throughput. Buffering documents to disk conserves memory at a slight cost to overall throughput.

All Inputs above are Courtesy to Microsoft.

Monday, February 4, 2008

one hour interview on CNBC with Warren Buffet last year

``Wall Street likes to characterize the proliferation of frenzied financial games as a sophisticated, prosocial activity, facilitating the fine-tuning of a complex economy. But the truth is otherwise: Short-term transactions frequently act as an invisible foot, kicking society in the shins." - Warren Buffett

I'd like to thank my pal Raul Policarpio for passing on to me this very interesting subject, a summary of the life of the world's second richest man....

There was a one hour interview on CNBC with Warren Buffet, the second richest man who has donated $31 billion to charity. Here are some very interesting aspects of his life:

1) He bought his first share at age 11 and he now regrets that he started too late!

2) He bought a small farm at age 14 with savings from delivering newspapers.

3) He still lives in the same small 3 bedroom house in mid-town Omaha, that he bought after he got married 50 years ago. He says that he has everything he needs in that house. His house does not have a wall or a fence.

4) He drives his own car everywhere and does not have a driver or security people around him.

5) He never travels by private jet, although he owns the world's largest private jet company.

6) His company, Berkshire Hathaway, owns 63 companies. He writes only one letter each year to the CEOs of these companies, giving them goals for the year. He never holds meetings or calls them on a regular basis.

7) He has given his CEO's only two rules. Rule number 1: do not lose any of your share holder's money. Rule number 2: Do not forget rule number 1.

8) He does not socialize with the high society crowd. His past time after he gets home is to make himself some pop corn and watch television.

9) Bill Gates, the world's richest man met him for the first time only 5 years ago. Bill Gates did not think he had anything in common with Warren Buffet. So he had scheduled his meeting only for half hour. But when Gates met him, the meeting lasted for ten hours and Bill Gates became a devotee of Warren Buffett.

10) Warren Buffet does not carry a cell phone, nor has a computer on his desk.

11) His advice to young people: Stay away from credit cards and invest in yourself.

***

While I do not know about the authenticity of this article I would like to share my insights on this interview:

1. My icon shows of a regimented way of living which reflects on his investing philosophy.

2. His aversion to credit cards is a sign of discipline. Why pay for the financing charges on unproductive expenditures?

3. While he may not be as sociable by way of avoiding the high society crowd, his contribution to the investing world, his invaluable shared insights makes him one of the world's well respected and greatly admired persons.

In 2006, a lunch date auction with Mr. Buffett for charity purposes raised US $620,000. In other words, one person shelled out US $620,000 (€341,000) just to have lunch with him! Would anyone pay for the same amount to have lunch with any of the other members of the "high society" crowd?

Further as stated above, Bill Gates became a devotee or protégé of Warren Buffett, to the point that Mr. Gates is now a board of director in Mr. Buffett's flagship Berkshire Hathaway and a beneficiary of Mr. Buffett's $37 billion donation to the Gates Foundation.

Could it be that winning the respect of the world's richest man is considerably worth more than that of the "high society crowd"?

4. It is the embodiment of Humility at its finest!

5. Mr. Buffett loves Coke [drinks five cherry cokes a day (!) according to CNN], his Berkshire Hathaway is Coke's second largest shareholder according to fundinguniverse.com!

6. Mr. Buffett loves to play Poker [so does Mr. Gates]! The Billionaire recently went BROKE in a Texas charity tournament last December, according to MSNBC.

Do you have what it takes to emulate Mr. Buffett? I don't.