Andru's WebLog

//Comments about technology and software architecture
>MySelf.Persist();

September 2004 - Posts

Framework.Messaging & WS-ReliableMessaging

Well, as for today we have a working implementation of WS-ReliableMessaging for our messaging subsystem.

The WS-ReliableMessaging is not complete or 100% accurate, but it works for us. As we move on to more serious testing stage we are going to implement the full specification (with WS-Policy and everything else) at some time.

Message retries and aknowledge management for reliable messages are full implemented for single message sequences, but not for multiple message sequences. Implementation of WS-Policy is also very primitive, but we are leaving the plugs to implement those features in near time.

Just to comment a little about our work, our message subsystem has very nice routing capabilities, and it's very fun to see messages come in and forward from node to node, network or domain. We also implemented some nice broadcasting capabilities for messages, without losing any tracking capabilities to assure delivery of every message sent. All this are implemented over WSE2, wich really helped us a lot to get things going.

Well, i'm very happy with the progress so far, and i hope that we can publish some code used in our WS-ReliableMessaging implementation for general use.

Best regards,

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 24 2004, 08:14 PM by andresv | with 2 comment(s)
Filed under:
Better WS-Compression filter for WSE2

My friend Rodolfo Finochietti has modified the WSE2 WS-Compression filter based on the Plumbwork Orange version.

New features in this filter:

1. Compress attachments

2. More algorithms (Deflate, Zip)

3. Compression level (set through compression context)

4. Threshold. Compresses according to the minimum message size (body size plus all attachmnets size)

5. Several other improvements and code cleaning.

You can download the new filter from here or here.

Enjoy!

 

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 14 2004, 08:03 PM by andresv | with 2 comment(s)
Filed under:
New WSE Custom transports implementation: Memory Mapped Files & Named Pipes

Hi, i have developped two new custom transports for WSE: Memory Mapped Files and Named Pipes.

The first (memory mapped files) is intended to be used as an "pseudo-inproc" transport for communication between process of the same machine (something that the "soap.inproc" transport included in WSE2 cant' do) without the use of a network transport. it can be downloaded from here (C# source & VS2003)

Portions of the code used is from the excellent article "A C# Framework for Interprocess Synchronization and Communication" (By Christoph Ruegg), found in the CodeProject webSite.

The second (named pipes) maybe isn't very useful but with some luck someone can use it and take advance of named pipes security and reliability. It can be downloaded from here (C# source & VS2003).

Portions of the code used is from the excellent article "Inter-Process Communication in .NET Using Named Pipes" (By Ivan L), found in the CodeProject webSite.

I hope you found the code of this custom transports useful, and please let me know if you used in some project or have maked some enhacement or bug fix.

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 09 2004, 06:01 PM by andresv | with 2 comment(s)
Filed under:
Message Serialization in WSE2 Custom Transports

It's good to see that many custom transports are beign developped for use in WSE2. I already have seen support for MSMQ, SMTP, UDP and MSSQL, and i have developped two new: Memory Mapped Files (for use as pseudo inproc, for communication between process but not using the network stack) and Named Pipes.

What is not very happy is the way some of this transports serialize the SoapEnvelope object before sending, and the worst case i have seen is something like this:

string msgBody = message.OuterXml;

Later, for "deserializing" the following code is used:

SoapEnvelope env = new SoapEnvelope();

env.LoadXml(msgBody);

Well, this code has some serious problems related with the character encoding of the XML stream. It may work in some cases where the text representing the envelope is transmitted (or stored) using UNICODE, but this is not always the case. There is also another problem with this "technique": attachments are all forgotten, and will be lost without notice when sent.

A better (and safer) way to do the job is using the ISoapFormatter interface and a implementation of a soap formatter found in WSE2. You can use SoapPlainFormatter (if you don't care about attachments) or SoapDimeFormatter.

To serialize the SoapEnvelope we could use code like this:

ISoapFormatter formatter = new SoapDimeFormatter();

MemoryStream stream = new MemoryStream(10000);

// serialize a soapmessage

formatter.Serialize(message, stream);

string msgBody = Convert.ToBase64String(stream.ToArray());

In this case, we serialize the envelope and obtain a Base64 encoded version of the serialized envelope to be sure the content can be transmitted on every transport. It's also acceptable to use an UTF8 encoding for the transport if you are sure there will be not encoding problems.

To deserialize the previous content you may use the following code:

ISoapFormatter formatter = new SoapDimeFormatter();

// serialize a soapmessage

SoapEnvelope env = formatter.Deserialize(new MemoryStream(Convert.FromBase64String(msgBody)));

Well, i hope that this comments helps to give a better use to those new custom transports for WSE2 and eliminate the weird problems that can appear from encoding problems due to improper serialization, and the proper way to deal with DIME attachments.

Best Regards,

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 07 2004, 12:26 PM by andresv | with no comments
Filed under:
Framework.Messaging Proof of concept

Hi everybody!

I'm very happy to announce that we have a "proof-of-concept" working version of our brand new messaging subsystem. It's totally based on WSE2 and provides all the features of our old subsystem and some more. It's features are similar to those found in the FABRIQ project (by Clemens Vasters).

All the routing logic is in place, allowing the route of messages between nodes, networks and domains (something FABRIQ can't do). We currently support one-way messaging only, but implementation of WS-ReliableMessaging is on the way.

We are going to start some serious testing of this baby as this will be the core of our new SOA based framework, so exciting times are ahead!

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 06 2004, 10:29 AM by andresv | with no comments
Filed under:
Retina.NET (open source ORM) is ALPHA2

Finally, I have updated the Retina.NET web site (source code and binaries) with the new ALPHA 2 milestone.

ALPHA 2 contain this changes:

*- MS Access dataStore working (including dataStore builder, also working).
*- DataStore builder now working for MS SQL and all other dataStores.
*- Support for NullableTypes on entities.
*- A new sample application (Timesheet).
*- Help file (alpha, of course) generated with NDoc.

Of course, if anyone is interested in working on some other area (such as making work another dataStore or anything else), please let me know.

Retina.NET workspace can be found at GotDotNet, and you are welcome to stop by if you like.


Best regards,

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 03 2004, 06:31 PM by andresv | with 1 comment(s)
Filed under:
Retina.NET (my open source ORM) approaching ALPHA 2

Later the day i will be uploading updated Retina.NET source code and binaries as we are approaching the ALPHA 2 milestone.

ALPHA 2 will contain this changes:

*- MS Access dataStore working (including dataStore builder, also working).
*- DataStore builder now working for MS SQL dataStore.
*- Support for NullableTypes on entities.
*- A new sample application (Timesheet).
*- A few other samples for simple operations, written in VB.NET.
*- Unit testing of basic persistence for both dataStore implemented.
*- Help file (alpha, of course) generated with NDoc.

Of course, if anyone is interested in working on some other area (such as making work another dataStore or anything else), please let me know.

Retina.NET workspace can be found at GotDotNet, and you are welcome to stop by if you like.


Best regards,

Andrés G Vettori
MCSE/MCSD/MCT
Leader of the C# Community of the
Microsoft Users Group Argentina

Posted: Sep 01 2004, 11:01 AM by andresv | with no comments
Filed under:
More Posts