simpleweb-support Mailing List for Simple (Page 33)
Brought to you by:
niallg
You can subscribe to this list here.
2004 |
Jan
(1) |
Feb
(4) |
Mar
(2) |
Apr
(14) |
May
(22) |
Jun
(15) |
Jul
(9) |
Aug
(2) |
Sep
(7) |
Oct
(4) |
Nov
(2) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(7) |
Feb
(16) |
Mar
(17) |
Apr
|
May
(12) |
Jun
(4) |
Jul
(22) |
Aug
(50) |
Sep
(8) |
Oct
(23) |
Nov
(9) |
Dec
(50) |
2006 |
Jan
(6) |
Feb
(7) |
Mar
(8) |
Apr
(3) |
May
(13) |
Jun
(4) |
Jul
(2) |
Aug
|
Sep
(1) |
Oct
|
Nov
(6) |
Dec
(7) |
2007 |
Jan
(11) |
Feb
(3) |
Mar
(17) |
Apr
(21) |
May
(9) |
Jun
(4) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(8) |
Nov
(14) |
Dec
(3) |
2008 |
Jan
(3) |
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
(4) |
Aug
(4) |
Sep
(15) |
Oct
(9) |
Nov
(6) |
Dec
(2) |
2009 |
Jan
(29) |
Feb
(2) |
Mar
(8) |
Apr
(14) |
May
(4) |
Jun
(13) |
Jul
(5) |
Aug
|
Sep
|
Oct
(4) |
Nov
(3) |
Dec
(7) |
2010 |
Jan
|
Feb
(2) |
Mar
(61) |
Apr
(9) |
May
(10) |
Jun
(9) |
Jul
(10) |
Aug
(7) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
(3) |
2011 |
Jan
(11) |
Feb
|
Mar
|
Apr
(2) |
May
|
Jun
|
Jul
(3) |
Aug
|
Sep
(4) |
Oct
|
Nov
(6) |
Dec
(9) |
2012 |
Jan
|
Feb
(1) |
Mar
(2) |
Apr
(3) |
May
(2) |
Jun
|
Jul
(17) |
Aug
|
Sep
|
Oct
|
Nov
(10) |
Dec
(5) |
2013 |
Jan
(2) |
Feb
(4) |
Mar
|
Apr
(12) |
May
|
Jun
(5) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(3) |
Dec
(1) |
2014 |
Jan
|
Feb
(2) |
Mar
(6) |
Apr
|
May
|
Jun
(20) |
Jul
(12) |
Aug
(4) |
Sep
(3) |
Oct
(5) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2017 |
Jan
|
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David F. <da...@da...> - 2004-12-18 00:55:42
|
Hi, Thanks for Simple. I've just discovered it, and it looks like it will meet my needs quite nicely. My initial impressions are positive, but it was hard to begin to use Simple. The tutorial on the website doesn't actually have a chunk of basic working code that I could play with. The home page links to a blog entry that uses LoaderEngine to load a simple service, so that is what I started with. I got something up and running right away using LoaderEngine, but I immediately ran into a wall. My application (like most, I'd imagine) generates some of its content dynamically (using a subclass of BasicService) but also relies on some static files, such as CSS and image files. So I spent a couple of hours trying to figure out how to get LoaderEngine to work with FileEngine. It seems like this is something that ought to be really easy to do. But finally I realized that it is not. So here is my first RFE: if LoaderEngine is a preferred way of creating simple servers with Simple, then please provide a pre-build FileService subclass of BasicService that can be loaded and linked with LoaderService. Or, if you don't want to encourage newbies to use LoaderService when they first start out wiht Simple, then please provide an easy-to-find example that creates a server without using LoaderService! For my server, I first created my own ResourceEngine that mapped the URL itself and would dispatch to my own BasicResource subclass or to a Resource returned by a FileEngine. Then I realized that ProtocolHandler was just a single-line interface and I just implemented this directly and skipped the ResourceEngine step altogether. RFE #2: I was also really surprised that the LoaderEngine API requires all service classes to be loaded dynamically. For classes that are statically loaded, why not have a method to map a name to a Class object? Thats all for now. Thanks for a nice piece of software! David Flanagan |
From: Niall G. <ni...@em...> - 2004-12-13 05:32:48
|
Hi, Sorry for the delay, I replied to this about 5 or 6 weeks ago and still it = has not appeared in the mail archives. Anyway, I would like to see your pat= ch. My guess is that the best way to do this would be to create a Poller su= bclass that could count the number of requests processed and close the sock= et after x number of requests have been handled. Niall ----- Original Message ----- From: "Petro, Christopher" <cp...@ve...> To: sim...@li... Subject: [Simpleweb-Support] limiting the number of requests handled per co= nnection Date: Fri, 29 Oct 2004 17:10:41 -0400 >=20 > We would like to limit the number of requests handled on a given > connection. After that, we would like the connection to be closed. After > digging around through the source, we couldn't find a way to do this. Is > there a way we didn't find? For now, we have implemented this as a patch. > I'd be happy to forward the patch along if you'd be willing to evaluate it > for inclusion in the main tree. >=20 > In case it's unclear why this is desirable, I'll explain our situation. > We have a cluster of simpleweb servers behind a hardware load balancer. > Clients connect to the cluster and execute transactions continuously (it's > not an interactive application). Because the requests run continuously, > they never time out. This results in very uneven load balancing. If > connections are periodically closed, load balancing improves > significantly. << smime.p7s >> --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Niall G. <ni...@em...> - 2004-12-13 05:29:28
|
Hi, It seems that you are using an old version of Simple. However my guess is t= hat your Context is null. Sorry for the delay in replying, there seems to b= e some problem with the sourceforge mail archives as I can remember respond= ing to this around the start of November. Niall ----- Original Message ----- From: "Jack Park" <jac...@th...> To: sim...@li... Subject: [Simpleweb-Support] Nested vm calls? Date: Sun, 31 Oct 2004 11:19:56 -0800 >=20 > It seems that you can locate a primary .vm file, but if that=20 > template parses another one, there is an opportunity to get this=20 > kind of error: >=20 > java.lang.NullPointerException > at simple.http.serve.BasicResource.process(Unknown Source) > at simple.http.serve.BasicResource.handle(Unknown Source) > at simple.http.serve.BasicResource.handle(Unknown Source) > at simple.http.serve.ResourceProcessor.handle(Unknown Source) >=20 > This template provoked that exception: >=20 > #parse("css.vm") > <html> > <body> > <h1>Portal Hello World</h1> > #set($value =3D $content.centerBody) > $value > </body> > </html> >=20 > removing parse("css.vm") eliminated the exception. > A mitigating issue may be that I am not following precisely the=20 > tutorial example. But, just asking for another template, as one can=20 > do when running velocity under a different server, seems to fail. >=20 > Any ideas? > Thanks > Jack >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: > Sybase ASE Linux Express Edition - download now for FREE > LinuxWorld Reader's Choice Award Winner for best database on Linux. > http://ads.osdn.com/?ad_id=3D5588&alloc_id=3D12065&op=3Dclick > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Niall G. <ni...@em...> - 2004-12-13 05:20:18
|
Hi, Just a comment on this topic. If you use the ProcessQueue.resize method to = reduce the number of threads this will only reduce the number of threads us= ed to process requests. I thought that it would make no sense to use a thre= ad from a thread pool for a daemon like process. For instance the cache and= session manager require threads to perform background tasks, so it is not = a good idea to occupy a thread from the thread pool permenantly for such ta= sks. I think you will find that there are about 4 daemon threads, also ther= e are about 10 poller threads and ProcessQueue.size processor threads. If y= ouy wish to reduce the number of poller threads you will need to create a P= ipelineProcessor from the PipelineProcessorFactory.getInstance. Have a look= at the JavaDoc documentation. Niall ----- Original Message ----- From: "Kevin A. Smith" <ke...@el...> To: sim...@li... Subject: RE: [Simpleweb-Support] Modifying server behavior Date: Tue, 30 Nov 2004 22:38:30 -0500 >=20 > 1) How did you make changes for limiting the number of thread? > Here's a code snippet with some initialization and error handling code > removed: >=20 > LoaderEngine engine =3D new LoaderEngine(); >=20 > // Limit thread pool size to 16? > ProcessQueue.getInstance().resize(16); >=20 > Map objects =3D new HashMap(); > // Populate map with service initialization objects > engine.load("ProxyService", ProxyService.class.getName(), objects); > engine.link("*", "ProxyService"); > ProtocolHandler handler =3D HandlerFactory.getInstance(engine); > _server =3D ConnectionFactory.getConnection(handler); > _socket =3D new ServerSocket(_port); > _server.connect(_socket); >=20 > // Also have tried it here > // ProcessQueue.getInstance().resize(16); >=20 > 2) What do you mean by "it doesn't appear to have any effect"? > I'm running my code on Gentoo Linux w/Sun's 1.5 JDK. I'm using the > command 'ps | grep java | wc -l' to count the number of threads spawned > by simpleweb. My project has two simpleweb instances listening on two > separate ports. The number returned by that command does not change > despite making the ProcessQueue call. I've tried making the call after > _server.connect() but that seems to have no effect either. >=20 > I'm pretty much convinced that I'm doing something wrong, but I'm at a > loss figuring out what it might be. >=20 > --Kevin >=20 > On Tue, 2004-11-30 at 09:30 +0700, bagas wrote: > > > 1) I'd like to be able to limit the number of threads simpleweb > > creates > > > for request processing. I've tried using the advice given here: > > > > > > > http://sourceforge.net/mailarchive/forum.php?thread_id=3D5231917&forum_= id=3D > > 38791 > > > > > but it doesn't appear to have any effect although its entirely > > possible > > > that I'm doing something wrong :) > > > > Works perfect for me (the sender of question from the URL). Thank you > > Niall. > > > > Can you elaborate on your problem : > > 1. How did you make changes for limiting the number of thread? > > 2. What do you mean by "it doesn't appear to have any effect"? Have you > > test it? How do you test it? > > > > > > > > > > ------------------------------------------------------- > > SF email is sponsored by - The IT Product Guide > > Read honest & candid reviews on hundreds of IT Products from real users. > > Discover which products truly live up to the hype. Start reading=20 > > now. http://productguide.itmanagersjournal.com/ > > _______________________________________________ > > Simpleweb-Support mailing list > > Sim...@li... > > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > >=20 >=20 >=20 > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support --=20 ___________________________________________________________ Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm |
From: Richard <wo...@iw...> - 2004-12-01 08:28:04
|
confirm 896522 |
From: Kevin A. S. <ke...@el...> - 2004-12-01 03:38:38
|
1) How did you make changes for limiting the number of thread? Here's a code snippet with some initialization and error handling code removed: LoaderEngine engine = new LoaderEngine(); // Limit thread pool size to 16? ProcessQueue.getInstance().resize(16); Map objects = new HashMap(); // Populate map with service initialization objects engine.load("ProxyService", ProxyService.class.getName(), objects); engine.link("*", "ProxyService"); ProtocolHandler handler = HandlerFactory.getInstance(engine); _server = ConnectionFactory.getConnection(handler); _socket = new ServerSocket(_port); _server.connect(_socket); // Also have tried it here // ProcessQueue.getInstance().resize(16); 2) What do you mean by "it doesn't appear to have any effect"? I'm running my code on Gentoo Linux w/Sun's 1.5 JDK. I'm using the command 'ps | grep java | wc -l' to count the number of threads spawned by simpleweb. My project has two simpleweb instances listening on two separate ports. The number returned by that command does not change despite making the ProcessQueue call. I've tried making the call after _server.connect() but that seems to have no effect either. I'm pretty much convinced that I'm doing something wrong, but I'm at a loss figuring out what it might be. --Kevin On Tue, 2004-11-30 at 09:30 +0700, bagas wrote: > > 1) I'd like to be able to limit the number of threads simpleweb > creates > > for request processing. I've tried using the advice given here: > > > > http://sourceforge.net/mailarchive/forum.php?thread_id=5231917&forum_id= > 38791 > > > but it doesn't appear to have any effect although its entirely > possible > > that I'm doing something wrong :) > > Works perfect for me (the sender of question from the URL). Thank you > Niall. > > Can you elaborate on your problem : > 1. How did you make changes for limiting the number of thread? > 2. What do you mean by "it doesn't appear to have any effect"? Have you > test it? How do you test it? > > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: bagas <ba...@in...> - 2004-11-30 02:32:17
|
> 1) I'd like to be able to limit the number of threads simpleweb creates > for request processing. I've tried using the advice given here: > http://sourceforge.net/mailarchive/forum.php?thread_id=5231917&forum_id= 38791 > but it doesn't appear to have any effect although its entirely possible > that I'm doing something wrong :) Works perfect for me (the sender of question from the URL). Thank you Niall. Can you elaborate on your problem : 1. How did you make changes for limiting the number of thread? 2. What do you mean by "it doesn't appear to have any effect"? Have you test it? How do you test it? |
From: Kevin A. S. <ke...@el...> - 2004-11-29 20:26:58
|
I'm using simpleweb for a HTTP proxy project and so far, simpleweb has been superb to use. My thanks to Niall for creating an immensely useful library. I need to modify the simpleweb server behavior in two ways: 1) I'd like to be able to limit the number of threads simpleweb creates for request processing. I've tried using the advice given here: http://sourceforge.net/mailarchive/forum.php?thread_id=5231917&forum_id=38791 but it doesn't appear to have any effect although its entirely possible that I'm doing something wrong :) 2) Is there a graceful way to shutdown simpleweb? I remember reading in the archives that this was being considered for a future release. I'm currently using a JVM shutdown hook, but I'd like something more finely grained. I'd be willing to investigate this further, if it would help. Lastly, I've attached a patch which (I think) fixes a couple of variable name shadowing bugs. The patch should apply cleanly against current CVS. --Kevin |
From: Jack P. <jac...@th...> - 2004-10-31 19:35:36
|
The entirety of simple.http.session is missing. This renders the two tutorial chapters on session management useless. What happened? Jack |
From: Jack P. <jac...@th...> - 2004-10-31 19:19:57
|
It seems that you can locate a primary .vm file, but if that template parses another one, there is an opportunity to get this kind of error: java.lang.NullPointerException at simple.http.serve.BasicResource.process(Unknown Source) at simple.http.serve.BasicResource.handle(Unknown Source) at simple.http.serve.BasicResource.handle(Unknown Source) at simple.http.serve.ResourceProcessor.handle(Unknown Source) This template provoked that exception: #parse("css.vm") <html> <body> <h1>Portal Hello World</h1> #set($value = $content.centerBody) $value </body> </html> removing parse("css.vm") eliminated the exception. A mitigating issue may be that I am not following precisely the tutorial example. But, just asking for another template, as one can do when running velocity under a different server, seems to fail. Any ideas? Thanks Jack |
From: Jack P. <jac...@th...> - 2004-10-29 23:32:35
|
I actually succeeded :) in duplicating the template sample. That illustrated using a URL that included the class, e.g. http://localhost:8080/TemplateController.class I would now like to migrate that idea to fire against URLs which look like this: http://localhost:8080/portal/somepage.html or http://localhost:8080/blog/someotherpage.html I'm presently guessing (I'm brand new to this puppy!) that I'll need a different Context, something besides FileContext. I am imagining letting "portal" or "blog" be a template selector. Any hints would be greatly appreciated. Maybe a whole template-based portal example, if there is one. I'd rather not use Mamba because of its GPL license, unless that moves to LGPL along with SimpleWeb. Thanks Jack |
From: Petro, C. <cp...@ve...> - 2004-10-29 21:10:47
|
We would like to limit the number of requests handled on a given connection. After that, we would like the connection to be closed. After digging around through the source, we couldn't find a way to do this. Is there a way we didn't find? For now, we have implemented this as a patch. I'd be happy to forward the patch along if you'd be willing to evaluate it for inclusion in the main tree. In case it's unclear why this is desirable, I'll explain our situation. We have a cluster of simpleweb servers behind a hardware load balancer. Clients connect to the cluster and execute transactions continuously (it's not an interactive application). Because the requests run continuously, they never time out. This results in very uneven load balancing. If connections are periodically closed, load balancing improves significantly. |
From: Niall G. <nia...@an...> - 2004-09-30 11:31:07
|
Hi All I have recently released version 2.5.2. This release contains some major performance enhancements and has a more efficient memory model, it also contains some bug fixes. It can be downloaded at: http://simpleweb.sourceforge.net/download/2.5.2/ Niall |
From: Niall G. <nia...@an...> - 2004-09-16 10:39:02
|
Hi Tian, > 1.Firstly, we will use the web server in an embedded system. Can Simple= web=20 > server run in the embedded system, such as VxWroks, Embed Linux? I think the question here is can Java 1.4.x be embedded into the system your are choosing. Simple must have a JDK 1.4 Java Virtual Machine to run. There are several commercial embeddable JVM's that Simple will work with. > 2.Secondly, we will use chroot jail to enhance the security. Can Simple= web=20 > server support chroot jail? Yes! > 3.We can pay money for the service. But would you provide the service t= o=20 > customize the web server according to our necessary and maintain the we= b=20 > server? What's the price? If you decide to use it I can do some development work ? > 4.Can you give me a detail features list of Simple web server? Or pleas= e=20 > check the following feature list. Thank you very much. Below I have filled out the feature list. However, I think that you will find that with most embeddable HTTP servers the feature set is quite small as it is a trade off between size and support for various features. I will give your a short overview of the plus points. 1) Very high performance under heavy load 2) Can leverage the Java platform and API's 3) Highly modular in design 4) Extensible throughout=20 6) Well documented 7) Open source 8) Robust HTTP handling 9) Scales very well 10) Very simple to configure 11) Supports a high level of concurrency 12) Efficient memory model 13) LGPL 14) Strict compliance to RFC's 2616, 2617, 2109, 2396, 2279 15) Very few bugs On the down side. 1) It requires a JVM 1.4.x or above 2) It provides a small core set of features =20 > Feature List:(For native support feature, input (Y)es; Support via=20 > third-party product, input (3)rd; Not support, input (N)o). > =20 > Part I. Core Technology > (Y)HTTP/1.1 =E3=80=80 > (Y)KeepAlives=E3=80=80 > (Y)Pipelining=E3=80=80 > (Y)Templated web site > (Y)reconfiguration without restart > (Y)On-demand web site deployment > (Y)High scalability process model > (Y)Linear SMP scalability > (Y)Configurable log format > (Y)Customisable error pages > (Y)Dynamic log rotation > (N)Bandwidth throttling > (Y)Basic Server-Parsed HTML (SSI) > (Y)Dynamically-generated SSI > (N)Automated self-diagnostics > (Y)Multiple logs=E3=80=80 > (Y)Virtual servers > (Y)embedded in other applications=20 > (Y)extensible > (Y)modularity > (Y)J2EE 1.4 support > (Y)IPv6 support=E3=80=80 > =20 > Part II. Security > (3)SSL v2 and v3 > (3)SSL(hardware) > (3)SSL certificate management > (3)Clustered SSL certificate deployment > (N)Antivirus > (3)ActiveDirectory authentication > (N)Antispam > (N)Built-in firewall=20 > (3)LDAP authentication > (Y)Anti-Denial-of-Service protection > (Y)HTTP request filtering > (Y)Malformed HTTP header protection > (N)Integrated attack monitoring and logging > (N)Hardware crypto support > (N)IP address authentication > (N)DNS name authentication > (Y)User-based authentication > (N)Referrer-based authentication > (Y)Basic Authentication > (3)Other/system authentication > =E3=80=80 > Part III. Management > (N)GUI Setup > (N)GUI configurate > (N)Web-based user interface > (Y)remote management > (N)WebDAV support=20 > (N)Clustered web site management > (N)Group-based web site configuration > (N)Integrated licence management > (N)Configuration wizards > (N)Scriptable (command-line) configuration tools > (N)Real-time web-based statistics > (N)SNMP monitoring > (N)Delegated user management (htaccess) > (N)Scalable subserver support > =E3=80=80 > Part IV. Application Support > (N)NSAPI > (N)ISAPI filters > (N)ISAPI extensions > (3)FastCGI > (3)CGI > (3)Generic FastCGI/CGI handler > (3)Secure CGI sandboxing > (3)Limit CGIs by CPU or memory use > (Y)LDAP > (Y)XML support > (Y)SOAP > (Y)Request rewriting > (Y)Own API > (3)Own scripting/batch language > (N)WAR file support=20 > (Y)Content filters=20 > (N)HTTP (Gzip) Compression=20 > (N)Perl > (N)Servlet > (N)JSP > (N)ASP/ESP > (N)Secure setuid PHP > (N)PHP > =20 >=20 > Part V. Support > (N)commercial support > (Y)MailList > (Y)Forum > (N)Free telephone > (N)24x7 support > (N)GSA scheduled > (Y)FAQ > (Y)Tutorial > (Y)Document > (Y)Source code > =20 > Thank you very much! > =20 > Best regard > Tian Wenqiang Niall |
From: Tian W. <tia...@ho...> - 2004-09-16 09:23:07
|
Hi, We are developing an embedded system. We need install a web server in our system. We got some information about Simple web server, but it is not enough for us to decide which web server we should use. Would you please give me some detail information of Simple web server? 1.Firstly, we will use the web server in an embedded system. Can Simple web server run in the embedded system, such as VxWroks, Embed Linux? 2.Secondly, we will use chroot jail to enhance the security. Can Simple web server support chroot jail? 3.We can pay money for the service. But would you provide the service to customize the web server according to our necessary and maintain the web server? What's the price? 4.Can you give me a detail features list of Simple web server? Or please check the following feature list. Thank you very much. Feature List:(For native support feature, input (Y)es; Support via third-party product, input (3)rd; Not support, input (N)o). Part I. Core Technology ()HTTP/1.1 ()KeepAlives ()Pipelining ()Templated web site ()reconfiguration without restart ()On-demand web site deployment ()High scalability process model ()Linear SMP scalability ()Configurable log format ()Customisable error pages ()Dynamic log rotation ()Bandwidth throttling ()Basic Server-Parsed HTML (SSI) ()Dynamically-generated SSI ()Automated self-diagnostics ()Multiple logs ()Virtual servers ()embedded in other applications ()extensible ()modularity ()J2EE 1.4 support ()IPv6 support Part II. Security ()SSL v2 and v3 ()SSL(hardware) ()SSL certificate management ()Clustered SSL certificate deployment ()Antivirus ()ActiveDirectory authentication ()Antispam ()Built-in firewall ()LDAP authentication ()Anti-Denial-of-Service protection ()HTTP request filtering ()Malformed HTTP header protection ()Integrated attack monitoring and logging ()Hardware crypto support ()IP address authentication ()DNS name authentication ()User-based authentication ()Referrer-based authentication ()Basic Authentication ()Other/system authentication Part III. Management ()GUI Setup ()GUI configurate ()Web-based user interface ()remote management ()WebDAV support ()Clustered web site management ()Group-based web site configuration ()Integrated licence management ()Configuration wizards ()Scriptable (command-line) configuration tools ()Real-time web-based statistics ()SNMP monitoring ()Delegated user management (htaccess) ()Scalable subserver support Part IV. Application Support ()NSAPI ()ISAPI filters ()ISAPI extensions ()FastCGI ()CGI ()Generic FastCGI/CGI handler ()Secure CGI sandboxing ()Limit CGIs by CPU or memory use ()LDAP ()XML support ()SOAP ()Request rewriting ()Own API ()Own scripting/batch language ()WAR file support ()Content filters ()HTTP (Gzip) Compression ()Perl ()Servlet ()JSP ()ASP/ESP ()Secure setuid PHP ()PHP Part V. Support ()commercial support ()MailList ()Forum ()Free telephone ()24x7 support ()GSA scheduled ()FAQ ()Tutorial ()Document ()Source code Thank you very much! Best regard Tian Wenqiang _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn |
From: Niall G. <nia...@an...> - 2004-09-09 13:31:28
|
Hi Kenneth, > How do we shutdown a simpleweb http server? The way to stop accepting connections is to close the ServerSocket that was used in the Connection.connect to start the server. For now this will only stop accepting of connections, I am currently working on a scheme to gracefully shutdown the server completely. For now your best bet is probably System.exit. Niall |
From: Kenneth F. <ke...@ne...> - 2004-09-08 16:04:22
|
How do we shutdown a simpleweb http server? The example shows how to start a server, but not how to shutdown and = stop accepting connections... Regards Kenneth |
From: Niall G. <nia...@an...> - 2004-09-01 09:19:09
|
Hi Christophe, > I try to share a service between multiple connections: > > Connection connection = ConnectionFactory.getConnection(handler > for (int i=_fromPort; i<=_toPort; ++i) { > _logger.debug("starting socket on port: ["+i+"]"); > connection.connect(new ServerSocket(i)); > } > > It seems to work fine. > I just wonder how I can know the port from the service. It's possible to get > the IPAddress: > > public void process(Request req, Response resp) throws Exception { > req.getInetAddress(); > ... > } > > But can I also get the port? To get the port number you can implement a PipelineFactory like so. public class MyPipelineFactory implements PipelineFactory { public Pipeline getInstance(Socket sock) { Pipeline pipe = new Pipeline(sock); pipe.setAttribute("port", new Integer(sock.getPort())); pipe.setAttribute("localPort", new Integer(sock.getLocalPort())); pipe.setAttribute("socket", sock); return pipe; } } Now to create the connection..... PipelineFactory fac = new MyPipelineFactory(); Connection con = ConnectionFactory.getConnection(handler, fac); Now to retrieve the port from the Request..... public class MyService extends BasicService { public void process(Request req, Response resp) throws Exception { Attributes attrs = req.getAttributes(); Integer port = (Integer)attrs.getAttribute("port"); Integer localPort = (Integer)attrs.getAttribute("localPort"); // etc ... } } |
From: Niall G. <nia...@an...> - 2004-09-01 09:11:01
|
Hi Petro, > When a client connects to the simple server, the socket is closed 5 > seconds later if no request is received. By default this is done to keep the resource consumption low when the server is very heavily loaded. To increase the duration the Poller can remain active you must configure a PipelineHandler like so. ProtocolHandler server = new MyProtocolHandler(); PipelineHandler handler = PipelineHandlerFactory.getInstance(server, 10, 5000); Connection con = ConnectionFactory.getConnection(handler); In the above statement I am creating a PipelineHandler that uses 10 Poller objects to poll incoming connections, these Pollers will be idle for no longer than 5 seconds. By default a Poller will only ever be idle for 1 second. One thing to note is that if you set the maximum idle time for Poller objects to 5 seconds or more you will experience a noticeable delay before a response is sent by the server, this is because the Poller responsible for the connection may be in a wait queue for up to the maximum idle time, regardless of the load on the server. An alternative, which I use when using HTTP Basic Authentication and SSL is to use a special Poller implementation called the GranularPoller. You must have Simple 2.4.2 or above. To use this poller the system property simple.http.poller must be set to simple.http.GranularPoller, try this: java -Dsimple.http.poller=simple.http.GranularPoller With this you will not need to create a custom PipelineHandler as this will perform a much larger number of poll iterations. Hope this helps, Niall |
From: Petro, C. <cp...@ve...> - 2004-08-31 20:29:00
|
When a client connects to the simple server, the socket is closed 5 seconds later if no request is received. Some of our clients are running with high loads and do not manage to send their request this quickly. I dug through the code and found the hard-coded backoff tables in the Pollers, but none of the Pollers have timeout as short as 5 seconds. Is there some other place in the code where this timeout is being implemented? Is it possible to disable or alter it? Thanks. [I apologize in advance if this email shows up adorned with useless attachments. I don't have a choice about email clients.] |
From: Christophe R. <cr...@ac...> - 2004-08-31 18:46:20
|
I try to share a service between multiple connections: Connection connection = ConnectionFactory.getConnection(handler for (int i=_fromPort; i<=_toPort; ++i) { _logger.debug("starting socket on port: ["+i+"]"); connection.connect(new ServerSocket(i)); } It seems to work fine. I just wonder how I can know the port from the service. It's possible to get the IPAddress: public void process(Request req, Response resp) throws Exception { req.getInetAddress(); ... } But can I also get the port? Christophe |
From: Niall G. <nia...@an...> - 2004-07-30 08:52:32
|
Hi, > Server.connection =3D new Connection(new > MySocketHandler(PipelineHandlerFactory.getInstance(new > ServerHandler(),100,1000), new BufferedPipelineFactory(256))); Here you are setting the number of poller threads to 100 and ensuring that the maximum scheduling duration of a poller to 1 second. =20 > From the code you could see that I am going to have 100 concurrent > Thread to handle requests =E2=80=A6.. (Am I right?) You will have 100 concurrent poller threads. > I currently running a test which concurrently requested 72 message to > Simple Webserver =E2=80=A6. But when I check how many concurrent Thread= it > stucks on 10 Concurrent threads although my program that send http > request to the Simple Webserver is reaching 72 concurrent threads. To increase the number of processing threads to 100 you must do this. simple.util.process.ProcessQueue queue =3D ProcessQueue.getInstance(); queue.resize(100); This will ensure that you are using 100 processing threads. Regards Niall |
From: bagas <ba...@in...> - 2004-07-30 04:20:32
|
Hi All, I use Simple Webserver like this : Server.connection = new Connection(new MySocketHandler(PipelineHandlerFactory.getInstance(new ServerHandler(),100,1000), new BufferedPipelineFactory(256))); From the code you could see that I am going to have 100 concurrent Thread to handle requests ... (Am I right?) I currently running a test which concurrently requested 72 message to Simple Webserver .. But when I check how many concurrent Thread it stucks on 10 Concurrent threads although my program that send http request to the Simple Webserver is reaching 72 concurrent threads. My ServerHandler is looking like this : public class ServerHandler implements ProtocolHandler { static int threadUsed = 0; public void handle(Request req, Response resp) { try { threadUsed++; System.out.println("Concurrent Threads = " + threadUsed); // Max it only prints "Concurrent Threads = 10" // OTHER CODE Thread.sleep(//a long time); // OTHER CODE } finally { threadUsed--; } } } Thank You, |
From: Niall G. <nia...@an...> - 2004-07-27 08:32:16
|
Hi, Typically what is done to shut it down is to close the ServerSocket used to establish the Connection. However, at the moment there will still be lingering threads from various components. My intention is to set all threads to daemon threads except the one responsible for listening for incoming connections. At the moment shutting down Simple is not as clean as it should be, ill deal with this in the next release. Niall On Tue, 2004-07-27 at 04:51, masukomi wrote: > I'm embedding Simple in an app and need to know the appropriate way to > shut it down so that the socket it's listening on closes appropriately. > I found lits of info on starting it up but nothing on shutting it down. > > > -Kate Rhodes > Open source consultant & Java developer > http://www.masukomi.org > > > > ------------------------------------------------------- > This SF.Net email is sponsored by BEA Weblogic Workshop > FREE Java Enterprise J2EE developer tools! > Get your free copy of BEA WebLogic Workshop 8.1 today. > http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: masukomi <mas...@ma...> - 2004-07-27 03:53:26
|
I'm embedding Simple in an app and need to know the appropriate way to shut it down so that the socket it's listening on closes appropriately. I found lits of info on starting it up but nothing on shutting it down. -Kate Rhodes Open source consultant & Java developer http://www.masukomi.org |