Re: [Simpleweb-Support] Non Executor-based Asynchronous Service
Brought to you by:
niallg
|
From: Luis A. <lan...@gm...> - 2014-06-20 08:50:58
|
Hey thanks a lot for your time. It's much appreciated.
On Jun 19, 2014 10:17 PM, "Niall Gallagher" <gal...@ya...>
wrote:
> The current version works with that. This actually has more to do with
> understanding threading, its really very easy to get Simple working on such
> a scale. If you have past experience with Servlets it will confuse you.
> Think of a Response as a pointer to logic that can create and dispatch a
> response.
>
> For example
>
> public class X implements Container {
> private Set<Response> responses;
> public Set<Response getResponses(){
> return responses;
> }
> public void handle(Request request, Response response) {
> responses.add(response);
> }
> }
>
> Tell me why 200,000 responses can not be added to the responses set?? Also
> tell me why 1 thread cant call X.getResponses and perform some arbitrary
> logic on it? Then call Response.close() and send the response to the client
> at any arbitrary time?
>
> --------------------------------------------
> On Thu, 19/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, 19 June, 2014, 3:43 AM
>
> Do you mean you need
> WebSockets to handle 200,000 long polling requests with 8
> threads? Does the current version of Simple not do that?
> I'm not sure I'm following.
>
>
> On Wed, Jun 18, 2014
> at 10:12 PM, Niall Gallagher <gal...@ya...>
> wrote:
>
> I should be releasing WebSockets within a week or two, I
> will ensure to include plenty of examples when I do.
>
>
>
> --------------------------------------------
>
> On Mon, 16/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: Monday, 16 June, 2014, 4:58 AM
>
>
>
> Hi Niall,
>
> can you point me to some code that you might use for such
>
> long polling requests? Perhaps I'm missing something,
>
> and doing something in my code I shouldn't be.
>
>
>
>
>
> On Sun, Jun 15, 2014 at
>
> 9:11 PM, Niall Gallagher <gal...@ya...>
>
> wrote:
>
>
>
> No this is not correct, I can service 200,000 long
> polling
>
> requests with 8 theads.
>
>
>
> --------------------------------------------
>
>
>
> On Fri, 13/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: Friday, 13 June, 2014, 2:40 AM
>
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> -----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
>
>
>
>
>
>
>
> -----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
>
>
>
> -----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
>
|