Avoiding De-Serialization

Discussion in 'ASP .Net Web Services' started by Mark Oueis, Nov 23, 2004.

  1. Mark Oueis

    Mark Oueis Guest

    I've got what i think is a tough question. I hope someone can help me.

    We have data entering our software through a Web Service. It is then
    directly (without any processing whatsoever) forwarded to a Windows
    Service through remoting. The problem is this: when lots of data is
    coming in, its being de-serialized by the Web Service, then serialized
    again to be sent to the windows Service, then de-serialized by the
    Windows Service to be used.

    Is there any way i can just avoid the de-serialization process of the
    Web Service? Can i just keep the data serialized and pass it through
    remoting to the Windows Service?

    Thanks

    Mark
     
    Mark Oueis, Nov 23, 2004
    #1
    1. Advertising

  2. Mark Oueis

    Dan Rogers Guest

    Hi Mark,

    Yes, there is a way. You can process the incoming request directly, either
    by building a port listener that does a passthrough, or by hosting your
    first service end-point on a Biztalk Server 2004 port. The data will still
    get copied as it moves thru any interim, but you can avoid deserializing
    twice by keeping the data as XML. An advantage of using a Biztalk Server
    2004 is that you can add in validation, signature verification,
    transformation, etc.

    I hope this helps

    Dan Rogers
    Microsoft Corporation
    --------------------
    >From: (Mark Oueis)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: Avoiding De-Serialization
    >Date: 23 Nov 2004 09:56:07 -0800
    >Organization: http://groups.google.com
    >Lines: 16
    >Message-ID: <>
    >NNTP-Posting-Host: 207.35.201.4
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1101232568 5629 127.0.0.1 (23 Nov 2004

    17:56:08 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Tue, 23 Nov 2004 17:56:08 +0000 (UTC)
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
    sfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:26774
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >I've got what i think is a tough question. I hope someone can help me.
    >
    >We have data entering our software through a Web Service. It is then
    >directly (without any processing whatsoever) forwarded to a Windows
    >Service through remoting. The problem is this: when lots of data is
    >coming in, its being de-serialized by the Web Service, then serialized
    >again to be sent to the windows Service, then de-serialized by the
    >Windows Service to be used.
    >
    >Is there any way i can just avoid the de-serialization process of the
    >Web Service? Can i just keep the data serialized and pass it through
    >remoting to the Windows Service?
    >
    >Thanks
    >
    >Mark
    >
     
    Dan Rogers, Nov 23, 2004
    #2
    1. Advertising

  3. Mark Oueis

    Mark Oueis Guest

    Thanks, we might need to use one of those methods.

    I was thinking though, is there any need to have a Windows Service at
    all? Can we not simply use the ASP .NET service for all our needs?

    Basically the question boils down to this. What can we do in the
    windows service that cannot be done in the ASP .NET service.

    Thanks again

    Mark
     
    Mark Oueis, Nov 25, 2004
    #3
  4. Mark Oueis

    Dan Rogers Guest

    If you choose to use the ASP.net infrastructure, you won't be able to avoid
    the repeated serialization/deserialization since this is a part of the
    ASP.net stack. For more information on this, look at how web service
    extensions work - the full deserialization stack is discussed in the
    articles on web service extensions.

    If you write your own port reader or HTTP handler (and thus use IIS as a
    service facade), you have full control. The WSE 2.0 toolkit also comes
    with the infrastructure you need to do this kind of work, so that is an
    option as well.

    I hope this helps

    Dan Rogers
    Microsoft Corporation
    --------------------
    >From: (Mark Oueis)
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: Re: Avoiding De-Serialization
    >Date: 25 Nov 2004 10:02:57 -0800
    >Organization: http://groups.google.com
    >Lines: 11
    >Message-ID: <>
    >References: <>

    <>
    >NNTP-Posting-Host: 207.35.201.4
    >Content-Type: text/plain; charset=ISO-8859-1
    >Content-Transfer-Encoding: 8bit
    >X-Trace: posting.google.com 1101405777 11571 127.0.0.1 (25 Nov 2004

    18:02:57 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Thu, 25 Nov 2004 18:02:57 +0000 (UTC)
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
    sfeed1.ip.tiscali.net!news.glorb.com!postnews.google.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:26815
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >Thanks, we might need to use one of those methods.
    >
    >I was thinking though, is there any need to have a Windows Service at
    >all? Can we not simply use the ASP .NET service for all our needs?
    >
    >Basically the question boils down to this. What can we do in the
    >windows service that cannot be done in the ASP .NET service.
    >
    >Thanks again
    >
    >Mark
    >
     
    Dan Rogers, Nov 29, 2004
    #4
  5. Mark Oueis

    Guest

    What do you think of avoiding the windows service all together and
    moving everything to the web application.

    I have seen techniques to keep the application alive (by making the
    application make requests to itself before the session ends)

    Mark
     
    , Dec 13, 2004
    #5
  6. Mark Oueis

    Dan Rogers Guest

    Hi Mark,

    I'm not sure what it is that you are trying to gain. Of course, you could
    develop a number of means (including an interactive application that just
    opens a port and listens). But the purpose of creating tools and standards
    based infrastructure is to get you out of the game of implemeting the
    infrastructure pieces (very error prone) and into the application business.

    Does this make sense?

    Dan
    --------------------
    >From:
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: Re: Avoiding De-Serialization
    >Date: 13 Dec 2004 11:27:05 -0800
    >Organization: http://groups.google.com
    >Lines: 8
    >Message-ID: <>
    >References: <>
    > <>
    > <>
    > <>
    >NNTP-Posting-Host: 207.35.201.4
    >Mime-Version: 1.0
    >Content-Type: text/plain; charset="iso-8859-1"
    >X-Trace: posting.google.com 1102966029 22322 127.0.0.1 (13 Dec 2004

    19:27:09 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Mon, 13 Dec 2004 19:27:09 +0000 (UTC)
    >In-Reply-To: <>
    >User-Agent: G2/0.2
    >Complaints-To:
    >Injection-Info: c13g2000cwb.googlegroups.com; posting-host=207.35.201.4;
    > posting-account=Sj2LdA0AAACzyflh18yp0KSqllm3aAzf
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.s
    ul.t-online.de!t-online.de!news.glorb.com!postnews.google.com!c13g2000cwb.go
    oglegroups.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:27161
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >What do you think of avoiding the windows service all together and
    >moving everything to the web application.
    >
    >I have seen techniques to keep the application alive (by making the
    >application make requests to itself before the session ends)
    >
    >Mark
    >
    >
     
    Dan Rogers, Dec 13, 2004
    #6
  7. Mark Oueis

    Guest

    I'm trying to avoid double serialization.

    One way of doing that is to avoiding having to send the information to
    my windows service and just processing the infromation at the web
    application directly. What limitations does this have?

    Mark
     
    , Dec 16, 2004
    #7
  8. Mark Oueis

    Dan Rogers Guest

    Hi Mark,

    None on the surface of things. In essence what you are doing right now
    sounds like you've built a web service wrapper on a remoting application.
    I'd consider refactoring both so that the logic you want to share is in a
    DLL that both the web servce and the windows service (your remoting host
    for your application) can directly use the shared code.

    Dan
    --------------------
    >From:
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.webservices
    >Subject: Re: Avoiding De-Serialization
    >Date: 16 Dec 2004 08:56:29 -0800
    >Organization: http://groups.google.com
    >Lines: 8
    >Message-ID: <>
    >References: <>
    > <>
    > <>
    >NNTP-Posting-Host: 207.35.201.4
    >Mime-Version: 1.0
    >Content-Type: text/plain; charset="iso-8859-1"
    >X-Trace: posting.google.com 1103216193 23899 127.0.0.1 (16 Dec 2004

    16:56:33 GMT)
    >X-Complaints-To:
    >NNTP-Posting-Date: Thu, 16 Dec 2004 16:56:33 +0000 (UTC)
    >In-Reply-To: <>
    >User-Agent: G2/0.2
    >Complaints-To:
    >Injection-Info: f14g2000cwb.googlegroups.com; posting-host=207.35.201.4;
    > posting-account=Sj2LdA0AAACzyflh18yp0KSqllm3aAzf
    >Path:

    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!tornado.fastwebnet.it!tiscali!new
    sfeed1.ip.tiscali.net!news.maxwell.syr.edu!postnews.google.com!f14g2000cwb.g
    ooglegroups.com!not-for-mail
    >Xref: cpmsftngxa10.phx.gbl

    microsoft.public.dotnet.framework.aspnet.webservices:27236
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservices
    >
    >I'm trying to avoid double serialization.
    >
    >One way of doing that is to avoiding having to send the information to
    >my windows service and just processing the infromation at the web
    >application directly. What limitations does this have?
    >
    >Mark
    >
    >
     
    Dan Rogers, Dec 16, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Keith R. Williams

    Re: Avoiding latches

    Keith R. Williams, Jul 14, 2003, in forum: VHDL
    Replies:
    0
    Views:
    1,212
    Keith R. Williams
    Jul 14, 2003
  2. Replies:
    8
    Views:
    2,291
    deadsea
    Jan 2, 2005
  3. Replies:
    3
    Views:
    1,069
  4. Dimitri Ognibene
    Replies:
    4
    Views:
    807
    Dimitri Ognibene
    Sep 2, 2006
  5. Ramunas Urbonas
    Replies:
    1
    Views:
    421
    Dino Chiesa [Microsoft]
    Jul 27, 2004
Loading...

Share This Page