Multithreading

Discussion in 'ASP .Net' started by Boris Condarco, Jun 28, 2003.

  1. Hi,

    I have to develop an application, whose main feature is: read data from
    DataBase, do many calculations, then write back the results to the DataBase,
    and finally show it to the user.

    This calculations are based on different formula, so i was thinking to
    develop a multithreaded Web Based application, in this order i have the
    following questions:

    Which aspects do i have to consider before, during and after the life cycle
    of the program?

    How many theads can be created simultaniusly on ASP.NET?

    Is there any configuration file to improve the threads performace?

    I would really appreacite any suggestions...!

    Thanks in advance...

    Boris
     
    Boris Condarco, Jun 28, 2003
    #1
    1. Advertising

  2. Boris Condarco

    Paul Guest

    ASP.NET will handle all of your threading for you. It's not really like VB
    COM in that respect, basically, I think your assemblies in ASP.NET are free
    threaded, so it'll keep going until you say stop.

    One of the really great things about .net, it's all disconnected. You
    basically connect to the database to grab your data, do your processing
    'offline' so to speak, and reconnect to post your changes back to the
    database. In former ADO, you'd most likely of have had to stay connected to
    the database throughout your processing, which would quickly form a bottle
    neck under any sort of load (holding a connection to a database is the
    biggest waste of resource imaginable). With ADO.NET however, this doesn't
    exist as the time you're connected to the database is minimal.

    Your objects will run several instances concurrenly if you build your
    classes correctly. We do a lot of work that involves very very heavy
    processing on disconnected data, and this has never proven to be a big
    scalability problem.

    I don't believe there's any specific limit on the number of threads IIS
    (ASP.NET) can handle - it'll just keep on adding until your processor or
    memory resource starts to run out.

    As for configuration, there's always the odd tweak you can do, but if you
    follow good coding practice, my guess is it'll be ok.

    Paul
    "Boris Condarco" <> wrote in message
    news:#...
    > Hi,
    >
    > I have to develop an application, whose main feature is: read data from
    > DataBase, do many calculations, then write back the results to the

    DataBase,
    > and finally show it to the user.
    >
    > This calculations are based on different formula, so i was thinking to
    > develop a multithreaded Web Based application, in this order i have the
    > following questions:
    >
    > Which aspects do i have to consider before, during and after the life

    cycle
    > of the program?
    >
    > How many theads can be created simultaniusly on ASP.NET?
    >
    > Is there any configuration file to improve the threads performace?
    >
    > I would really appreacite any suggestions...!
    >
    > Thanks in advance...
    >
    > Boris
    >
    >
    >
     
    Paul, Jun 28, 2003
    #2
    1. Advertising

  3. Boris Condarco

    Joël Guest

    Wrong. There is a limit on the number of threads ASP.NET can manage.
    This limit is define in the machin.config file under the processmodel tag
    using the MaxWorkerThread attribute.
    This value can be change but above a certain value asp.net collapse.
    So, becarefull when you decide to create more threads.
    One solution could be to use the thread pool (ThreadPool class) in this case
    you will not create more
    thread but use the existing ones. But it's not a good idea if your task is
    takes a lot of time.

    "Paul" <> a écrit dans le message de
    news:0LoLa.3055$...
    > ASP.NET will handle all of your threading for you. It's not really like

    VB
    > COM in that respect, basically, I think your assemblies in ASP.NET are

    free
    > threaded, so it'll keep going until you say stop.
    >
    > One of the really great things about .net, it's all disconnected. You
    > basically connect to the database to grab your data, do your processing
    > 'offline' so to speak, and reconnect to post your changes back to the
    > database. In former ADO, you'd most likely of have had to stay connected

    to
    > the database throughout your processing, which would quickly form a bottle
    > neck under any sort of load (holding a connection to a database is the
    > biggest waste of resource imaginable). With ADO.NET however, this doesn't
    > exist as the time you're connected to the database is minimal.
    >
    > Your objects will run several instances concurrenly if you build your
    > classes correctly. We do a lot of work that involves very very heavy
    > processing on disconnected data, and this has never proven to be a big
    > scalability problem.
    >
    > I don't believe there's any specific limit on the number of threads IIS
    > (ASP.NET) can handle - it'll just keep on adding until your processor or
    > memory resource starts to run out.
    >
    > As for configuration, there's always the odd tweak you can do, but if you
    > follow good coding practice, my guess is it'll be ok.
    >
    > Paul
    > "Boris Condarco" <> wrote in message
    > news:#...
    > > Hi,
    > >
    > > I have to develop an application, whose main feature is: read data from
    > > DataBase, do many calculations, then write back the results to the

    > DataBase,
    > > and finally show it to the user.
    > >
    > > This calculations are based on different formula, so i was thinking to
    > > develop a multithreaded Web Based application, in this order i have the
    > > following questions:
    > >
    > > Which aspects do i have to consider before, during and after the life

    > cycle
    > > of the program?
    > >
    > > How many theads can be created simultaniusly on ASP.NET?
    > >
    > > Is there any configuration file to improve the threads performace?
    > >
    > > I would really appreacite any suggestions...!
    > >
    > > Thanks in advance...
    > >
    > > Boris
    > >
    > >
    > >

    >
    >
     
    Joël, Jun 29, 2003
    #3
  4. Boris Condarco

    Paul Guest

    learn something new every day :)

    "Joël" <> wrote in message
    news:3efeabad$0$29928$...
    > Wrong. There is a limit on the number of threads ASP.NET can manage.
    > This limit is define in the machin.config file under the processmodel tag
    > using the MaxWorkerThread attribute.
    > This value can be change but above a certain value asp.net collapse.
    > So, becarefull when you decide to create more threads.
    > One solution could be to use the thread pool (ThreadPool class) in this

    case
    > you will not create more
    > thread but use the existing ones. But it's not a good idea if your task is
    > takes a lot of time.
    >
    > "Paul" <> a écrit dans le message de
    > news:0LoLa.3055$...
    > > ASP.NET will handle all of your threading for you. It's not really like

    > VB
    > > COM in that respect, basically, I think your assemblies in ASP.NET are

    > free
    > > threaded, so it'll keep going until you say stop.
    > >
    > > One of the really great things about .net, it's all disconnected. You
    > > basically connect to the database to grab your data, do your processing
    > > 'offline' so to speak, and reconnect to post your changes back to the
    > > database. In former ADO, you'd most likely of have had to stay

    connected
    > to
    > > the database throughout your processing, which would quickly form a

    bottle
    > > neck under any sort of load (holding a connection to a database is the
    > > biggest waste of resource imaginable). With ADO.NET however, this

    doesn't
    > > exist as the time you're connected to the database is minimal.
    > >
    > > Your objects will run several instances concurrenly if you build your
    > > classes correctly. We do a lot of work that involves very very heavy
    > > processing on disconnected data, and this has never proven to be a big
    > > scalability problem.
    > >
    > > I don't believe there's any specific limit on the number of threads IIS
    > > (ASP.NET) can handle - it'll just keep on adding until your processor or
    > > memory resource starts to run out.
    > >
    > > As for configuration, there's always the odd tweak you can do, but if

    you
    > > follow good coding practice, my guess is it'll be ok.
    > >
    > > Paul
    > > "Boris Condarco" <> wrote in message
    > > news:#...
    > > > Hi,
    > > >
    > > > I have to develop an application, whose main feature is: read data

    from
    > > > DataBase, do many calculations, then write back the results to the

    > > DataBase,
    > > > and finally show it to the user.
    > > >
    > > > This calculations are based on different formula, so i was thinking to
    > > > develop a multithreaded Web Based application, in this order i have

    the
    > > > following questions:
    > > >
    > > > Which aspects do i have to consider before, during and after the life

    > > cycle
    > > > of the program?
    > > >
    > > > How many theads can be created simultaniusly on ASP.NET?
    > > >
    > > > Is there any configuration file to improve the threads performace?
    > > >
    > > > I would really appreacite any suggestions...!
    > > >
    > > > Thanks in advance...
    > > >
    > > > Boris
    > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Paul, Jun 30, 2003
    #4
  5. I'm not sure from your message what you think multithreading can do for you
    in this application. You can use multithreading to run 2 or more different
    procecesses simultaneously, but from your description that isn't what you're
    after.

    HTH,

    Kevin Spencer
    Microsoft FrontPage MVP
    Internet Developer
    http://www.takempis.com
    Big things are made up of
    lots of Little things.

    "Boris Condarco" <> wrote in message
    news:%...
    > Hi,
    >
    > I have to develop an application, whose main feature is: read data from
    > DataBase, do many calculations, then write back the results to the

    DataBase,
    > and finally show it to the user.
    >
    > This calculations are based on different formula, so i was thinking to
    > develop a multithreaded Web Based application, in this order i have the
    > following questions:
    >
    > Which aspects do i have to consider before, during and after the life

    cycle
    > of the program?
    >
    > How many theads can be created simultaniusly on ASP.NET?
    >
    > Is there any configuration file to improve the threads performace?
    >
    > I would really appreacite any suggestions...!
    >
    > Thanks in advance...
    >
    > Boris
    >
    >
    >
     
    Kevin Spencer, Jun 30, 2003
    #5
  6. Thanks a lot guys for your helping me....! :)

    "Paul" <> wrote in message
    news:GMKLa.6685$...
    > learn something new every day :)
    >
    > "Joël" <> wrote in message
    > news:3efeabad$0$29928$...
    > > Wrong. There is a limit on the number of threads ASP.NET can manage.
    > > This limit is define in the machin.config file under the processmodel

    tag
    > > using the MaxWorkerThread attribute.
    > > This value can be change but above a certain value asp.net collapse.
    > > So, becarefull when you decide to create more threads.
    > > One solution could be to use the thread pool (ThreadPool class) in this

    > case
    > > you will not create more
    > > thread but use the existing ones. But it's not a good idea if your task

    is
    > > takes a lot of time.
    > >
    > > "Paul" <> a écrit dans le message de
    > > news:0LoLa.3055$...
    > > > ASP.NET will handle all of your threading for you. It's not really

    like
    > > VB
    > > > COM in that respect, basically, I think your assemblies in ASP.NET are

    > > free
    > > > threaded, so it'll keep going until you say stop.
    > > >
    > > > One of the really great things about .net, it's all disconnected. You
    > > > basically connect to the database to grab your data, do your

    processing
    > > > 'offline' so to speak, and reconnect to post your changes back to the
    > > > database. In former ADO, you'd most likely of have had to stay

    > connected
    > > to
    > > > the database throughout your processing, which would quickly form a

    > bottle
    > > > neck under any sort of load (holding a connection to a database is the
    > > > biggest waste of resource imaginable). With ADO.NET however, this

    > doesn't
    > > > exist as the time you're connected to the database is minimal.
    > > >
    > > > Your objects will run several instances concurrenly if you build your
    > > > classes correctly. We do a lot of work that involves very very heavy
    > > > processing on disconnected data, and this has never proven to be a big
    > > > scalability problem.
    > > >
    > > > I don't believe there's any specific limit on the number of threads

    IIS
    > > > (ASP.NET) can handle - it'll just keep on adding until your processor

    or
    > > > memory resource starts to run out.
    > > >
    > > > As for configuration, there's always the odd tweak you can do, but if

    > you
    > > > follow good coding practice, my guess is it'll be ok.
    > > >
    > > > Paul
    > > > "Boris Condarco" <> wrote in message
    > > > news:#...
    > > > > Hi,
    > > > >
    > > > > I have to develop an application, whose main feature is: read data

    > from
    > > > > DataBase, do many calculations, then write back the results to the
    > > > DataBase,
    > > > > and finally show it to the user.
    > > > >
    > > > > This calculations are based on different formula, so i was thinking

    to
    > > > > develop a multithreaded Web Based application, in this order i have

    > the
    > > > > following questions:
    > > > >
    > > > > Which aspects do i have to consider before, during and after the

    life
    > > > cycle
    > > > > of the program?
    > > > >
    > > > > How many theads can be created simultaniusly on ASP.NET?
    > > > >
    > > > > Is there any configuration file to improve the threads performace?
    > > > >
    > > > > I would really appreacite any suggestions...!
    > > > >
    > > > > Thanks in advance...
    > > > >
    > > > > Boris
    > > > >
    > > > >
    > > > >
    > > >
    > > >

    > >
    > >

    >
    >
     
    Boris Condarco, Jun 30, 2003
    #6
    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. Ilia
    Replies:
    6
    Views:
    3,024
    John Saunders
    Nov 4, 2003
  2. Fieldadvice

    Multithreading with HttpWebRequest

    Fieldadvice, Nov 6, 2003, in forum: ASP .Net
    Replies:
    3
    Views:
    1,369
  3. Muralidharan Ramakrishnan

    MultiThreading

    Muralidharan Ramakrishnan, Nov 10, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    422
    Kevin Spencer
    Nov 10, 2003
  4. BoomWackaBoom

    Asynchronous requests vs. multithreading

    BoomWackaBoom, Nov 14, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    651
    Alvin Bruney
    Nov 15, 2003
  5. ram
    Replies:
    1
    Views:
    481
    Sami Vaaraniemi
    Jan 14, 2004
Loading...

Share This Page