digitalmars.D - Shouldn't assert declarations be seen in documentation?
- tcak (13/13) May 12 2015 I am developing a web server - web application system, and it is
- John Colvin (3/16) May 12 2015 In my opinion they should be in "in" contracts and documented,
- Rikki Cattermole (3/14) May 12 2015 Just out of interest, is said web server meant to be comparable to e.g.
- tcak (10/34) May 12 2015 Yes. Web server and application are running separately. Web
- Rikki Cattermole (3/27) May 12 2015 I'm also working on a web server[0] hence why I'm asking.
- tcak (8/55) May 12 2015 I do not want to change the topic of first post though, how
- Rikki Cattermole (5/47) May 12 2015 I haven't yet got to FastCGI support. Since getting the module system
I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.
May 12 2015
On Tuesday, 12 May 2015 at 10:40:48 UTC, tcak wrote:I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.In my opinion they should be in "in" contracts and documented, yes.
May 12 2015
On 12/05/2015 10:40 p.m., tcak wrote:I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.Just out of interest, is said web server meant to be comparable to e.g. Apache httpd?
May 12 2015
On Tuesday, 12 May 2015 at 10:58:08 UTC, Rikki Cattermole wrote:On 12/05/2015 10:40 p.m., tcak wrote:Yes. Web server and application are running separately. Web server is parsing request message, and by using host, determining which web application to route the request. Web application gets the request, does extra parsing like query, path, cookies, etc. and sends response message back to web server, and it sends those messages back to client. I am using shared memory, and named pipe for these to be able to increase performance as high as possible. Thus, it is relies on Posix and my mostly my own library codes.I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.Just out of interest, is said web server meant to be comparable to e.g. Apache httpd?
May 12 2015
On 12/05/2015 11:02 p.m., tcak wrote:On Tuesday, 12 May 2015 at 10:58:08 UTC, Rikki Cattermole wrote:I'm also working on a web server[0] hence why I'm asking. [0] http://github.com/dnetdev/webserverOn 12/05/2015 10:40 p.m., tcak wrote:Yes. Web server and application are running separately. Web server is parsing request message, and by using host, determining which web application to route the request. Web application gets the request, does extra parsing like query, path, cookies, etc. and sends response message back to web server, and it sends those messages back to client. I am using shared memory, and named pipe for these to be able to increase performance as high as possible. Thus, it is relies on Posix and my mostly my own library codes.I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.Just out of interest, is said web server meant to be comparable to e.g. Apache httpd?
May 12 2015
On Tuesday, 12 May 2015 at 11:14:42 UTC, Rikki Cattermole wrote:On 12/05/2015 11:02 p.m., tcak wrote:I do not want to change the topic of first post though, how exactly are you storing and passing http message to CGI, and getting response from it? Are they travelling on pipes? Because pipes are managed by kernel, I try to avoid them as much as possible. Only small messages use pipes, and the rest are on shared memory. I didn't read the FastCGI's details before, though as far as I know, CGI writes its response by using stdin.On Tuesday, 12 May 2015 at 10:58:08 UTC, Rikki Cattermole wrote:I'm also working on a web server[0] hence why I'm asking. [0] http://github.com/dnetdev/webserverOn 12/05/2015 10:40 p.m., tcak wrote:Yes. Web server and application are running separately. Web server is parsing request message, and by using host, determining which web application to route the request. Web application gets the request, does extra parsing like query, path, cookies, etc. and sends response message back to web server, and it sends those messages back to client. I am using shared memory, and named pipe for these to be able to increase performance as high as possible. Thus, it is relies on Posix and my mostly my own library codes.I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.Just out of interest, is said web server meant to be comparable to e.g. Apache httpd?
May 12 2015
On 12/05/2015 11:20 p.m., tcak wrote:On Tuesday, 12 May 2015 at 11:14:42 UTC, Rikki Cattermole wrote:I haven't yet got to FastCGI support. Since getting the module system and configuration is far more important. But yes, FastCGI requires pipes. The module system is already pretty much working btw via compiled in and shared libraries although it is pretty much untested.On 12/05/2015 11:02 p.m., tcak wrote:I do not want to change the topic of first post though, how exactly are you storing and passing http message to CGI, and getting response from it? Are they travelling on pipes? Because pipes are managed by kernel, I try to avoid them as much as possible. Only small messages use pipes, and the rest are on shared memory. I didn't read the FastCGI's details before, though as far as I know, CGI writes its response by using stdin.On Tuesday, 12 May 2015 at 10:58:08 UTC, Rikki Cattermole wrote:I'm also working on a web server[0] hence why I'm asking. [0] http://github.com/dnetdev/webserverOn 12/05/2015 10:40 p.m., tcak wrote:Yes. Web server and application are running separately. Web server is parsing request message, and by using host, determining which web application to route the request. Web application gets the request, does extra parsing like query, path, cookies, etc. and sends response message back to web server, and it sends those messages back to client. I am using shared memory, and named pipe for these to be able to increase performance as high as possible. Thus, it is relies on Posix and my mostly my own library codes.I am developing a web server - web application system, and it is going to be running on a small system that has 256MB memory at maximum. Hence, I tried to use every bit of memory without wasting, and used align(1) on a struct type. Because it is used as shared, and its internal variables are updated in time, core.atomic.atomicOp is being used. Until today, whenever I tried to update variables with atomicOp, running thread was basically returning from that point like nothing happened. After long debugging, I finally saw that thread has given AssertError with a line number. There wasn't any information about what was going on. I went to core.atomic file, and found out that (not on the given line number), variables should be properly aligned to use atomicOp.Just out of interest, is said web server meant to be comparable to e.g. Apache httpd?
May 12 2015