Inherited Message Distributing

Sign in to queue

The Discussion

  • User profile image
    Bob

    Yes a VB.net version would be nice.

  • User profile image
    Clint

    @Bob Thanks, I will get to this then.

  • User profile image
    jalal

    cool can you trancode it to vb language

  • User profile image
    GC

    Hi Robert,

    An alternative would be to have a base abstract "Message" class and a sub-type for each message type, e.g. TextMessage, EmailMessage etc. To create a message you just call new TextMessage(args) and you have your TextMessage object.

    The Message base class defines a method "send()". Each message sub-class should know how to send itself.

    To send your messages all you have to do is go through your queue of Message objects calling "send()" on each.

    I'm curious as to why you chose to sub-class the sender rather than the message, as "send()" seems like something a message should be able to do?

    Cheers,

    GC

  • User profile image
    Rob

    GC,

    You bring up a couple of interesting points, that are not well addressed in this piece.  For the simple examples shown, you could certainly encapsulate sending functionality within the message struct, with perhaps a statically maintained connection.

    When you're designing a web app with a lot done behind the scenes it's often best to decouple the interface and the processing.  For the larger project here this meant an interface needed a message struct solely to hold fields.  A second server, running the nodes might be actually doing the sending.  This design allows you to not expose the node overhead to the UI developers that won't be it anyways.

    The second point to consider is that a node may require a persistent singleton connection that must talk to another server.  In this case it is easier to maintain sending in a separate class/thread that always runs.

    -Rob

  • User profile image
    Oron

    Yes Please give a VB version!!!

  • User profile image
    mgetta

    hey, the idea is cool but im not farmiliar with C# PLS CAN U TRASCODE IN VB

  • User profile image
    Clint

    @rmehta looking into this

  • User profile image
    rmehta

    I could not find the downloable code on codeplex.

  • User profile image
    Clint

    @Oron:  Working on it, just have other things on my plate.

    http://converter.telerik.com/ can do most of the heavy lifting.

  • User profile image
    Ritesh Mehta

    I could not find the downloable code on codeplex.

  • User profile image
    Ritesh Mehta

    Just wanted to followup if you manged to get the code. I could not find the code at the downloadable link

  • User profile image
    Clint

    @rmehta working on getting it back up.

  • User profile image
    Oron

    Hey thanks, I know how it gets!!!

Add Your 2 Cents