Total Pageviews

Disclaimer

This is a personal web page. The views expressed on this blog are mine and do not necessarily reflect the views of my current employer.

I am currently employed by Morgan Stanley.

December 30, 2008

#SNMP Design: New Look of Its Home

Well, after so many months I finally figured out how to create new Wiki pages on CodePlex.com. Therefore, now the homepage is no more crowded. The most important thing is that a unified FAQ page. Please feel free to comment on the organization so that I can adjust it later.

Happy new year, guys.

By the way, do you notice that now you can access the homepage using http://sharpsnmplib.codeplex.com ? Nice change.

December 25, 2008

X'mas

Wish you all merry Christmas and a happy new year.

Only hope I would get recovered from the pains in the end of 2008 and be a better man next year.

:)

December 21, 2008

#SNMP Design: Latest FAQ Addition

1. Why when I compile the source code an error is displayed about AssemblyInfo task?
Answer: Please open readme.txt in the source code package to see what is missing on your computer.

2. Which language does this library support?
Answer: Technically speaking, all .NET languages are supported, such as C#, VB.NET, Delphi Prism , C++/CLI, IronPython, IronRuby, and so on.

3. Is this library thread safe?
Answer: Not yet. Please use static methods in Manager or Agent component which should be thread safe.

4. How to diagnose problems?
Answer: A general approach is like this,

  • Does this problem reproducible? 
  • Do other libraries behave the same? Please test with Net-SNMP which is also open source.
  • Does the latest build in the repository work?
  • Is this a known issue ?
  • Prepare extra information (a Wireshark or Network Monitor log for network traffic, stack trace for exceptions, MIB file for parser errors). Then open a bug report here with the log file attached. 
5. Why some methods are marked as Obsolete?
Answer: After 1.5 release, #SNMP Library API will be changed a little bit. Therefore, some methods are obsolete from now on. Please avoid using them from now on.

December 14, 2008

#SNMP Design: TwinTower Status on Library Side

Well, I can only say something about the Library. Steve will decide if there is anything else on the Browser side. Note that the Compiler will be surely Alpha until CrossRoad. 

After marking up all the Obsolete methods, I am going to focus on the last piece, Manager.GetTable. So 1.5 is 99% ready on my side. If I cannot improve GetTable, any modification will be deferred to CrossRoad, too.

As far as I know, I own two Issues on the Browser numbered 3365 and 3403 (3408 is "won't fix"). I will stat to work on them lately. Stay tuned.

#SNMP Design: Backport Flaw Or Best Practice

When Steve finished the backport and discussed with me, both of us were aware that maintaining both VS2005 and VS2008 solution and project files are hard. Therefore, I began to (re)search on that topic.
A bug report set the fire bigger, so I made big progress too yesterday. Now we no longer have to maintain duplicate project files (*.csproj) except separate solution files for each IDE. How we achieve this? Simple.
A lot of people meet such problems before us, so there are many posts available. After analysis, I found it impossible to share solution files, but it is possible to add VS2008 project files into VS2005 solution files (with some patches). Now let's see the steps if you already have VS2008 solutions and projects at hand and want to back port to VS2005.
  1. Create a solution file for VS2005. Although it is not possible to only create a solution file in VS2005 IDE, you can start by creating an empty project and make sure of its solution file.
  2. Add existing VS2008 projects into this solution from VS2005. 
See how easy it is! But horrible warnings may be sent by VS2005 that a project is invalid. Don't panic 'cause it is normal. In such cases, you need to manually edit the *.csproj file in NotePad. Simply replace the import tag with this one,
<import project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
and you can finish step 2 now.
Have to confess it is rather easy to sync solution files, isn't it compared to sync project files? :)

#SNMP Design: Obsolete Methods

I did not pay much attention to compatibility in the past, because previous releases (0.9, 1.0, and 1.1) are concept oriented which make sure that SNMP can be implemented in such a way. Therefore, I have changed the API several times. Well, that can be bad to some users if they have hundreds of lines to modify all in a day.

So from now on, I will pay more attention to that. You may already notice this by compiling your project against the latest bits in the repository as the compiler suddenly tells you some methods are obsolete.

Sorry, this is a direct consequence when I start to pay back some design debts. For example, some obsolete constructors such as GetRequestMessage's require IPAddress parameters, but the parameters are not used until Send methods are called. Non-sense. Why not pass them until Send? Another case is Send, which hides the GetResponseMessage instance. This can be very restricted when you try to access that instance to customize the behavior.

Here comes the warning. Although obsolete methods will be delivered in 1.5 final, they are not likely to appear in later releases. Please make a schedule to migrate. Thanks.

Stay tuned.

December 06, 2008

#SNMP Design: Backport to C# 2.0/Visual Studio 2005

Steve contributed a lot by back porting the library to C# 2.0. This is out of my original plan. This port was required because Visual Studio 2005 becomes Steve's primary platform lately. It is interesting to notice that only a few classes modified. Well, luckily I stopped using a lot of C# 3.0 specific features when I realized they will probably prevent such a port in late August.

However, here comes a small problem. Now we need to keep VS2005 and VS2008 project files in sync. Before an automatic way is found, manual sync is a must. In order to reduce the sync effort, during the release cycle we will focus on VS2005 project files and sync changes to VS2008 files whenever a release is coming. From now on please always use VS2005 project files for source code in the repository. Otherwise, you may find some projects broken.

Stay tuned.

#SNMP Design: 1.5 RC3 Out

Well, although this RC3 bit missed its original target day seriously (according to this post and this one , it might have been released in October), it did bring a lot more.

Stay tuned.