simpleweb-support Mailing List for Simple (Page 16)
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: lyo <liy...@ho...> - 2009-01-03 03:08:52
|
Hi friends: I do it by using ThreadDumper.java(in the dir: simple-4.0.6\test\src\org\simpleframework\http\core).But the server thread remain not shutdown immediately.I means there is an javaw.exe in my windows process.My code is: //////////////////// java code ////////////////// public class TestSimpleServer implements Container { private static final Log log = LogFactory.getLog(TestSimpleServer.class); static ContainerServer processor =null; static Connection connection = null; static Server server = null; static private ThreadDumper threadDumper; /** * @param args */ public static void main(String[] args)throws Exception { // TODO Auto-generated method stub Container container = new TestSimpleServer(); server = new ContainerServer(container, 10);//what does the 10 mean? my server should be connected by 1000 clients. connection = new SocketConnection(server); SocketAddress address = new InetSocketAddress(8080); connection.connect(address); threadDumper = new ThreadDumper(60000); // dump threads every minute threadDumper.start(); } public void handle(Request arg0, Response response) { log.info("### Enter hendle"); String param; try { param = arg0.getParameter("id"); log.info(">>> param:"+param); if("s".equals(param)){ // if client send parameter "s",then the server shutdown! connection.close(); server.stop(); threadDumper.kill(); }else{ PrintStream body=null; body = response.getPrintStream(); long time = System.currentTimeMillis(); response.set("Content-Type", "text/html"); response.set("Server", "HelloWorld/1.0 (Simple 4.0)"); response.setDate("Date", time); response.setDate("Last-Modified", time); body.println("<font color='red'>Test it</font>"); body.close(); } } catch (Exception e) { e.printStackTrace(); } } } ///////////////// end //////////////////////// I don't want to keep an javaw.exe in my windows process :( . So what should I do?Thks! ----- Original Message ----- From: lyo To: gal...@ya... ; sim...@li... Sent: Saturday, January 03, 2009 2:37 AM Subject: hello,please help me! (sourceforge form) hello: I don't know how to reply this thread:http://sourceforge.net/mailarchive/message.php?msg_name=266712.48202.qm%40web36702.mail.mud.yahoo.com So I send this email to you. I stop server in your way: /////////////// java code ////////////////// Container container = new TestSimpleServer(); Server server = new ContainerServer(container, 10); Connection connection = new SocketConnection(server); SocketAddress address = new InetSocketAddress(8080); connection.connect(address); connection.close(); server.stop(); /////////////////////////////////////////// but the server throws Exception: //////////////////////////////////////////////// java.nio.channels.ClosedChannelException at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:130) at org.simpleframework.http.connect.Acceptor.accept(Acceptor.java:147) at org.simpleframework.http.connect.Acceptor.run(Acceptor.java:104) at org.simpleframework.util.select.SelectEvent.run(SelectEvent.java:74) at org.simpleframework.util.thread.DirectExecutor.execute(DirectExecutor.java:43) at org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:386) at org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:365) at org.simpleframework.util.select.EventDistributor.distribute(EventDistributor.java:342) at org.simpleframework.util.select.EventDistributor.run(EventDistributor.java:150) ////////////////////////////////////////////////// And the server don't stop. What should I do? |
From: Niall G. <gal...@ya...> - 2009-01-02 19:40:59
|
Hi, This exception is not thrown from either Connection.close() or Server.stop(). It just means that a client is trying to connect during your shutdown. You should ignore it. After your stop what does the thread dump of the server look like? If you like make use of the following class to see the threads that remain active. http://svn.sourceforge.net/viewvc/simpleweb/trunk/src/test/java/org/simpleframework/http/core/ThreadDumper.java?view=markup It will periodically dump the thread state of the server. Niall --- On Fri, 1/2/09, lyo <liy...@ho...> wrote: > From: lyo <liy...@ho...> > Subject: [Simpleweb-Support] hello,please help me! (sourceforge form) > To: gal...@ya..., sim...@li... > Date: Friday, January 2, 2009, 10:37 AM > hello: > > I don't know how to reply this > thread:http://sourceforge.net/mailarchive/message.php?msg_name=266712.48202.qm%40web36702.mail.mud.yahoo.com > So I send this email to you. I stop server in your way: > /////////////// java code ////////////////// > Container container = new TestSimpleServer(); > Server server = new ContainerServer(container, 10); > Connection connection = new SocketConnection(server); > SocketAddress address = new InetSocketAddress(8080); > > connection.connect(address); > connection.close(); > server.stop(); > > /////////////////////////////////////////// > > but the server throws Exception: > //////////////////////////////////////////////// > java.nio.channels.ClosedChannelException > at > sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:130) > at > org.simpleframework.http.connect.Acceptor.accept(Acceptor.java:147) > at > org.simpleframework.http.connect.Acceptor.run(Acceptor.java:104) > at > org.simpleframework.util.select.SelectEvent.run(SelectEvent.java:74) > at > org.simpleframework.util.thread.DirectExecutor.execute(DirectExecutor.java:43) > at > org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:386) > at > org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:365) > at > org.simpleframework.util.select.EventDistributor.distribute(EventDistributor.java:342) > at > org.simpleframework.util.select.EventDistributor.run(EventDistributor.java:150) > ////////////////////////////////////////////////// > And the server don't stop. What should I do? > ------------------------------------------------------------------------------ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: lyo <liy...@ho...> - 2009-01-02 18:38:37
|
hello: I don't know how to reply this thread:http://sourceforge.net/mailarchive/message.php?msg_name=266712.48202.qm%40web36702.mail.mud.yahoo.com So I send this email to you. I stop server in your way: /////////////// java code ////////////////// Container container = new TestSimpleServer(); Server server = new ContainerServer(container, 10); Connection connection = new SocketConnection(server); SocketAddress address = new InetSocketAddress(8080); connection.connect(address); connection.close(); server.stop(); /////////////////////////////////////////// but the server throws Exception: //////////////////////////////////////////////// java.nio.channels.ClosedChannelException at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:130) at org.simpleframework.http.connect.Acceptor.accept(Acceptor.java:147) at org.simpleframework.http.connect.Acceptor.run(Acceptor.java:104) at org.simpleframework.util.select.SelectEvent.run(SelectEvent.java:74) at org.simpleframework.util.thread.DirectExecutor.execute(DirectExecutor.java:43) at org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:386) at org.simpleframework.util.select.EventDistributor.process(EventDistributor.java:365) at org.simpleframework.util.select.EventDistributor.distribute(EventDistributor.java:342) at org.simpleframework.util.select.EventDistributor.run(EventDistributor.java:150) ////////////////////////////////////////////////// And the server don't stop. What should I do? |
From: Niall G. <gal...@ya...> - 2008-12-28 13:54:20
|
Hi, You will need to create it like so. Container container = new EmHttpServer(); Server server = new ContainerServer(container, 10) Connection connection = new SocketConnection(server); SocketAddress address = new InetSocketAddress(8080); connection.connect(address); To stop do the following. connection.close(); server.stop(); That should do it, Niall --- On Sun, 12/28/08, lyo <liy...@ho...> wrote: > From: lyo <liy...@ho...> > Subject: [Simpleweb-Support] Help! How to stop simpleframework server? > To: sim...@li... > Date: Sunday, December 28, 2008, 3:45 AM > Hello friends: > > I want to use simpleframework as my server. But I > don't know how to stop it.I could start it by using the > following code: > //////////////////// start ////////////////////// > > public class EmHttpServer implements Container { > ...................................... > public static void startServer()throws Exception{ > Container container = new EmHttpServer(); > SocketConnection connection = new > SocketConnection(container); > SocketAddress address = new > InetSocketAddress(7070); > > connection.connect(address); > > } > //////////////////////////////////////////////// > I couldn't find any method that can stop the > server.Please help me,Thank > you!------------------------------------------------------------------------------ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: lyo <liy...@ho...> - 2008-12-28 11:47:28
|
Hello friends: I want to use simpleframework as my server. But I don't know how to stop it.I could start it by using the following code: //////////////////// start ////////////////////// public class EmHttpServer implements Container { ...................................... public static void startServer()throws Exception{ Container container = new EmHttpServer(); SocketConnection connection = new SocketConnection(container); SocketAddress address = new InetSocketAddress(7070); connection.connect(address); } //////////////////////////////////////////////// I couldn't find any method that can stop the server.Please help me,Thank you! |
From: Niall G. <gal...@ya...> - 2008-11-10 22:09:33
|
Hi, Well, don't get much time these days. But I think support for the Servlet API is important in order to leverage the existing frameworks out there which can be difficult to refactor in to the Simple core API. Niall ----- Original Message ---- From: Carfield Yim <car...@ca...> To: Simple support and user issues <sim...@li...> Sent: Monday, November 10, 2008 6:08:09 PM Subject: Re: [Simpleweb-Support] Possible to use AJAX framework like GWT withsimple? Great!! Thanks a lot for quick update on this :-) BTW it is amazing that you in IB environment you can still find time for opensource project, I really exhaust after work... On Tue, Nov 11, 2008 at 2:04 AM, <Nia...@ub...> wrote: > Hi, > > It will be possible to use all Servlet frameworks very shortly, I am > writing a Servlet Adaptation layer at the moment. This will support > Servlet API 2.5. Currently you can download it only from Subversion, the > example servlet engine comes bundled with the Apache Wicket example WAR. > > Niall > > -----Original Message----- > From: Carfield Yim [mailto:car...@ca...] > Sent: 10 November 2008 18:01 > To: Simple support and user issues > Subject: [Simpleweb-Support] Possible to use AJAX framework like GWT > withsimple? > > Just wondering, look like most are couple with servlet API > > ------------------------------------------------------------------------ > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & > win great prizes Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. > > E-mails are not encrypted and cannot be guaranteed to be secure or > error-free as information could be intercepted, corrupted, lost, > destroyed, arrive late or incomplete, or contain viruses. The sender > therefore does not accept liability for any errors or omissions in the > contents of this message which arise as a result of e-mail transmission. > If verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities > or related financial instruments. > > UBS Limited is a company registered in England & Wales under company > number 2035362, whose registered office is at 1 Finsbury Avenue, > London, EC2M 2PP, United Kingdom. > > UBS AG (London Branch) is registered as a branch of a foreign company > under number BR004507, whose registered office is at > 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > UBS Clearing and Execution Services Limited is a company registered > in England & Wales under company number 03123037, whose registered > office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: Carfield Y. <car...@ca...> - 2008-11-10 18:08:17
|
Great!! Thanks a lot for quick update on this :-) BTW it is amazing that you in IB environment you can still find time for opensource project, I really exhaust after work... On Tue, Nov 11, 2008 at 2:04 AM, <Nia...@ub...> wrote: > Hi, > > It will be possible to use all Servlet frameworks very shortly, I am > writing a Servlet Adaptation layer at the moment. This will support > Servlet API 2.5. Currently you can download it only from Subversion, the > example servlet engine comes bundled with the Apache Wicket example WAR. > > Niall > > -----Original Message----- > From: Carfield Yim [mailto:car...@ca...] > Sent: 10 November 2008 18:01 > To: Simple support and user issues > Subject: [Simpleweb-Support] Possible to use AJAX framework like GWT > withsimple? > > Just wondering, look like most are couple with servlet API > > ------------------------------------------------------------------------ > - > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge Build the coolest Linux based applications with Moblin SDK & > win great prizes Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > Visit our website at http://www.ubs.com > > This message contains confidential information and is intended only > for the individual named. If you are not the named addressee you > should not disseminate, distribute or copy this e-mail. Please > notify the sender immediately by e-mail if you have received this > e-mail by mistake and delete this e-mail from your system. > > E-mails are not encrypted and cannot be guaranteed to be secure or > error-free as information could be intercepted, corrupted, lost, > destroyed, arrive late or incomplete, or contain viruses. The sender > therefore does not accept liability for any errors or omissions in the > contents of this message which arise as a result of e-mail transmission. > If verification is required please request a hard-copy version. This > message is provided for informational purposes and should not be > construed as a solicitation or offer to buy or sell any securities > or related financial instruments. > > UBS Limited is a company registered in England & Wales under company > number 2035362, whose registered office is at 1 Finsbury Avenue, > London, EC2M 2PP, United Kingdom. > > UBS AG (London Branch) is registered as a branch of a foreign company > under number BR004507, whose registered office is at > 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > UBS Clearing and Execution Services Limited is a company registered > in England & Wales under company number 03123037, whose registered > office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > |
From: <Nia...@ub...> - 2008-11-10 18:04:33
|
Hi, It will be possible to use all Servlet frameworks very shortly, I am writing a Servlet Adaptation layer at the moment. This will support Servlet API 2.5. Currently you can download it only from Subversion, the example servlet engine comes bundled with the Apache Wicket example WAR. Niall -----Original Message----- From: Carfield Yim [mailto:car...@ca...] Sent: 10 November 2008 18:01 To: Simple support and user issues Subject: [Simpleweb-Support] Possible to use AJAX framework like GWT withsimple? Just wondering, look like most are couple with servlet API ------------------------------------------------------------------------ - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |
From: Carfield Y. <car...@ca...> - 2008-11-10 18:00:55
|
Just wondering, look like most are couple with servlet API |
From: Jerome L. <jer...@no...> - 2008-11-10 16:00:31
|
Hi Niall, This looks very promising! I'm looking forward to upgrading to Simple 4. FYI, here is the related RFE: "Upgrade Simple to version 4.0" http://restlet.tigris.org/issues/show_bug.cgi?id=560 Restlet does provide full support for NIO, especially via the Representation class and its getChannel() and write(WritableByteChannel). Currently, only our Grizzly connector fully takes advantage of these methods (to enable direct file-to-socket transfer of static files). Regarding asynchronous support, we will definitely support this in Restlet 1.2, both server-side and client-side. See the related RFE: "Support asynchronous processing" http://restlet.tigris.org/issues/show_bug.cgi?id=143 Grizzly has support for async processing at various levels (ARP, Grizzlets) and JF Arcand recently started the Atmosphere effort: http://blogs.sun.com/theaquarium/entry/introducing_project_atmosphere Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : Nia...@ub... [mailto:Nia...@ub...] Envoyé : lundi 3 novembre 2008 09:13 À : sim...@li... Objet : Re: [Simpleweb-Support] [ANN] Restlet 1.1 released with Simpleextension Hi, That's great news. I have already partially integrated 4.0.5 in to the Restlet framework. I think you will find it much faster than both Jetty and Grizzly. From recent benchmarks I've performed its about twice as fast as Jetty. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/Apache Bench/ScalabilityApacheBench.png?revision=937&view=markup Also, looks like Jetty has some latency issues when under high load scenarios. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/Apache Bench/LatencyApacheBench.png?revision=937&view=markup And below, are the individual results as its difficult to chart them together as results have signifigant differences. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/Apache Bench/LatencyApacheBenchJetty.png?revision=937&view=markup http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/Apache Bench/LatencyApacheBenchSimple.png?revision=937&view=markup This test was performed using ApacheBench for 1,000,000 requests. I'll be adding WritableByteChannel and ReadableByteChannel adapters in the next release which should allow better performance for mapped files, which I believe Restlet makes use of. Also, a suggestion for 1.2. I've heard that RESTEasy will be adding (or at least is considering) asynchronous HTTP support in future versions. Anything like that going to be considered for the Restlet framework? Not too sure if Grizzly can support this, but in a multi-tier architecture I think you will find Simple can provide very signifigant performance gains by leveraging asynchronous events. Niall -----Original Message----- From: Jerome Louvel [mailto:jer...@no...] Sent: 31 October 2008 15:31 To: Sim...@li... Subject: [Simpleweb-Support] [ANN] Restlet 1.1 released with Simple extension Hi all, We've just released Restlet 1.1 with an updated extension for Simple 3.1. See full announce here: http://blog.noelios.com/2008/10/28/restlet-110-released/ You can see the documentation on this connector here: http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/82-restlet.html We are looking forward to upgrading to Simple 4.0, now that we can start working on Restlet 1.2. Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: <Nia...@ub...> - 2008-11-03 08:13:31
|
Hi, That's great news. I have already partially integrated 4.0.5 in to the Restlet framework. I think you will find it much faster than both Jetty and Grizzly. From recent benchmarks I've performed its about twice as fast as Jetty. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/ApacheBench/ScalabilityApacheBench.png?revision=937&view=markup Also, looks like Jetty has some latency issues when under high load scenarios. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/ApacheBench/LatencyApacheBench.png?revision=937&view=markup And below, are the individual results as its difficult to chart them together as results have signifigant differences. http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/ApacheBench/LatencyApacheBenchJetty.png?revision=937&view=markup http://svn.sourceforge.net/viewvc/simpleweb/trunk/application/Plotter/ApacheBench/LatencyApacheBenchSimple.png?revision=937&view=markup This test was performed using ApacheBench for 1,000,000 requests. I'll be adding WritableByteChannel and ReadableByteChannel adapters in the next release which should allow better performance for mapped files, which I believe Restlet makes use of. Also, a suggestion for 1.2. I've heard that RESTEasy will be adding (or at least is considering) asynchronous HTTP support in future versions. Anything like that going to be considered for the Restlet framework? Not too sure if Grizzly can support this, but in a multi-tier architecture I think you will find Simple can provide very signifigant performance gains by leveraging asynchronous events. Niall -----Original Message----- From: Jerome Louvel [mailto:jer...@no...] Sent: 31 October 2008 15:31 To: Sim...@li... Subject: [Simpleweb-Support] [ANN] Restlet 1.1 released with Simple extension Hi all, We've just released Restlet 1.1 with an updated extension for Simple 3.1. See full announce here: http://blog.noelios.com/2008/10/28/restlet-110-released/ You can see the documentation on this connector here: http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/82-restlet.html We are looking forward to upgrading to Simple 4.0, now that we can start working on Restlet 1.2. Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ Simpleweb-Support mailing list Sim...@li... https://lists.sourceforge.net/lists/listinfo/simpleweb-support Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |
From: Jerome L. <jer...@no...> - 2008-10-31 15:31:05
|
Hi all, We've just released Restlet 1.1 with an updated extension for Simple 3.1. See full announce here: http://blog.noelios.com/2008/10/28/restlet-110-released/ You can see the documentation on this connector here: http://wiki.restlet.org/docs_1.1/13-restlet/28-restlet/82-restlet.html We are looking forward to upgrading to Simple 4.0, now that we can start working on Restlet 1.2. Best regards, Jérôme Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com |
From: Agarwal, R. <rag...@ea...> - 2008-10-23 22:05:16
|
Awesome, thanks Niall. That will work. I have got the ball rolling on upgrading to 4.0.5, its just that we need to do all performance tests for our system so I cant just upgrade the version. ________________________________ From: Niall Gallagher [mailto:gal...@ya...] Sent: Thursday, October 23, 2008 11:01 AM To: Simple support and user issues Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi, PipelineFactory factory = new MyPipelineFactory(); ProtocolHandler server = new MyProtocolHandler(); PipelineHandler handler = PipelineHandlerFactory.getInstance(server); Connection connection = ConnectionFactory.getConnection(handler, factory); public class MyPipelineFactory implements PipelineFactory { pubilic Pipeline getInstance(Socket socket) { Pipeline pipeline = new BufferedPipeline(socket, 2048); pipeline.put("socket", socket); return pipeline; } } Now the request has the socket. Socket socket = (Socket)request.getAttribute("socket"); Is there any reason you are not using 4.0.5. Just as easy to do this and more performant. Niall ________________________________ From: "Agarwal, Rahul" <rag...@ea...> To: Simple support and user issues <sim...@li...> Sent: Thursday, October 23, 2008 6:41:48 PM Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi Niall, Thanks for your reply. I actually got a hold of the server side socket for the connection in the Dispatcher (Poller.sock) and using that as a key I can drive what I need to do (I wrote a small test and it looks to do what I want). However that means having to modify Simple code which I want to avoid. This is like your #2 idea. If I could get the Socket in a ProtocolHandler that would be ideal! I can create my own and add it to the chain without changing simple. When I look at Request.getAttribute, it is empty and searching the code statically I don’t see anything trying to ‘put’ anything in there either. Is it possible to get the socket in a ProtocolHandler? -Rahul ________________________________ From: Nia...@ub... [mailto:Nia...@ub...] Sent: Wednesday, October 22, 2008 11:23 PM To: sim...@li... Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi, You will notice every connectionis represented as a Pipline. Each pipeline has attributes and a Socket. So you can do one of the following. 1) When the pipeline is created add an AtomicInteger to it, each time it enters a ProtocolHandler add one to this integer keyed by some know key, when it reaches above a threshold then add a Connection: close 2) Get the server side port of the socket (or the socket itself) for the pipeline so that each time it enters a ProtocolHandler you can register a count. When the threshold has passed then add a connection close. To expose this data to the ProtocolHandler simply look at the Request.getAttribute, this takes its attributes from the Pipeline attributes, which are maintained across the lifetime of the connection. Of particular interest is the PipelineFactory. Also, just to mention, Simple 4.0.5 has been released and it uses NIO. You should find this more responsive with pretty much the same feature set. Niall ________________________________ From: Agarwal, Rahul [mailto:rag...@ea...] Sent: 22 October 2008 19:42 To: sim...@li... Subject: [Simpleweb-Support] Keep-alives and Connection close Hi folks, I have a Simple 3.1.3 integration (with Spring) where I need to add a new feature: send a connection close header after say 1000 requests from each persistent connection and keep sending it until the client opens a new connection. (some of our clients don’t respect the header). My main question is how do I know when simple starts executing a new request and how to identity if that is on a persistent connection or a new one? (How do I hook into this?) All I see are a series of ProtocolHandler getting called and adding a new handler in the chain doesn’t look to be the answer. Any suggestions on how to best tackle this in Simple? My next concern would be how not to impact performance doing this check (depends how I hook in). Thanks Rahul |
From: Niall G. <gal...@ya...> - 2008-10-23 18:01:15
|
Hi, PipelineFactory factory = new MyPipelineFactory(); ProtocolHandler server = new MyProtocolHandler(); PipelineHandler handler = PipelineHandlerFactory.getInstance(server); Connection connection = ConnectionFactory.getConnection(handler, factory); public class MyPipelineFactory implements PipelineFactory { pubilic Pipeline getInstance(Socket socket) { Pipeline pipeline = new BufferedPipeline(socket, 2048); pipeline.put("socket", socket); return pipeline; } } Now the request has the socket. Socket socket = (Socket)request.getAttribute("socket"); Is there any reason you are not using 4.0.5. Just as easy to do this and more performant. Niall ________________________________ From: "Agarwal, Rahul" <rag...@ea...> To: Simple support and user issues <sim...@li...> Sent: Thursday, October 23, 2008 6:41:48 PM Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi Niall, Thanks for your reply. I actually got a hold of the server side socket for the connection in the Dispatcher (Poller.sock) and using that as a key I can drive what I need to do (I wrote a small test and it looks to do what I want). However that means having to modify Simple code which I want to avoid. This is like your #2 idea. If I could get the Socket in a ProtocolHandler that would be ideal! I can create my own and add it to the chain without changing simple. When I look at Request.getAttribute, it is empty and searching the code statically I don’t see anything trying to ‘put’ anything in there either. Is it possible to get the socket in a ProtocolHandler? -Rahul ________________________________ From:Nia...@ub... [mailto:Nia...@ub...] Sent: Wednesday, October 22, 2008 11:23 PM To: sim...@li... Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi, You will notice every connectionis represented as a Pipline. Each pipeline has attributes and a Socket. So you can do one of the following. 1) When the pipeline is created add an AtomicInteger to it, each time it enters a ProtocolHandler add one to this integer keyed by some know key, when it reaches above a threshold then add a Connection: close 2) Get the server side port of the socket (or the socket itself) for the pipeline so that each time it enters a ProtocolHandler you can register a count. When the threshold has passed then add a connection close. To expose this data to the ProtocolHandler simply look at the Request.getAttribute, this takes its attributes from the Pipeline attributes, which are maintained across the lifetime of the connection. Of particular interest is the PipelineFactory. Also, just to mention, Simple 4.0.5 has been released and it uses NIO. You should find this more responsive with pretty much the same feature set. Niall ________________________________ From:Agarwal, Rahul [mailto:rag...@ea...] Sent: 22 October 2008 19:42 To: sim...@li... Subject: [Simpleweb-Support] Keep-alives and Connection close Hi folks, I have a Simple 3.1.3 integration (with Spring) where I need to add a new feature: send a connection close header after say 1000 requests from each persistent connection and keep sending it until the client opens a new connection. (some of our clients don’t respect the header). My main question is how do I know when simple starts executing a new request and how to identity if that is on a persistent connection or a new one? (How do I hook into this?) All I see are a series of ProtocolHandler getting called and adding a new handler in the chain doesn’t look to be the answer. Any suggestions on how to best tackle this in Simple? My next concern would be how not to impact performance doing this check (depends how I hook in). Thanks Rahul |
From: Agarwal, R. <rag...@ea...> - 2008-10-23 17:41:58
|
Hi Niall, Thanks for your reply. I actually got a hold of the server side socket for the connection in the Dispatcher (Poller.sock) and using that as a key I can drive what I need to do (I wrote a small test and it looks to do what I want). However that means having to modify Simple code which I want to avoid. This is like your #2 idea. If I could get the Socket in a ProtocolHandler that would be ideal! I can create my own and add it to the chain without changing simple. When I look at Request.getAttribute, it is empty and searching the code statically I don't see anything trying to 'put' anything in there either. Is it possible to get the socket in a ProtocolHandler? -Rahul ________________________________ From: Nia...@ub... [mailto:Nia...@ub...] Sent: Wednesday, October 22, 2008 11:23 PM To: sim...@li... Subject: Re: [Simpleweb-Support] Keep-alives and Connection close Hi, You will notice every connectionis represented as a Pipline. Each pipeline has attributes and a Socket. So you can do one of the following. 1) When the pipeline is created add an AtomicInteger to it, each time it enters a ProtocolHandler add one to this integer keyed by some know key, when it reaches above a threshold then add a Connection: close 2) Get the server side port of the socket (or the socket itself) for the pipeline so that each time it enters a ProtocolHandler you can register a count. When the threshold has passed then add a connection close. To expose this data to the ProtocolHandler simply look at the Request.getAttribute, this takes its attributes from the Pipeline attributes, which are maintained across the lifetime of the connection. Of particular interest is the PipelineFactory. Also, just to mention, Simple 4.0.5 has been released and it uses NIO. You should find this more responsive with pretty much the same feature set. Niall ________________________________ From: Agarwal, Rahul [mailto:rag...@ea...] Sent: 22 October 2008 19:42 To: sim...@li... Subject: [Simpleweb-Support] Keep-alives and Connection close Hi folks, I have a Simple 3.1.3 integration (with Spring) where I need to add a new feature: send a connection close header after say 1000 requests from each persistent connection and keep sending it until the client opens a new connection. (some of our clients don't respect the header). My main question is how do I know when simple starts executing a new request and how to identity if that is on a persistent connection or a new one? (How do I hook into this?) All I see are a series of ProtocolHandler getting called and adding a new handler in the chain doesn't look to be the answer. Any suggestions on how to best tackle this in Simple? My next concern would be how not to impact performance doing this check (depends how I hook in). Thanks Rahul |
From: <Nia...@ub...> - 2008-10-23 06:23:18
|
Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company registered in England & Wales under company number 2035362, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS AG (London Branch) is registered as a branch of a foreign company under number BR004507, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. UBS Clearing and Execution Services Limited is a company registered in England & Wales under company number 03123037, whose registered office is at 1 Finsbury Avenue, London, EC2M 2PP, United Kingdom. |
From: Agarwal, R. <rag...@ea...> - 2008-10-22 19:08:59
|
Hi folks, I have a Simple 3.1.3 integration (with Spring) where I need to add a new feature: send a connection close header after say 1000 requests from each persistent connection and keep sending it until the client opens a new connection. (some of our clients don't respect the header). My main question is how do I know when simple starts executing a new request and how to identity if that is on a persistent connection or a new one? (How do I hook into this?) All I see are a series of ProtocolHandler getting called and adding a new handler in the chain doesn't look to be the answer. Any suggestions on how to best tackle this in Simple? My next concern would be how not to impact performance doing this check (depends how I hook in). Thanks Rahul |
From: Niall G. <gal...@ya...> - 2008-10-19 13:33:13
|
Hi, This has been resolved in the current release 4.0.5. Seems the pipeline was being recycled before it was committed. Also, you will no longer need to check for HEAD, 204, or 304 responses. It should handle it transparently. Niall ----- Original Message ---- From: Aleksandar Cvijovic <yop...@ya...> To: Sim...@li...; gal...@ya... Sent: Tuesday, September 16, 2008 11:11:58 PM Subject: Re: [Simpleweb-Support] committing in 4.0.2 It was really fast, thank you, Well, I tried once more and... When I remove resp.commit() from this code: if(req.getMethod().equals("HEAD") || code==204 || code==304){ resp.setContentLength(0); resp.commit(); resp.close(); return; } my browser is just waiting for response. --- On Tue, 9/16/08, Niall Gallagher <gal...@ya...> wrote: From: Niall Gallagher <gal...@ya...> Subject: Re: [Simpleweb-Support] committing in 4.0.2 To: Sim...@li..., yop...@ya... Date: Tuesday, September 16, 2008, 10:21 PM Hi, For most cases its best to ignore commit. The commit method basically commits the HTTP header. It does not send anything. The best thing to do is just use the close() method. Either in the output stream or the response. This is sufficient. There are very few instances when commit is needed. Its typically used when you want to forward the response to another service and you don't want that service to modify the header. Niall --- On Tue, 9/16/08, Aleksandar Cvijovic <yop...@ya...> wrote: > From: Aleksandar Cvijovic <yop...@ya...> > Subject: [Simpleweb-Support] committing in 4.0.2 > To: Sim...@li... > Date: Tuesday, September 16, 2008, 2:14 PM > Hi, > > I switched to new version and... > > Earlier all worked well with commit() when OutputStream is > not used at all (content length 0), but now both methods > must be called (resp.commit(); resp.close();). > Is it bug or normal behavior? > > >From documentation: > "It is important to note that the Response controls > the processing of the HTTP pipeline. The next HTTP request > is > not processed until the response has committed. The > response is > committed once the commit method is invoked if there > is NO content body. Committing with a content body is done > only if > correct content is given. The OutputStream acts as > a client and commits the response once the specified > content has > been written to the issued OutputStream." > > > > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/_______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |
From: <nik...@go...> - 2008-09-21 22:45:12
|
Hello Niall, Monday, September 22, 2008, 12:24:33 AM, you wrote: > The exception you have spotted is one of two exceptions I > encountered. When I fixed this one another one cropped up. This is a > pretty simple bug to fix, when I fixed this the bug appeared far > less often, about 1 in 1000. However there are instances where the > boundary that wraps the upload is not fully ready then the > connection just hangs there in an idle state and the upload does not > complete. Okay, I don't know how the buffer handling is done and what you are doing internally that's why I said I don't know whether it is easy to fix :) As said, I am not an Java expert. > Also the terminal token is the specified boundary with a final > --\r\n ending. This specifies that that particular part has > finished. For instance if the boundary is --abcdefg then the > terminal is --abcdefg--\r\n. I was aware that a problem could arise > from the current implementation however I thought it would be far > less frequent. The fix for the buffer exception is to comment out > (or remove) the following lines in > org.simpleframework.util.buffer.BufferAllocator.allocate(int) > // if(capacity > size) { > // size = capacity; > // } > This reduces the size of the buffer allocated and should improve the issue. Does this mean that the issue will not happen as often as before, but it may happen with a small probability? I think I will wait for the 4.0.3 release b/c with my current knowledge and skills I'd probably screw up things. A suggestion: It would help IMHO if the raised exceptions are printed out to stderr rather than simply skipped. However, thanks for your help, Niall. Also (since I haven't said it explicitly) thanks for this very nice and easy to use library! :-) -- Best regards, nik.thirtynine mailto:nik.thirtynine |
From: Niall G. <gal...@ya...> - 2008-09-21 22:24:38
|
Hi, The exception you have spotted is one of two exceptions I encountered. When I fixed this one another one cropped up. This is a pretty simple bug to fix, when I fixed this the bug appeared far less often, about 1 in 1000. However there are instances where the boundary that wraps the upload is not fully ready then the connection just hangs there in an idle state and the upload does not complete. Also the terminal token is the specified boundary with a final --\r\n ending. This specifies that that particular part has finished. For instance if the boundary is --abcdefg then the terminal is --abcdefg--\r\n. I was aware that a problem could arise from the current implementation however I thought it would be far less frequent. The fix for the buffer exception is to comment out (or remove) the following lines in org.simpleframework.util.buffer.BufferAllocator.allocate(int) // if(capacity > size) { // size = capacity; // } This reduces the size of the buffer allocated and should improve the issue. Niall --- On Sun, 9/21/08, nik...@go... <nik...@go...> wrote: > From: nik...@go... <nik...@go...> > Subject: Re: [Simpleweb-Support] Simpleweb Shutting Down Connection Unexpecteadly During HTTP POST > To: "Niall Gallagher" <gal...@ya...> > Cc: "Simple support and user issues" <sim...@li...> > Date: Sunday, September 21, 2008, 2:47 PM > Hello Niall, > > Sunday, September 21, 2008, 10:08:11 PM, you wrote: > > > Ya, this looks like a bug. The issue is somewhat > related to parsing > > the upload but more related to how the upload is > transferred over > > TCP. Simple parses the upload in segments, each > segment is taken > > from what is currently in the server TCP window. When > the terminal > > boundary is in a small final packet then it fails to > parse it > > correctly. I am not going to include this in 4.0.3 but > will ensure > > its a priority for 4.0.4, which should not be too > long. > > I had a look at the source and traced where an exception > occurs (I am > no Java expert, but it looks a bit "unfinished" > that the according > exception is never thrown or display - it would be nice if > the console > would show that an exception occured, the only way I was > aware of this > was when I was adding a conditional exception breakpoint (I > am using > eclipse)) and this is the trace I found: > > Thread [pool-1-thread-3] (Suspended (exception > BufferException)) > BufferAllocator.allocate(int) line: 211 > BufferAllocator.allocate() line: 195 > BoundaryConsumer.process() line: 117 > BoundaryConsumer(ArrayConsumer).consume(Cursor) > line: 123 > PartEntryConsumer.consume(Cursor) line: 71 > PartListConsumer.consume(Cursor) line: 138 > BuilderConsumer.consume(Cursor) line: 86 > EntityCollector.collect(Selector) line: 94 > Retry.run() line: 91 > SelectEvent.run() line: 74 > ThreadPoolExecutor$Worker.runTask(Runnable) line: > 650 > ThreadPoolExecutor$Worker.run() line: 675 > Thread.run() line: 595 > > At line 211 in BufferAllocator.allocate(int) it is simply > asking for a > buffer which has the size of the uploaded file. This buffer > is bigger > than the maximum buffer size and then a BufferException > (Specified > size beyond limit) is raised. > > Not sure where I would have to search for a fix (if a > simple fix is > possible at all). > > > The bug is in the class > > org.simpleframework.http.core.ContentConsumer and how > it interacts > > with the org.simpleframework.http.core.TransportCursor > which feeds > > the consumer the tokens it uses to parse the upload. > Its a little > > complex, but well documented, if you can spot the bug > before I get a > > chance to work on it then that would be greatly > appreciated. > > > -- > Best regards, > nik.thirtynine > mailto:nik.thirtynine > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: <nik...@go...> - 2008-09-21 21:48:08
|
Hello Niall, Sunday, September 21, 2008, 10:08:11 PM, you wrote: > Ya, this looks like a bug. The issue is somewhat related to parsing > the upload but more related to how the upload is transferred over > TCP. Simple parses the upload in segments, each segment is taken > from what is currently in the server TCP window. When the terminal > boundary is in a small final packet then it fails to parse it > correctly. I am not going to include this in 4.0.3 but will ensure > its a priority for 4.0.4, which should not be too long. I had a look at the source and traced where an exception occurs (I am no Java expert, but it looks a bit "unfinished" that the according exception is never thrown or display - it would be nice if the console would show that an exception occured, the only way I was aware of this was when I was adding a conditional exception breakpoint (I am using eclipse)) and this is the trace I found: Thread [pool-1-thread-3] (Suspended (exception BufferException)) BufferAllocator.allocate(int) line: 211 BufferAllocator.allocate() line: 195 BoundaryConsumer.process() line: 117 BoundaryConsumer(ArrayConsumer).consume(Cursor) line: 123 PartEntryConsumer.consume(Cursor) line: 71 PartListConsumer.consume(Cursor) line: 138 BuilderConsumer.consume(Cursor) line: 86 EntityCollector.collect(Selector) line: 94 Retry.run() line: 91 SelectEvent.run() line: 74 ThreadPoolExecutor$Worker.runTask(Runnable) line: 650 ThreadPoolExecutor$Worker.run() line: 675 Thread.run() line: 595 At line 211 in BufferAllocator.allocate(int) it is simply asking for a buffer which has the size of the uploaded file. This buffer is bigger than the maximum buffer size and then a BufferException (Specified size beyond limit) is raised. Not sure where I would have to search for a fix (if a simple fix is possible at all). > The bug is in the class > org.simpleframework.http.core.ContentConsumer and how it interacts > with the org.simpleframework.http.core.TransportCursor which feeds > the consumer the tokens it uses to parse the upload. Its a little > complex, but well documented, if you can spot the bug before I get a > chance to work on it then that would be greatly appreciated. -- Best regards, nik.thirtynine mailto:nik.thirtynine |
From: <nik...@go...> - 2008-09-21 21:04:38
|
Hello Niall, Sunday, September 21, 2008, 10:08:11 PM, you wrote: > Ya, this looks like a bug. The issue is somewhat related to parsing > the upload but more related to how the upload is transferred over > TCP. Simple parses the upload in segments, each segment is taken > from what is currently in the server TCP window. I'd like to give this a shot and would like to try to find the bug, but I need some help... > When the terminal > boundary is in a small final packet What do you mean with "terminal boundary"? Do you mean the "boundary" token? If so... I am not sure if this is correct, since (in my case) the "boundary" token should be in the first packet always (since the header is very small). > then it fails to parse it > correctly. I am not going to include this in 4.0.3 but will ensure > its a priority for 4.0.4, which should not be too long. Okay, I guess I have to wait then. Thanks for acknowledging the bug. I think I can sleep better now :) > The bug is in the class > org.simpleframework.http.core.ContentConsumer and how it interacts > with the org.simpleframework.http.core.TransportCursor which feeds > the consumer the tokens it uses to parse the upload. Its a little > complex, but well documented, if you can spot the bug before I get a > chance to work on it then that would be greatly appreciated. I'll try my best, but when I stepped through the code I did not understand a lot. :-/ -- Best regards, nik.thirtynine mailto:nik.thirtynine |
From: Niall G. <gal...@ya...> - 2008-09-21 20:08:17
|
Hi, Ya, this looks like a bug. The issue is somewhat related to parsing the upload but more related to how the upload is transferred over TCP. Simple parses the upload in segments, each segment is taken from what is currently in the server TCP window. When the terminal boundary is in a small final packet then it fails to parse it correctly. I am not going to include this in 4.0.3 but will ensure its a priority for 4.0.4, which should not be too long. The bug is in the class org.simpleframework.http.core.ContentConsumer and how it interacts with the org.simpleframework.http.core.TransportCursor which feeds the consumer the tokens it uses to parse the upload. Its a little complex, but well documented, if you can spot the bug before I get a chance to work on it then that would be greatly appreciated. Thanks for the feedback, Niall --- On Fri, 9/19/08, nik...@go... <nik...@go...> wrote: > From: nik...@go... <nik...@go...> > Subject: Re[2]: [Simpleweb-Support] Simpleweb Shutting Down Connection Unexpecteadly During HTTP POST > To: "Niall Gallagher" <gal...@ya...> > Cc: "Simple support and user issues" <sim...@li...> > Date: Friday, September 19, 2008, 1:30 PM > Hello Niall, > > Friday, September 19, 2008, 10:08:16 AM, you wrote: > > > Can not be sure what this is. But I will write a test > with > > HttpClient and the code you provided to see what > happens. I will let > > you know. > > I wrote two simple test classes, please find them attached. > The > interesting part is that with a certain filesize it crashes > sometimes, > and the bigger the filesize is the higher the possibility > for a crash. > At 1048326 (slightly less than 1MB (1048576)) it works > often, and > crashes sometimes. Add a few characters and it fails. I > assume this > has to do with the varying "boundary" value in > the multi-part header. > > You will also find the almost 1MB file in the attachement > for > convenience. All files are stored inside the zip archive > attached. > > [Edit: Seems like the mailing list rejects zip files, as > well as large > files. You can download the zip archive from here > http://urban-breaks.de/simpleweb_crashing_testfiles.zip ] > > Regards, > > > nik39 > > > > -- > Best regards, > nik.thirtynine > mailto:nik.thirtynine |
From: Niall G. <gal...@ya...> - 2008-09-19 01:08:27
|
Hi, Can not be sure what this is. But I will write a test with HttpClient and the code you provided to see what happens. I will let you know. Thanks, Niall --- On Thu, 9/18/08, nik...@go... <nik...@go...> wrote: > From: nik...@go... <nik...@go...> > Subject: Re: [Simpleweb-Support] Simpleweb Shutting Down Connection Unexpecteadly During HTTP POST > To: "Niall Gallagher" <gal...@ya...> > Cc: "Simple support and user issues" <sim...@li...> > Date: Thursday, September 18, 2008, 5:34 PM > Hello Niall, > > Friday, September 19, 2008, 2:03:28 AM, you wrote: > > > Hi, > > > Just to mention, if there is a bug the fix will make > it in to the > > next release, which should be some time next week. I > appreciate the feedback. > > if you think that this is a bug that would already help a > lot cause > then I could be sure that it is not my fault :) > > Cheers! > > -- > Best regards, > nik.thirtynine > mailto:nik.thirtynine > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move > Developer's challenge > Build the coolest Linux based applications with Moblin SDK > & win great prizes > Grand prize is a trip for two to an Open Source event > anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support |
From: <nik...@go...> - 2008-09-18 17:35:31
|
Hello Niall, Friday, September 19, 2008, 2:03:28 AM, you wrote: > Hi, > Just to mention, if there is a bug the fix will make it in to the > next release, which should be some time next week. I appreciate the feedback. if you think that this is a bug that would already help a lot cause then I could be sure that it is not my fault :) Cheers! -- Best regards, nik.thirtynine mailto:nik.thirtynine |