Controlling requests in HTTPServer

Discussion of ideas for features and new projects based on POCO.
pswin
Posts: 6
Joined: 23 Nov 2015, 09:05

Controlling requests in HTTPServer

Postby pswin » 27 Nov 2015, 15:22

As I know, Poco creates a Thread for each request in HTTPSrver, but the point is, if for any reasons created thread fails or crashes , whole server will crash. Using forks in Linux or other Unix based operating systems could deal with this problem and only child process will crash, thus, If Poco add a facility to control new requests as process or thread in run-time could help programmers to develop more reliable applications.

alex
Posts: 1375
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Controlling requests in HTTPServer

Postby alex » 27 Nov 2015, 21:40

According to this logic, there should be no threads at all because they may crash? While there are many downsides of threads, the problem here is crashing, not threads.

pswin
Posts: 6
Joined: 23 Nov 2015, 09:05

Re: Controlling requests in HTTPServer

Postby pswin » 27 Nov 2015, 23:21

Yes, problem is crashing and you can simply control it by forking current app. I suppose, it would be better than than crashing whole system. developer can choose to handle a request by thread or by a process. On the other hand, you will have much more options when you are forking an app. For example, if you had a 32bit operating system (with enabled PAE) you would access more memory for running a task, which means you are not limited to the parents 4GB memory space (with lots of tasks in a busy server) and etc.

gregee123
Posts: 89
Joined: 29 Mar 2013, 12:11

Re: Controlling requests in HTTPServer

Postby gregee123 » 27 Nov 2015, 23:34

32bit operating system on a server?? What year do we have?

Perhaps you should write your connection handlers in a way that doesn't crash while handling a request instead of asking for a library that would allow the server to continue operating despite your buggy core crashing?
currently using: 1.6.0

pswin
Posts: 6
Joined: 23 Nov 2015, 09:05

Re: Controlling requests in HTTPServer

Postby pswin » 27 Nov 2015, 23:57

OK, Have you ever seen architectures that only support 32bit operations? or embedded system such as Cubiboard and ...?. It isn't a good idea to choose a default for your destination OS or architecture. If you are claiming it, you developed a CROSS PLATFORM LIBRARY

alex
Posts: 1375
Joined: 11 Jul 2006, 16:27
Location: United_States

Re: Controlling requests in HTTPServer

Postby alex » 28 Nov 2015, 02:45

I'm sorry, but your comments and proposals make no sense; yes, we are cross-platform and yes, we support 32 and 64-bit architectures; but we do not cater to our user's bugs such as crashing - if your application built on poco is crashing due to the bug in your code, then the problem is in the application not in poco; accordingly, the problem should be addressed in application. If you want to fork your application, there is Process class for that.

richardjews
Posts: 2
Joined: 28 Aug 2017, 12:38
Contact:

Re: Controlling requests in HTTPServer

Postby richardjews » 06 Oct 2017, 14:42

The server are mostly stuck so how can you controlling and sending request. SizeGenetics reviews


Return to “Wishlist”

Who is online

Users browsing this forum: No registered users and 1 guest

cron