Skip to main content

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

Hey Jesse,

I am looking at the easiest servlet example i could found :-)

http://www.maths.tcd.ie/~dacurran/4ict12/assignment3/

But it does not use the servlet-api 3.0 that you were suggesting. Did you mean something else ? Or i am looking at right example ?





On Wed, Jun 20, 2012 at 10:54 PM, Jesse McConnell <jesse@xxxxxxxxxxx> wrote:
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
>
_______________________________________________
jetty-dev mailing list
jetty-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/jetty-dev


Back to the top