Exploring the depths and potentials of ASP.NET RSS 2.0 or Subscribe to .BenRush by Email
 Wednesday, June 14, 2006

Warning, rough notes:

I went to a notable talk this morning about versioning web services using WCF (though, many of the concepts could have been applied to ASMX too, or for that matter, any web service technology). The basic question the session tried to answer was how do you adjust a contract over time (version it) so that you don't break existing cilents?

In short, there are two potential answers:

  1. Put up a completely seperate and new endpoint,
  2. Carefully adjust what you currently have.

Simple in theory, but in practice the second part is typically the more difficult one. The benefit of the first is that you don't haev to worry about breaking any clients in the field as the original logic isn't touched; however you will more than likely experience code-bloat. The second option is tougher to write as you have to make sure what you're touching dosen't break existing clients, but it's also more conservative as you typically can reuse existing blocks of code (less code = fewer bugs, etc).

If you must adjust your existing service contract (option #2), then you typically can do so in one of three ways:

  1. Add new stuff - new types
  2. Extend old stuff - add new functions or fields
  3. Change old stuff - adjust parameter types, etc.

The 3rd option is usually the least preferrable, and if you're faced with this then it's recommended to just create a new endpoint (service) altogether. Adding new stuff is simple as you simply add new types and they don't interfere with the existing contracts. Extending older stuff, however, is possible but takes some thought:

  1. The DataContract serializer (I believe it's called) expresses members of data types in alphabetical order into the WSDL. You must use the [DataMember(order=X)] ordering feature to properly order them since new additions must be placed at the end (so you don't break existing clients). The 'order' is done by group, so that the first versioned group is 1, the second 2, etc.
  2. The XMLSerializer uses the same concept but is ordered like [XMLElement(Order=1)]......[XMLElement(Order=N+1)] with each value N going from 0 on.
  3. If a client is calling in with less information than the service expects, then either the DataContract serializer and the XMLSerializer represent the value of the type as Nullable<T>, so test for this. Express new additional types that support nullable with the question mark (ex: [DataMember(order=x)] public int? age; )
  4. Also note the benefits of IExtensibleDataObject, XMLAnyElement, and XMLIgnore.

kick it on DotNetKicks.com
Wednesday, June 14, 2006 12:31:33 PM (Central Standard Time, UTC-06:00)  #    Comments [1] - Trackback
Computing

....they'd be a MUCH more aggressive towards growing a monopoly.


kick it on DotNetKicks.com
Wednesday, June 14, 2006 7:48:00 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing
 Tuesday, June 13, 2006

I've been to talks like this one before, so not everything was new (in fact, very little was to me...which is probably a good thing, I guess). So, not as much struck me as interesting...but this is a (very) brief run down of some main points to take away...

  1. Critical Problems are always...
    1. IntraProcess: resources within the process like memory and CPU, or
    2. InterProcess: contentions for resources outside (files, network, etc.)
  2. Important CPU Counters to monitor for CPU utilization
    1. % Processor Time: Useful in multi-CPU environments
    2. % User Time: Determines how much work user-mode code in your app (therefore, typically YOUR APP) is taking,
    3. % Priv. Time: Determines how much time the kernel is spent working on particular tasks given to it by your app.
  3. Good CPU performance tools:
    1. Visual Studio Performance Profiler (available in Team edition),
    2. Kernrate viewer (available on MSDN),
    3. Intel's performance profiler (forgot the name...oops)
  4. Visual Studio Performance Profiler has the capability to profile in,
    1. Sampling Mode: where it samples every N CPU cycles; this method is typically less intrusive, but given that it's time-based can miss things.
    2. Instrumentation: performance code and bit are inserted into the runtime code, which takes up more time for it and gives it a larger working size, but is sometimes the only option for certain scenarios (like testing for Priv. Time slices).
  5. Memory Problems:
    1. Check for immense paging,
    2. Tools:
      1. Perf Counters, TaskManager, SysInternals' ProcessExplorer
      2. CLRProfiler V 2.0
      3. VADump (very cool app)
        1. take note of the OtherData vs. Heap values in this as this determines what is native/managed resource leaks (usually) respectively.
      4. Also Check out User Mode Dump Heap (never heard of this tool, personally), sometimes called "UMDH".
  6. Key blogs:
    1. http://blogs.msdn.com/ricom/.
    2. http://blogs.msdn.com/maoni/.

 

 


kick it on DotNetKicks.com
Tuesday, June 13, 2006 12:29:01 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Went to a lunch time session on Windows MapPoint; and there are some cool advances going on there. Version 3 is out, so I would recommend checking it out as there are some new features built into it.

Some highlights:

  1. Check out http://dev.live.com/virtualearth/sdk for a wonderful array of samples and examples for what is capable and how to do it.
  2. MapPoint is available as a web service too for smart clients, etc.
  3. Check out MapCruncher, which is a service that lets you upload your own maps and morph them to support the same functional capabilities of MapPoint using the MapPoint services. Check it out here: http://research.microsoft.com/mapcruncher.

Some cool stuff, folks.... 


kick it on DotNetKicks.com
Tuesday, June 13, 2006 12:15:54 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Brief TechED Linq summary:

  1. The point is to work with data like you work with objects
  2. System.Query is the entry namespace
  3. The LINQ infrastructure is built into the .Net Framework, so it's not a language extension but a first-class piece of .Net. This means it's language agnostic.
    1. LINQ uses pluggable data sources to power itself. These can be done by third parties.
  4. LINQ can query all objects implementing IEnumerable<T>
  5. LINQ works with SQL Server by generating "interop-like" assemblies that wrap the database types and calls around something the LINQ framework can query (objects).
  6. The LINQ Query Visualizer looks very cool, it's used during debugging times to see the SQL statements that the LINQ framework generated; also gives you the ability to tweak these statements and test them.
  7. LINQ to XML:
    1. System.Xml.XmlLINQ
    2. VB.Net has now added support for XML Literals where XML can be written inline with VB.Net (without the "" quotes).
  8. Check out http://msdn.microsoft.com/netframework/future/linq.

kick it on DotNetKicks.com
Tuesday, June 13, 2006 11:03:32 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

A quick run down on a few of the new changes in the Windows VISTA kernel:

  1. I/O prioritization optimizations
    1. Things like larger I/O packets to reduce read/write requests
    2. File bandwidth reservations for long-running applications that may require time slices on the disk for a range of time (like Windows Media Player)
  2. User Mode Drivers
  3. No fixed-size memory preallocation of kernel regions at boot time; memory allocation can be dynamic.
  4. SuperFetch
    1. Notes patterns and prefetches application (and even application private memory) into VM.
  5. ReadyBoost
    1. Extends VM on external drives
  6. Boot Configuration DataTable; boot.ini is has been replaced by the data table
    1. Location D:\Boot\BCD
    2. BCDEdit is the command line editor for this
    3. BootMgr replaces pieces of NTLDR
  7. New interactive logon manager
    1. GINA has been replaced with a more dynamic, pluggable alternative
  8. Kernel Transaction Manager (for transactional kernel actions)
    1. File system is now transactional by nature
    2. API is programmable through CreateTransaction/CommitTransaction/etc.
    3. Interfaceable through commandline interface (transact command)
  9. Volume Shadow Copy
  10. Crash Recovery/Diagnostics for unhandled native exceptions (non-managed) isn't handled by Dr. Watson anymore, which was loaded into the address space of the crashing application as this was a bad alternative for apps with severely corrupted stack frames: No more "just dissapears" application crashes.  
  11. BitLocker drive encryption
    1. Implemented using filesystem filters
  12. Code Integrity Verification
    1. All drivers under 64-bit Windows must be digitally signed by Microsoft for verification of stability.
    2. Mark noted that roughly 1/3rd of all blue screens today are occuring due to 3rd party drivers for which there are, currently, available updates that would have fixed the problem.
  13. Protected Processes
    1. Cannot have a debugger attached
    2. Many statistics and bits of information are hidden from view, cannot be seen or analyzed.
  14. Address Space Load Randomization
    1. Very cool feature: randomizes where libraries and moduels are loaded into memory so that fixed-location attacks are mitigated.
    2. The system randomizes 256 different locations; enough since most code that would need to inspect each 256 of the variants would be too large to fit in many buffer overrun attacks.
  15. User Account Control
    1. Running applications with reduced security tokens even when administrator - have the option to run as Administrator when Administrator.

kick it on DotNetKicks.com
Tuesday, June 13, 2006 7:51:22 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing
 Monday, June 12, 2006

I just got done with a good WCF talk given by Steve Maine. My note taking these days is more used as a way of reminding myself later what to look at, or what I think others might find interesting. So....here are a couple points anyone should take with them:

  1. .Net Remoting is not dead: in fact, it's quite alive some of WCF actually utilizes it,
  2. Make sure you understand the basics behind Encoders, Channels, Operation Selectors and Operation Formatters.
  3. Pay special attention to the powerful extensibility tools called Behaviors.
  4. Check out the new site (published less than 24 hours ago): http://wcf.netfx3.com.

 


kick it on DotNetKicks.com
Monday, June 12, 2006 12:45:24 PM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Dude, the link I sent out about the TechEd bags was TOTALLY NOT what the bags turned out to be like....*rolls eyes*. Totally gay.


kick it on DotNetKicks.com
Monday, June 12, 2006 10:18:21 AM (Central Standard Time, UTC-06:00)  #    Comments [0] - Trackback
Computing

Computers Blogs - Blog Top Sites

Archive
<June 2006>
SunMonTueWedThuFriSat
28293031123
45678910
11121314151617
18192021222324
2526272829301
2345678
Blogroll
About the author/Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2009
Benjamin Rush
Sign In
Statistics
Total Posts: 444
This Year: 0
This Month: 0
This Week: 0
Comments: 128
Themes
Pick a theme:
All Content © 2009, Benjamin Rush
DasBlog theme 'Business' created by Christoph De Baene (delarou)