Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. .NET Remoting Channels (Custom)

.NET Remoting Channels (Custom)

Scheduled Pinned Locked Moved C#
csharpdotnetquestion
10 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Aisha Ikram
    wrote on last edited by
    #1

    There are two types of channels that .NET framework provide 1)TCP and 2)HTTP and there are custom channels that u can create using any stream oriented transfer technology like Sockets, Named Pipes and MSMQ. My question is which channel is suitable in which situation. Can anybody tell me when should i use named pipes channel and when MSMQ. Need urgent response .... @!$h@

    L 1 Reply Last reply
    0
    • A Aisha Ikram

      There are two types of channels that .NET framework provide 1)TCP and 2)HTTP and there are custom channels that u can create using any stream oriented transfer technology like Sockets, Named Pipes and MSMQ. My question is which channel is suitable in which situation. Can anybody tell me when should i use named pipes channel and when MSMQ. Need urgent response .... @!$h@

      L Offline
      L Offline
      LongRange Shooter
      wrote on last edited by
      #2

      If you use the TCP channel, then you have your own server code which is handling the reciept of the requests and issuing the responses. The HTTP channel places your remoting objects in IIS and it handles all of the server functions with only your remoting objects needed. This lets you focus only on the functions the remote objects perform and not the server functions you need to expose. Channels are the first part of it. Then there are formatters. There are binary formatters and SOAP formatters. Generally, SOAP is horrendously slow. So you should stick to binary even over HTTP. (IIS establishes the binary formatter by default at the server side.) ______________________________ The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it.

      A H 2 Replies Last reply
      0
      • L LongRange Shooter

        If you use the TCP channel, then you have your own server code which is handling the reciept of the requests and issuing the responses. The HTTP channel places your remoting objects in IIS and it handles all of the server functions with only your remoting objects needed. This lets you focus only on the functions the remote objects perform and not the server functions you need to expose. Channels are the first part of it. Then there are formatters. There are binary formatters and SOAP formatters. Generally, SOAP is horrendously slow. So you should stick to binary even over HTTP. (IIS establishes the binary formatter by default at the server side.) ______________________________ The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it.

        A Offline
        A Offline
        Aisha Ikram
        wrote on last edited by
        #3

        what about other (custom) channels like MSMQ, Pipes, Sockets? @!$h@

        L H 2 Replies Last reply
        0
        • A Aisha Ikram

          what about other (custom) channels like MSMQ, Pipes, Sockets? @!$h@

          L Offline
          L Offline
          LongRange Shooter
          wrote on last edited by
          #4

          Dear @!$h@, With any custom channel it is not as simple as just defining a channel...and anyone who even thinks of deploying remoting over Named Pipes should be taken outside and shot. Named Pipes is really an ancient technology that deserves a quiet death. You may need to provide your own sink providers, incorporate sink formatters and sink serializers/deserializers. Most writings on remoting only discuss TCP or HTTP with no other form considered. ______________________________ The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it.

          1 Reply Last reply
          0
          • A Aisha Ikram

            what about other (custom) channels like MSMQ, Pipes, Sockets? @!$h@

            H Offline
            H Offline
            Heath Stewart
            wrote on last edited by
            #5

            IIRC, someone did define a custom channel using MSMQ here on CodeProject. You could try a search to learn more (perhaps "MSMQ channel" for keywords). I believe it was by Roman Kiss.

            Microsoft MVP, Visual C# My Articles

            A 1 Reply Last reply
            0
            • L LongRange Shooter

              If you use the TCP channel, then you have your own server code which is handling the reciept of the requests and issuing the responses. The HTTP channel places your remoting objects in IIS and it handles all of the server functions with only your remoting objects needed. This lets you focus only on the functions the remote objects perform and not the server functions you need to expose. Channels are the first part of it. Then there are formatters. There are binary formatters and SOAP formatters. Generally, SOAP is horrendously slow. So you should stick to binary even over HTTP. (IIS establishes the binary formatter by default at the server side.) ______________________________ The Tao gave birth to machine language. Machine language gave birth to the assembler. The assembler gave birth to the compiler. Now there are ten thousand languages. Each language has its purpose, however humble. Each language expresses the Yin and Yang of software. Each language has its place within the Tao. But do not program in COBOL if you can avoid it.

              H Offline
              H Offline
              Heath Stewart
              wrote on last edited by
              #6

              Actually, I thought using the HttpChannel defaults to SOAP? In any case, though, the BinaryFormatter is much faster (even just for serialization, not to mention over the transport channel). The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!

              Microsoft MVP, Visual C# My Articles

              A 1 Reply Last reply
              0
              • H Heath Stewart

                IIRC, someone did define a custom channel using MSMQ here on CodeProject. You could try a search to learn more (perhaps "MSMQ channel" for keywords). I believe it was by Roman Kiss.

                Microsoft MVP, Visual C# My Articles

                A Offline
                A Offline
                Aisha Ikram
                wrote on last edited by
                #7

                yes i referred to that but Roman Kiss only mentioned how to make MSMQ based Channel and not the advantages/disadvantages of using MSMQ channel over the other channels. @!$h@

                H 1 Reply Last reply
                0
                • H Heath Stewart

                  Actually, I thought using the HttpChannel defaults to SOAP? In any case, though, the BinaryFormatter is much faster (even just for serialization, not to mention over the transport channel). The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)!

                  Microsoft MVP, Visual C# My Articles

                  A Offline
                  A Offline
                  Aisha Ikram
                  wrote on last edited by
                  #8

                  Heath Stewart wrote: The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)! nice piece of information. But this is about formatters and not channels. what i have conceived as yet is that there are only two available formatters SOAP and Binary and about Channels TCP and HTTP. You can write ur custom channels but the formatter you will associate with ur channel could be either SOAP or Binary. My question is about channels and not formatters. @!$h@

                  H 1 Reply Last reply
                  0
                  • A Aisha Ikram

                    yes i referred to that but Roman Kiss only mentioned how to make MSMQ based Channel and not the advantages/disadvantages of using MSMQ channel over the other channels. @!$h@

                    H Offline
                    H Offline
                    Heath Stewart
                    wrote on last edited by
                    #9

                    The advantages and disadvantages are whatever advantages and disadvantages of using MSMQ for anything, really. I don't have a lot of experience with MSMQ (just never had a good enough reason or opportunity as of yet). One advantage I can think of is a distributed system were you could have multiple remoting objects handling requests. I don't know if this would really be necessary, but it may be one way to do load balancing with massive clients connected if you devised a way that whichever remoting object answered first would cause the others not to handle the request. This can be achieved - and probably better - by implementing your own RealProxy derivative, for which the book, "Microsoft .NET Remoting" from MS Press[^], has an example.

                    Microsoft MVP, Visual C# My Articles

                    1 Reply Last reply
                    0
                    • A Aisha Ikram

                      Heath Stewart wrote: The one thing that does stink is that even using the BinaryFormatter, DataSets (which are application uses a lot) are still serialized to XML. This will be changed in .NET 2.0 if you set a property on the DataSet before serializing it. This was recently shown on MSDN TV and there is, obviously, a significant reduction in size (about 400%)! nice piece of information. But this is about formatters and not channels. what i have conceived as yet is that there are only two available formatters SOAP and Binary and about Channels TCP and HTTP. You can write ur custom channels but the formatter you will associate with ur channel could be either SOAP or Binary. My question is about channels and not formatters. @!$h@

                      H Offline
                      H Offline
                      Heath Stewart
                      wrote on last edited by
                      #10

                      Yes, I know. I was posting this in reference to what theRealCondor said - call it an aside. It was not intended to be a direct response to your question.

                      Microsoft MVP, Visual C# My Articles

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups