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. Web Development
  3. ASP.NET
  4. Web service setdata()

Web service setdata()

Scheduled Pinned Locked Moved ASP.NET
databasewcfsysadminhardwarexml
6 Posts 2 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.
  • B Offline
    B Offline
    BLOEDHOND
    wrote on last edited by
    #1

    Hi All I have a tough one (for me that is). I have written a web service that recieve SOAP messages from an embedded device and it works fine I now need to get this information into a service on a server running in the back ground so that I can manipulate the data and in the end save it a SQL2005 db. I have seen that when I receive SOAP udates from my embedded device the web service "fires" on each POST from the embedded device, This can be as much as 10 000 time per second, I can see all my data. My first idea was to allow the web service to udate the SQL2005 db directly but this process is to slow. That is why I planning a service running on the same server as a process in the background. Regards

    G 1 Reply Last reply
    0
    • B BLOEDHOND

      Hi All I have a tough one (for me that is). I have written a web service that recieve SOAP messages from an embedded device and it works fine I now need to get this information into a service on a server running in the back ground so that I can manipulate the data and in the end save it a SQL2005 db. I have seen that when I receive SOAP udates from my embedded device the web service "fires" on each POST from the embedded device, This can be as much as 10 000 time per second, I can see all my data. My first idea was to allow the web service to udate the SQL2005 db directly but this process is to slow. That is why I planning a service running on the same server as a process in the background. Regards

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      I had a similar situation when I recieved a lot of web requests when doing statistics for a web site. I didn't solve it using a service, but with a thread. I store the data in a static list, until the list gets to a specific age or a specific size. Then I start a thread that will loop through the list and save the data to the database, and create a new empty list to store new data in.

      --- b { font-weight: normal; }

      B 1 Reply Last reply
      0
      • G Guffa

        I had a similar situation when I recieved a lot of web requests when doing statistics for a web site. I didn't solve it using a service, but with a thread. I store the data in a static list, until the list gets to a specific age or a specific size. Then I start a thread that will loop through the list and save the data to the database, and create a new empty list to store new data in.

        --- b { font-weight: normal; }

        B Offline
        B Offline
        BLOEDHOND
        wrote on last edited by
        #3

        Hi Guffa Good idea. Just one question. When the Web service is in the IIS environment will the werb service store the incomming info in memory and if so how do a separate thread or application retrive this data? Regards

        G 1 Reply Last reply
        0
        • B BLOEDHOND

          Hi Guffa Good idea. Just one question. When the Web service is in the IIS environment will the werb service store the incomming info in memory and if so how do a separate thread or application retrive this data? Regards

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          I used a static variable to hold the reference to the list where I stored the data. As it is static, all different threads that handle requests can reach it, but you have to use locking to prevent more than one thread to access it at once. When the list was "full", I copied the reference to the list into an object that I later used to start a new thread, and created a new list and put the reference to it in the static variable. So, as the new thread was started from the thread handling the request, there was no problem sending the data to it.

          --- b { font-weight: normal; }

          B 1 Reply Last reply
          0
          • G Guffa

            I used a static variable to hold the reference to the list where I stored the data. As it is static, all different threads that handle requests can reach it, but you have to use locking to prevent more than one thread to access it at once. When the list was "full", I copied the reference to the list into an object that I later used to start a new thread, and created a new list and put the reference to it in the static variable. So, as the new thread was started from the thread handling the request, there was no problem sending the data to it.

            --- b { font-weight: normal; }

            B Offline
            B Offline
            BLOEDHOND
            wrote on last edited by
            #5

            Ok Thanx Ill try that. Im used to straight C++ and VB6 so this .Net thing and ADO.net is new to me. I'm busy to see if the DataSet and DataAdapter object will be fast enough for my requirement. But It takes a bit time as I'm used to Recordsets and ODBC. Another question is, if a Web service "fires" on an incoming event and it executes and during execution another event comes in will the web service "fire" again on a different thread, or will IIS buffer this new incomming event?

            G 1 Reply Last reply
            0
            • B BLOEDHOND

              Ok Thanx Ill try that. Im used to straight C++ and VB6 so this .Net thing and ADO.net is new to me. I'm busy to see if the DataSet and DataAdapter object will be fast enough for my requirement. But It takes a bit time as I'm used to Recordsets and ODBC. Another question is, if a Web service "fires" on an incoming event and it executes and during execution another event comes in will the web service "fire" again on a different thread, or will IIS buffer this new incomming event?

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              BLOEDHOND wrote:

              I'm busy to see if the DataSet and DataAdapter object will be fast enough for my requirement.

              You can use the Execute methods of the connection object if you want less overhead. If you don't use the DataSet to feed a user interface, there is not really any reason to have it.

              BLOEDHOND wrote:

              Another question is, if a Web service "fires" on an incoming event and it executes and during execution another event comes in will the web service "fire" again on a different thread, or will IIS buffer this new incomming event?

              Each request will run in a separate thread, so you can have a number of requests executing at the same time. The web server limits (buffers) the requests per user (session), though, so you will not have more than one request running at a time for each user.

              --- b { font-weight: normal; }

              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