Gokul's Blog


Leave a comment

Working with XMLTextReader

Some good articles from MSDN on how to work with XMLTextReader. The below block of code can be used to iterate through the list of book in a XML list of books.

XmlTextReader reader = new XmlTextReader(@"C:\books.xml");

            XmlDocument doc;
            reader.MoveToContent();
            while (reader.Read())
            {
                Application.DoEvents();
                //if (reader.MoveToContent() == XmlNodeType.Element
                 // && reader.Name == "ns0:book")
                if (reader.Name == "ns0:book")
                {
                    doc = new System.Xml.XmlDocument();
                        XmlNode node = doc.ReadNode(reader);
                        txtStatus.Text = txtStatus.Text + node.OuterXml.ToString()
                                        + Environment.NewLine
                                         + "---Processed Node No:"
                                         + i++ + "---" + Environment.NewLine;
                   doc = null;
                }

.csharpcode, .csharpcode pre
{
font-size: small;
color: black;
font-family: consolas, “Courier New”, courier, monospace;
background-color: #ffffff;
/*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt
{
background-color: #f4f4f4;
width: 100%;
margin: 0em;
}
.csharpcode .lnum { color: #606060; }


Leave a comment

BizTalk Jobs and BizTalk Databases

MessageBox_DeadProcesses_Cleanup_BizTalkMsgBoxDb
MessageBox_Message_Cleanup_BizTalkMsgBoxDb
MessageBox_Parts_Cleanup_BizTalkMsgBoxDb
PurgeSubscriptionsJob_BizTalkMsgBoxDb

 

Handling the growing size of BizTalk database’s log db

http://social.msdn.microsoft.com/forums/en-US/sqldisasterrecovery/thread/d3db3a47-3a4f-4ddb-b2e8-4d5a643d8476/

BizTalk Message Viewer


Leave a comment

BizTalk Pipeline Components

Advantage of using XmlTextReader over XmlDocument
http://msdn.microsoft.com/en-us/library/cc615058(BTS.10).aspx

If you need to read the inbound message inside a pipeline component, avoid loading the entire document into memory using an XmlDocument object. The amount of space required by an instance of the XmlDocument class to load and create an in-memory representation of a XML document is up to 10 times the actual message size. In order to read a message, you should use an XmlTextReader object along with an instance of the following classes:

  • VirtualStream (Microsoft.BizTalk.Streaming.dll) – The code for this class is located in two locations under the Pipelines SDK as follows: SDK\Samples\Pipelines\ArbitraryXPathPropertyHandler and SDK\Samples\Pipelines\SchemaResolverComponent\SchemaResolverFlatFileDasm.
  • ReadOnlySeekableStream (Microsoft.BizTalk.Streaming.dll).
  • SeekAbleReadOnlyStream – The source code for this class is located in two locations under the Pipelines SDK as follows: SDK\Samples\Pipelines\ArbitraryXPathPropertyHandler and SDK\Samples\Pipelines\SchemaResolverComponent\SchemaResolverFlatFileDasm.


Leave a comment

One day with Mongo DB

Interesting Reads to start with

http://ayende.com/Blog/archive/2010/05/04/document-databases-are-not-relational.aspx
http://ayende.com/Blog/archive/2010/05/14/that-no-sql-thing-column-family-databases.aspx
http://blog.wekeroad.com/2010/03/04/using-mongo-with-linq

Good read: http://codebetter.com/blogs/karlseguin/archive/2010/03/29/nosql-for-the-rest-of-us.aspx

Start Working with Mongo & .Net

http://www.mongodb.org/#
http://highoncoding.com/Articles/686_Implementing_Blog_Using_ASP_NET_MVC_and_MongoDb.aspx
http://blog.wekeroad.com/2010/03/04/using-mongo-with-linq
http://www.emphess.net/2010/05/05/the-object-document-mismatch-mongodb-and-db4o-with-linq/
http://www.michaelckennedy.net/blog/2010/04/22/TheNoSQLMovementLINQAndMongoDBOhMy.aspx
http://www.michaelckennedy.net/blog/2010/04/29/MongoDBvsSQLServer2008PerformanceShowdown.aspx
http://www.slideshare.net/mongosf/c-development-sam-corder
http://code.msdn.microsoft.com/mag201005WorkProg/Release/ProjectReleases.aspx?ReleaseId=4304
http://msdn.microsoft.com/en-us/magazine/ee310029.aspx
http://github.com/samus/mongodb-csharp

The New Buzz (Raven-DB)
http://www.codeproject.com/KB/cs/RavenDBIntro.aspx
http://ayende.com/Blog/archive/2010/04/21/that-no-sql-thing-modeling-documents-in-a-document-database.aspx http://ayende.com/Blog/archive/2010/04/22/that-no-sql-thing-document-database-migrations.aspx
http://ayende.com/Blog/archive/2010/04/27/etl-process-using-raven.aspx
http://www.blip.tv/file/3303967

Some interesting Links
http://varud.com/article/pros-and-cons-of-mongodb/

Mongo Db Links
http://www.10gen.com/event_mongosf_10apr30#harmonyapp

Ruby & Mongo

http://www.slideshare.net/mongosf/practical-ruby-projects-alex-sharp

Digg,Facebook all use Cassandra, infact Cassandra was developed by FB:

Cassandra

http://hectorsharp.com/

Other Links:
http://www.codeproject.com/KB/threads/ThreadedExecuter.aspx