Ask a Question related to ASP.NET General, Design and Development.
-
Boris Condarco #1
Multithreading
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 Guest
-
HttpModule Multithreading and instances
I have a scenario where I log a resquest to a database table and update the request with a corresponding response including the response time. I am... -
multithreading with webservices
hello, i have this issue: i'd like to create a method which simultaneously accesses 6 different search engines to look for some keywords and... -
How to force/config multithreading ?
I made some tests. I made simple WebMethod with long loop. Then I run 5 instances of my client application. Each of them called mentioned... -
multithreading?
How can I get started with multithreading in PHP? I have searched google etc, but it didnt turn much up. Thanks -
Segmantation fault with multithreading
I have a multithrading program(daemon server) written by c++(GCC) under AIX4.X, I get segmentation fault problem when it runs several hours with... -
Paul #2
Re: Multithreading
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" <bcondarco@sbef.gov.bo> wrote in message
news:#6L17ebPDHA.1612@TK2MSFTNGP11.phx.gbl...DataBase,> Hi,
>
> I have to develop an application, whose main feature is: read data from
> DataBase, do many calculations, then write back the results to thecycle> 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> 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 Guest
-
Joël #3
Re: Multithreading
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" <paul@nospam.ever.somewhere.com> a écrit dans le message de
news:0LoLa.3055$sh4.390669@newsfep2-win.server.ntli.net...VB> ASP.NET will handle all of your threading for you. It's not really likefree> COM in that respect, basically, I think your assemblies in ASP.NET areto> 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> 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" <bcondarco@sbef.gov.bo> wrote in message
> news:#6L17ebPDHA.1612@TK2MSFTNGP11.phx.gbl...> DataBase,> > 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> cycle> > 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>> > 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 Guest
-
Paul #4
Re: Multithreading
learn something new every day :)
"Joël" <jdescombes@netcourrier.com> wrote in message
news:3efeabad$0$29928$79c14f64@nan-newsreader-02.noos.net...case> 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 thisconnected> 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" <paul@nospam.ever.somewhere.com> a écrit dans le message de
> news:0LoLa.3055$sh4.390669@newsfep2-win.server.ntli.net...> VB> > ASP.NET will handle all of your threading for you. It's not really like> free> > COM in that respect, basically, I think your assemblies in ASP.NET are> > 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 staybottle> to> > the database throughout your processing, which would quickly form adoesn't> > neck under any sort of load (holding a connection to a database is the
> > biggest waste of resource imaginable). With ADO.NET however, thisyou> > 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 iffrom> > follow good coding practice, my guess is it'll be ok.
> >
> > Paul
> > "Boris Condarco" <bcondarco@sbef.gov.bo> wrote in message
> > news:#6L17ebPDHA.1612@TK2MSFTNGP11.phx.gbl...> > > Hi,
> > >
> > > I have to develop an application, whose main feature is: read datathe> > DataBase,> > > DataBase, do many calculations, then write back the results to the> > > 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>> > cycle> > > following questions:
> > >
> > > Which aspects do i have to consider before, during and after the life> >> > > 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 Guest
-
Kevin Spencer #5
Re: Multithreading
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
[url]http://www.takempis.com[/url]
Big things are made up of
lots of Little things.
"Boris Condarco" <bcondarco@sbef.gov.bo> wrote in message
news:%236L17ebPDHA.1612@TK2MSFTNGP11.phx.gbl...DataBase,> Hi,
>
> I have to develop an application, whose main feature is: read data from
> DataBase, do many calculations, then write back the results to thecycle> 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> 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 Guest
-
Boris Condarco #6
Re: Multithreading
Thanks a lot guys for your helping me....! :-)
"Paul" <paul@nospam.ever.somewhere.com> wrote in message
news:GMKLa.6685$sh4.672834@newsfep2-win.server.ntli.net...tag> learn something new every day :)
>
> "Joël" <jdescombes@netcourrier.com> wrote in message
> news:3efeabad$0$29928$79c14f64@nan-newsreader-02.noos.net...> > 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 processmodelis> case> > 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> > you will not create more
> > thread but use the existing ones. But it's not a good idea if your tasklike> > takes a lot of time.
> >
> > "Paul" <paul@nospam.ever.somewhere.com> a écrit dans le message de
> > news:0LoLa.3055$sh4.390669@newsfep2-win.server.ntli.net...> > > ASP.NET will handle all of your threading for you. It's not reallyprocessing> > VB> > free> > > COM in that respect, basically, I think your assemblies in ASP.NET are> > > 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 yourIIS> connected> > > '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> bottle> > to> > > the database throughout your processing, which would quickly form a> doesn't> > > neck under any sort of load (holding a connection to a database is the
> > > biggest waste of resource imaginable). With ADO.NET however, this> > > 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 threadsor> > > (ASP.NET) can handle - it'll just keep on adding until your processorto> you> > > memory resource starts to run out.
> > >
> > > As for configuration, there's always the odd tweak you can do, but if> from> > > follow good coding practice, my guess is it'll be ok.
> > >
> > > Paul
> > > "Boris Condarco" <bcondarco@sbef.gov.bo> wrote in message
> > > news:#6L17ebPDHA.1612@TK2MSFTNGP11.phx.gbl...
> > > > Hi,
> > > >
> > > > I have to develop an application, whose main feature is: read data> > > > 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 thinkinglife> the> > > > develop a multithreaded Web Based application, in this order i have> > > > following questions:
> > > >
> > > > Which aspects do i have to consider before, during and after the>> >> > > 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 Guest
-
Tormod Fjeldskår #7
Multithreading
I need a cross-platform way to execute PHP-scripts in multiple threads.
The only way I can think of is to exploit the webserver this way:
1. Store the thread's code in a separate script (e.g. thread.php)
2. Put ignore_user_abort(true) in this script
3. Make a HTTP request for thread.php to the webserver
4. Close the connection immediately
5. Continue in my initial script
Is this the most convenient way of solving the problem, or does anyone
have better solutions for this problem?
--
Tormod Fjeldskår
[email]tormod@fritidsproblemer.no[/email]
[url]http://tormod.fritidsproblemer.no/[/url]
Tormod Fjeldskår Guest
-
Chung Leong #8
Re: Multithreading
Can't think of anything better. You might want to keep the connection in
your initial script, since Apache would send a SIG_KILL to PHP, running as
CGI, when the connection gets dropped. Thread.php can use the connection as
a way to communicate its progress back to the initial script. Something like
this:
$thread = fopen("http://localhost/thread.php", "r");
while($s = fgets($thread, 1024)) {
// do some reporting
}
// thread.php is done
Uzytkownik "Tormod Fjeldskår" <to-fje@online.no> napisal w wiadomosci
news:lZlzb.3351$Y06.59986@news4.e.nsc.no...> I need a cross-platform way to execute PHP-scripts in multiple threads.
> The only way I can think of is to exploit the webserver this way:
>
> 1. Store the thread's code in a separate script (e.g. thread.php)
> 2. Put ignore_user_abort(true) in this script
> 3. Make a HTTP request for thread.php to the webserver
> 4. Close the connection immediately
> 5. Continue in my initial script
>
> Is this the most convenient way of solving the problem, or does anyone
> have better solutions for this problem?
>
> --
> Tormod Fjeldskår
> [email]tormod@fritidsproblemer.no[/email]
> [url]http://tormod.fritidsproblemer.no/[/url]
Chung Leong Guest



Reply With Quote

