Yes!

if you still have that module, it would be very useful and appreciated…

Il giorno giovedì 14 ottobre 2010 17:20:44 UTC+2, √ ha scritto:
>
> Hey Garrick,
>
> this sounds wonderful, looking forward to integrate! :-)
>
> On Thu, Oct 14, 2010 at 4:45 PM, Garrick Evans <buk...@gmail.com 
> <javascript:>> wrote:
>
>> I've actually implemented a very lightweight framework that bridges
>> Jetty to Akka actors using the continuation API as it is in Jetty-7
>> right now.  I originally was using Atmosphere plus Jersey but this
>> proved to be to heavy and not and exact fit for what I needed which
>> was very high throughput async HTTP without intermediate POJOs and the
>> blocked thread this incurs.  I also use the comet dispatcher for the
>> endpoint actors so you can still tune this front-end behavior.
>>
>> I'm pleased to say my company has allowed me to contribute this to
>> open source and Akka specifically and once the final paperwork is
>> complete (a few days tops) I'll post a module for the community to
>> review.  Hopefully this will be useful for you or others.
>>
>> The design is very simple. You replace the Akka servlet with this one
>> and set a property telling it which actor to look up as the root
>> endpoint.  The servlet suspends incoming requests and fires them along
>> to the root actor, so it's about as fast as you can get flipping the
>> request into Akka from Jetty.  The endpoint has a default receive that
>> walks an attachment list evaluating a hook function provided by each
>> attached endpoint (these would be handlers in your "site tree"). The
>> hook processes the URI and returns a boolean. If the hook matches, the
>> request is sent along to an actor that is provided by the attachment
>> (another func).  Two things immediately fall out of this, one, you can
>> return any actor to handle the URI and this can change on the fly, and
>> two, multiple actors can handle the same request if you desire.
>>
>
>
>
>  
>
>>
>>
>>
>> On Oct 14, 3:33 am, Ivan Porto Carerro <i...@mojolly.com> wrote:
>> > I don't think there are any docs but the ones from sinatra apply pretty 
>> well
>> > sohttp://sinatra-book.gittr.com/#hello_world_application
>> >
>> > Just pretend you're reading scala instead of ruby.
>> >
>> > to translate that into jersey you would have something like this:
>> >
>> > @GET
>> > @Path("foo")
>> > def foo = {}
>> >
>> > The ScalatraServlet is a way to root your class to a certain path. So 
>> you
>> > can have many scalatra servlets serving a multitude of paths. The 
>> servlet
>> > mapping is used much like a class level annotation in jersey
>> >
>> > Here's an example that contrasts the 2 approaches
>> >
>> > https://gist.github.com/ea3d13eb1fc438d8dead
>> >
>> > There is not much documentation at this point. I'll bring it up with the
>> > other committers and when time permits I'll start blogging about it so 
>> that
>> > people with no ruby background also have a reference.
>> >
>> > On Thu, Oct 14, 2010 at 11:04 AM, √iktor Klang <viktor.kl...@gmail.com
>> >wrote:
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > > Hi Ivan,
>> >
>> > > I have only spent about 10 minutes reading Scalatra code so I have no
>> > > deeper understanding how it works.
>> >
>> > > From my udnerstanding you are coding directly against Scalatra 
>> Servlets
>> > > like this:
>> >
>> > > class MyServlet extends ScalatraServlet {
>> >
>> > >  get("foo") {
>> > >   ..blah...
>> > > }
>> >
>> > > }
>> >
>> > > Does this mean that all your Scalatra servlets need to be mapped in 
>> the
>> > > web.xml?
>> >
>> > > Perhaps you could point me to the documentation (all I've read is the
>> > > README)
>> >
>> > > Cheers,
>> >
>> > > On Thu, Oct 14, 2010 at 11:58 AM, Ivan Porto Carerro <
>> i...@mojolly.com>wrote:
>> >
>> > >> Hi
>> >
>> > >> It might be better to have this conversation over the mailing list 
>> instead
>> > >> of on twitter, at some point 140 chars is just not enough :)
>> >
>> > >> We're currently using scalatra in combination with akka but didn't 
>> do a
>> > >> deep integration.  I've been looking at integrating Atmosphere with 
>> scalatra
>> > >> and kept thinking, you know it would be great if I could also use 
>> Akka for
>> > >> the actors.
>> >
>> > >> So I think it's best to think of Scalatra as Jersey without the 
>> annotation
>> > >> noise. My main problem is that I have yet to fully understand how 
>> servlets
>> > >> work because apparently you can have servlets that load other 
>> servlets and
>> > >> there are servlet containers and so on.  There are also filters but 
>> filters
>> > >> don't do the exact same thing as I know filters from different 
>> languages and
>> > >> web frameworks etc.
>> >
>> > >> The link you sent me over twitter might in fact be very helpful as it
>> > >> seems to show the one bit I couldn't work out from atmosphere's 
>> examples,
>> > >> the initalization bit.
>> > >> I tried using the meteor API provided but that won't do because then 
>> you
>> > >> can't link broadcasters with a given path and they are always mapped 
>> to the
>> > >> servlet context path. You can see that here:
>> > >>
>> http://github.com/scalatra/scalatra/blob/comet-support/push-example/s...
>> >
>> > >> Jean-François has been very helpful so far, so I think I'll get there
>> > >> eventually. This is pretty interesting to me as it is totally 
>> different from
>> > >> what I have to do for our own application.
>> > >> It might take a while for me to finish the akka-scalatra module 
>> because I
>> > >> don't have that much free time the coming 2 week-ends and week 
>> nights.  I'll
>> > >> fork Akka again and will do a POC and we can take it from there.
>> >
>> > >> But expect questions from me when I get time to work on this.
>> >
>> > >> --
>> >
>> > >> *Met vriendelijke groeten - Best regards - Salutations*
>> >
>> > >> *Ivan Porto Carrero*
>> > >> Co-founder & Developer at Mojolly
>> > >> Mojolly
>> > >> Visit us at *www.mojolly.com, flanders.co.nz*
>> > >> We tweet at @mojolly <http://twitter.com/mojolly>, @casualjim<
>> http://twitter.com/casualjim>
>> >
>> > >> Phone: +44.7513.233.465
>> >
>> > >>  --
>> > >> You received this message because you are subscribed to the Google 
>> Groups
>> > >> "Akka User List" group.
>> > >> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> > >> To unsubscribe from this group, send email to
>> > >> akka-user+...@googlegroups.com 
>> > >> <javascript:><akka-user%2Bunsubscribe@googlegroups 
>> .com>
>> > >> .
>> > >> For more options, visit this group at
>> > >>http://groups.google.com/group/akka-user?hl=en.
>> >
>> > > --
>> > > Viktor Klang,
>> > > Code Connoisseur
>> > > Work:  www.akkasource.com
>> > > Code:   github.com/viktorklang
>> > > Follow: twitter.com/viktorklang
>> > > Read:   klangism.tumblr.com
>> >
>> > >  --
>> > > You received this message because you are subscribed to the Google 
>> Groups
>> > > "Akka User List" group.
>> > > To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> > > To unsubscribe from this group, send email to
>> > > akka-user+...@googlegroups.com 
>> > > <javascript:><akka-user%2Bunsubscribe@googlegroups 
>> .com>
>> > > .
>> > > For more options, visit this group at
>> > >http://groups.google.com/group/akka-user?hl=en.
>> >
>> > --
>> >
>> > *Met vriendelijke groeten - Best regards - Salutations*
>> >
>> > *Ivan Porto Carrero*
>> > Co-founder & Developer at Mojolly
>> > Mojolly
>> > Visit us at *www.mojolly.com, flanders.co.nz*
>> > We tweet at @mojolly <http://twitter.com/mojolly>,
>> > @casualjim<http://twitter.com/casualjim>
>> >
>> > Phone: +44.7513.233.465
>>
>> --
>> You received this message because you are subscribed to the Google Groups 
>> "Akka User List" group.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> To unsubscribe from this group, send email to 
>> akka-user+...@googlegroups.com <javascript:>.
>> For more options, visit this group at 
>> http://groups.google.com/group/akka-user?hl=en.
>>
>>
>
>
> -- 
> Viktor Klang,
> Code Connoisseur
> Work:   www.akkasource.com
> Code:   github.com/viktorklang
> Follow: twitter.com/viktorklang
> Read:   klangism.tumblr.com
>
>

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to