users@grizzly.java.net

Re: Grizzly and NIO neo needs advice

From: Jeanfrancois Arcand <Jeanfrancois.Arcand_at_Sun.COM>
Date: Tue, 23 Sep 2008 16:32:32 -0400

Salut,

bsimonssays wrote:
> I've gone through the tutorial and the referenced "Rox" tutorial and they
> were both quite helpful.
>
> I will be using a custom protocol (not http). I found this tutorial that
> was pretty useful too
> https://grizzly.dev.java.net/tutorials/tutorial-framework-filter-sample/index.html
>
> I'm trying to work through the framework filter example and finding it a bit
> difficult though I'll have a better understanding tomorrow.
>
> As long as I know that Grizzly can accomplish what I described in my first
> post, I'll definitely continue trying to use it.
>
> Are there any other examples in the sample code that would be more
> applicable?

Those aren't as good as the one written by Sebastien and John, but you
might want to take a look at:

http://weblogs.java.net/blog/jfarcand/archive/2008/02/writing_a_tcpud_1.html
http://weblogs.java.net/blog/jfarcand/archive/2008/06/writing_a_tcpud_2.html

All tutorials have been written by Grizzly developers, so feel free to
ask any questions here. You can almost get an answer 24 hours a day (OK
let's say 12 :-))

A+

-- Jeanfrancois


>
> Thanks,
> Bill
>
>
> Jeanfrancois Arcand-2 wrote:
>> Salut,
>>
>> to add to Sebastien...
>>
>> Survivant 00 wrote:
>>> please start by reading the migration guide to grizzly. It will tell
>>> you how, it was done with NIO, to finally how to do it right with
>>> Grizzly (and really more easier).
>>>
>>> You can adapt the code the reflect you needs.
>>>
>>> https://grizzly.dev.java.net/
>>>
>>> the link : ***Migrating your NIO application to Grizzly
>>> <http://www.sebastiendionne.ca/grizzly/grizzly-migration-guide-part-1.html>
>>>
>>>
>>> *
>>> 2008/9/23 bsimonssays <bill.simons_at_gmail.com
>>> <mailto:bill.simons_at_gmail.com>>
>>>
>>>
>>> I'm new to both NIO and Grizzly and would like to know if they are
>>> appropriate for the application that I'm writing. Essentially I am
>>> writing a
>>> game server that needs to host many games. Each game has two
>>> associated
>>> players. I want the players to be able to submit requests and
>>> receive
>>> responses, but I also want the server to be able to push messages
>>> back to
>>> the players. A common scenario would be that player 1 makes a move
>>> by
>>> issuing a request, the server responds to player 1 but also sends
>>> information to player 2 (without player 2 making a request).
>> Are you planning to uses http as the protocol or you will use your own
>> protocol?
>>
>>
>>> In the pre-NIO world, I would associate a thread per user and keep
>>> the
>>> socket connection open... This doesn't scale particularly well and I
>>> know
>>> NIO was designed to improve on this paradigm with non-blocking IO.
>>> How
>>> would I do something like this using NIO and (better yet) Grizzly?
>> Sebastien's tutorial is a good start. If you are planning to use http as
>> the protocol, I would think you should take a look at Grizzly
>> Asynchronouys Request Processing and its AsyncFilter:
>>
>> http://weblogs.java.net/blog/jfarcand/archive/2006/02/grizzly_part_ii.html
>> http://weblogs.java.net/blog/jfarcand/archive/2008/07/extending_the_g.html
>> https://grizzly.dev.java.net/nonav/apidocs/com/sun/grizzly/arp/AsyncFilter.html
>>
>>
>> Thanks!
>>
>> -- Jeanfrancois
>>
>>
>>> Thanks in advance,
>>> Bill
>>> --
>>> View this message in context:
>>>
>>> http://www.nabble.com/Grizzly-and-NIO-neo-needs-advice-tp19629288p19629288.html
>>> Sent from the Grizzly - Users mailing list archive at Nabble.com.
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>>> <mailto:users-unsubscribe_at_grizzly.dev.java.net>
>>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>> <mailto:users-help_at_grizzly.dev.java.net>
>>>
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
>> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>>
>>
>>
>