Wednesday, July 28, 2010

WSE 3.0 extreme latency

We had a legacy .NET web-service that uses WSE 3.0. We are the service provider and we have an intermediate authentication server as well as the consumer. We had intermittent mysterious socket time out exceptions.

A thorough network snoop was conducted across 4 network teams (we span across 2 intranet and 2 WAN domains). Everything was healthy with <10ms latency between hops.

It was puzzling and a stroke of genius came by and we decided to check the inputtrace.webinfo and outputtrace.webinfo (default logging configs). Nothing special about it except for the size. Monthly scheduled jobs archival results in file size in excess of 600mb. Some team members had argued that logging mechanism should be asynchronous and should not have any influence on the response SOAP. There's no harm trying to flush out the logs and archive and do a re-test. Sure enough everything was back to < 0.5s

Our corrective action was to increase the frequency of the archival from monthly to weekly.

Wednesday, July 21, 2010

Gridview grouping

I've worked with SPGridView quite a bit lately and know that grouping is achievable, i thought that Gridview being the superclass of SPGridview, it should support grouping as well. I was wrong. My girlfriend had a requirement to group a set of data based on their type. A mock set of the data involved:


Product A - Type A
Product B - Type A
Product C - Type B
Product D -Type B
Product E - Type C
Product F - Type D


My first move was to take a look at the DAL (Data access layer) to see how the objects are related, in order for me to plan on grouping it. They are returned as generic dataset, so i had to create some simple POCO (Plain Old C# Objects), i prefer to work with strongly-typed grids :)


After retrieving the the data, i've modified the DAL to return an IList of the POCO instead of DS.


With the data retrieval and formatting done, all i have to do now is to bind it to a gridview and set the group by option. A little googling, i found a custom gridview which allow grouping:
ZNetControls

Read a little on the page and from the author's documentation, it seem simple enough.


  1. I created an ObjectDataSource that hooks up with the DAL GetAllBindableObjects() as the selectmethod. 
  2. Added the library (ZNetControls) into my VS and added the ZNetGridview into the page
  3. Added the grouping type: DataKeyNames="Category"
Ran the page and i get this:


Pretty easy to implement :)



Friday, June 25, 2010

My analogy of a delivery team

I've recently worked under a project manager that don't do his job holistically, i was tasked to deliver 2 assignments but he didn't gave me the resources i need.

List of resources i requested for:
  1. Local intranet account (in order to get internet access)
  2. A machine for me to work on (i had to use my own macbook)
  3. Someone that have complete understanding of the database (since i'm only on a short attachment)
  4. Documentations/specifications (i had to work based on my own analogy)
This dragged on for 4 torturous months, the best thing was, in this 4 months, i only managed to complete (partially) 1 of his task due to all the above reasons. He didn't respond to my desperate pleas (i was dying to finish this assignment so as to move on with another team), he just wanted me to get the things done. Until an indian (no offense) knight, donning a set of bright shining armor came along and did his job for him. He came for barely 3 days and my first assignment was progressing by leaps and bounds, it's near completion, implementation and testing. He set a very defined objective for me to achieve and go all the way out to give me any resource that i require. I had to dedicate this post to him for his professionalism and commitment.

I stayed till almost 10pm tonight (it was a very rare thing for me to do), but i didn't sulk or feel moody over it. He had the charisma which made me willing to stay for his sake and to finish this whole thing and move on with life.

Upon sitting down, this analogy of mine came into my mind:

I can be metaphorically viewed as a Katana, him as a Samurai, my system analysts as a razor (not belittling them)

In a project team, our objective is to slaughter a cow (sorry for hindu folks but i can't think of other animals), for the whole 4 months, my previous PM was asking me to serve the meat to our users, without telling me which cuts they want, how well they want it to be done, and with what sauce. So from day one, i was only able to kill the cow, skin it and thinking of how should i serve the users. When the new PM came in, he told me everything, had all the tools ready. I did my cutting, cooked the beef and is just waiting for the sauce to be ready. (Don't feel hungry yet :))

As the saying goes: a blade is only as strong as its possessor

My job is to cut things up fast and nicely according to your requirements, not to shave the fur or to skin the beast. 

Luckily for me, a skilled wielder came along and we are on track to serve our users with a plate of medium-rare steak with black pepper sauce.

Saturday, June 12, 2010

Swollen lymph nodes

Wouldn't be blogging in the coming few days due to cold sores -> swollen lymph nodes. Hurting like hell, will try to set up SPListEngine on MOSS 2010 and update with screens and POCs...

Thursday, June 10, 2010

Sharepoint 2010 virtual box

Many of you are aware that microsoft had released a virtualized server with many components (SharePoint 2010, MS Office 2010, SilverLight, Active Directory) all configured nicely (even the AD had 100 test users with complete profiles and photos)

But for a developer like me, i would like to start from a clean server and install all the components one by one.

I am using Sun/Oracle's virtualbox as it allows 32 bit host to have 64 bit guest (free). I have a dreamspark account, which gives me access to a lot of software for free (academic purpose).

To set up your own MOSS 2010,

  1. Prepare virtualbox (create win server 2008 64bit)
  2. Install win 2008 with active directory
  3. Create domain (in MOSS 2010, you can't use a local account as farm administrator anymore)
  4. Install MS SQL 2008 developer 64bit
  5. Patch MS SQL to SP1 and CU2 (cumulative upgrade)
  6. Install MOSS 2010
  7. Go to the familiar looking Configuration wizard
  8. Start having fun with your new MOSS 2010 vm
I will attempt to put my SPListEngine within to speed up development efforts though, will update on my success (if any)