Re: [Simpleweb-Support] Non Executor-based Asynchronous Service
Brought to you by:
niallg
From: Kai S. <sch...@gm...> - 2014-06-14 00:22:38
|
hrrm... Simple is a framework, not a toolbox or library. Don't abstract away from Simple, rather go deeper. What you're looking for exists! Download the source, read the docs. If something doesn't do what you want it to, replace it, inherit it's classes and implement them differently. It's open source, have at it, share your results if you can! --- I see that there are exactly 8 servicing threads for requests by default, in the pool. If I don't use an Executor, and I get 8 requests that are long-running, or blocking, then any other requests that come in must wait to be serviced. That's true, and I lied in my first reply... Simple does allocate a certain number of threads, but their number is always fixed to waaaaay below max capacity, like for example 8. Those 8 threads are about as much your concern as the 8 threads running in the kernel of your 16 processor server, that are idling cause they have no memory to clean up. So. If you have request coming onto Simple that will block a certain resource forever (like an infinite loop, or a faulty hardware device), then make sure your server knows how to kill it. Simple isn't your server. It's just a high level interface to the bits that come at your real physical computer, and allows you, at a high level to tell that real physical computer to send bits back. It's up to you to programme something that takes inputs from Simple, manages it and it's failures, and then spits it back out to the client side. -k ---- PS @Niall: I'd love to test drive WebSockets for you. please let us know when and where :) On Fri, Jun 13, 2014 at 10:40 AM, Luis Antunes <lan...@gm...> wrote: > I see that there are exactly 8 servicing threads for requests by default, > in the pool. If I don't use an Executor, and I get 8 requests that are > long-running, or blocking, then any other requests that come in must wait > to be serviced. > > > On Thu, Jun 12, 2014 at 12:30 PM, Niall Gallagher < > gal...@ya...> wrote: > >> Then dont use an Executer, put the Request and Response in a hashmap and >> send the reply whenever you want. Its fully asynchronous already... >> >> -------------------------------------------- >> On Thu, 12/6/14, Luis Antunes <lan...@gm...> wrote: >> >> Subject: Re: [Simpleweb-Support] Non Executor-based Asynchronous Service >> To: "Simple support and user issues" < >> sim...@li...> >> Received: Thursday, 12 June, 2014, 9:21 AM >> >> >> Thanks >> everyone for your responses, but perhaps I wasn't very >> clear in my original message. I am simply trying to >> implement a Container that does not create a new thread for >> every request that requires an asynchronous response. In the >> Asynchronous services example I quoted in the original post, >> a java.util.concurrent.Executor is used, and that does >> create a new thread for each request. I can't see an >> obvious way to use a single separate thread and NIO in this >> case. >> >> >> On Wed, >> Jun 11, 2014 at 10:20 PM, Brad McEvoy <br...@mc...> >> wrote: >> >> >> >> On 12/06/14 14:06, Niall Gallagher wrote: >> >> > I have also implemented WebSockets for Simple, ill >> release it within a few months when I get some time. >> >> That would be cool :) >> >> >> >> Simple is integrated into milton.io >> (webdav server framework) and while >> >> most people use milton with servlets there are always some >> using the >> >> simple integration, particularly for embedded webdav >> servers. >> >> >> >> And push notifications are coming to webdav where websockets >> will be the >> >> main transport mechanism. >> >> >> >> >> ------------------------------------------------------------------------------ >> >> HPCC Systems Open Source Big Data Platform from LexisNexis >> Risk Solutions >> >> Find What Matters Most in Your Big Data with HPCC Systems >> >> Open Source. Fast. Scalable. Simple. Ideal for Dirty >> Data. >> >> Leverages Graph Analysis for Fast Processing & Easy Data >> Exploration >> >> http://p.sf.net/sfu/hpccsystems >> >> _______________________________________________ >> >> Simpleweb-Support mailing list >> >> Sim...@li... >> >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> >> >> -----Inline Attachment Follows----- >> >> >> >> ------------------------------------------------------------------------------ >> HPCC Systems Open Source Big Data Platform from >> LexisNexis Risk Solutions >> Find What Matters >> Most in Your Big Data with HPCC Systems >> Open >> Source. Fast. Scalable. Simple. Ideal for Dirty Data. >> Leverages Graph Analysis for Fast Processing >> & Easy Data Exploration >> http://p.sf.net/sfu/hpccsystems >> -----Inline Attachment Follows----- >> >> >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> >> >> >> ------------------------------------------------------------------------------ >> HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions >> Find What Matters Most in Your Big Data with HPCC Systems >> Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. >> Leverages Graph Analysis for Fast Processing & Easy Data Exploration >> http://p.sf.net/sfu/hpccsystems >> _______________________________________________ >> Simpleweb-Support mailing list >> Sim...@li... >> https://lists.sourceforge.net/lists/listinfo/simpleweb-support >> > > > > ------------------------------------------------------------------------------ > HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions > Find What Matters Most in Your Big Data with HPCC Systems > Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. > Leverages Graph Analysis for Fast Processing & Easy Data Exploration > http://p.sf.net/sfu/hpccsystems > _______________________________________________ > Simpleweb-Support mailing list > Sim...@li... > https://lists.sourceforge.net/lists/listinfo/simpleweb-support > > |