[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-dev] Jetty Newbie ( Urgent )

I would recommend you look into servlets and go from there.  Typically
you will not have to worry about thread management in regards to
requests yourself with servlets, that is managed by the container.

Jetty uses java.nio under the covers for connection management and
scaling request counts, etc

cheers,
jesse

--
Jesse McConnell <jesse@xxxxxxxxxxx>
www.webtide.com â Developer advice, services and support from the
Jetty & CometD experts.


On Wed, Jun 20, 2012 at 3:47 PM, Rawat <geegalrawat@xxxxxxxxx> wrote:
> Hi Jesse,
>
> Thanks for your reply. So if i use Embedded Jetty and write a simple handler
> ( like HelloWorld.java example). Is this HelloWorld service requests
> automatically executed in multiple threads ? or just a single thread for
> every request, by default ? Do i not have to write any piece of code to
> spawn different threads for different requests for the HelloWorld webservice
> ?
>
> Thanks
>
>
>
> On Wed, Jun 20, 2012 at 10:34 PM, Jesse McConnell <jesse@xxxxxxxxxxx> wrote:
>>
>> > -- What should i do ? Embed Jetty or use Normal webapp ?
>>
>> either will work
>>
>> > I want to write a simple REST webservice. But i want it to support as
>> > much
>> > traffic simultaneous traffic as possible. So i imagine several hundred
>> > requests per second and each request being served by a new thread. ( I
>> > am
>> > coming from PHP background ).
>>
>> jetty has easily served many 10's of thousands of requests per second
>> with sub second latency
>>
>> ÂIs it possible in Embedded Jetty approach ? If
>> > yes, can i tune how many threads will serve my traffic ?
>>
>> both are possible with either approach, a traditional webapp or
>> embedded jetty. Âthe key is in using either jetty-continuations or the
>> async servlets provided in servlet-api 3.0 in order to scale
>>
>> there is little need for you to tune jetty at this point in your
>> experience...get your app working and react as needed for performance
>> improvements. Âmost of our clients don't have to tweak the default
>> settings at all
>>
>> cheers,
>>
>> jesse
>> _______________________________________________
>> jetty-dev mailing list
>> jetty-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>
>
>
> _______________________________________________
> jetty-dev mailing list
> jetty-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/jetty-dev
>