newbie question

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

newbie question

Ukyo Virgden-2
Hi,

I'm a total newbie on Grizzly. After having experienced NIO  
complexities first hand, I've decided to give Grizzly a try.

My requirements are simple. I need to develop a simple TCP server  
which a couple of clients will connect and send XML documents of size  
2-4K as fast as possible.

For simplicity I'm thinking about developing a connection based  
protocol where each client identifies itself, starts sending XML  
documents, and after the last document, closes the connection.

My questions are
1/ Is possible to easily implement this in Grizzly?
2/ How do I start? The download page contains LOTS of directories.
3/ Are the any examples?
4/ I'm using netbeans for development but I don't prefer uing maven.  
What would be the best way to stat developing with Grizzly in  
netbeans. I'd like to be able to access javadocs within netbeans

Thanks a lot.

Ukyo



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbie question

charlie hunt-3
Welcome Ukyo!

I will be away from e-mail much of the day today, but will get you
started with a few of your questions.  I'm sure others in the Grizzly
community will jump in help too. :-)

My comments / suggestions embedded below.

charlie ...

Ukyo Virgden wrote:

> Hi,
>
> I'm a total newbie on Grizzly. After having experienced NIO
> complexities first hand, I've decided to give Grizzly a try.
>
> My requirements are simple. I need to develop a simple TCP server
> which a couple of clients will connect and send XML documents of size
> 2-4K as fast as possible.
>
> For simplicity I'm thinking about developing a connection based
> protocol where each client identifies itself, starts sending XML
> documents, and after the last document, closes the connection.
>
> My questions are
> 1/ Is possible to easily implement this in Grizzly?

Yes, it is possible and pretty easy to do.

> 2/ How do I start? The download page contains LOTS of directories.

There is a couple tutorial documents on the home page on Grizzly
(although, admittedly out documentation is not the best, but we are
working on improving it).

> 3/ Are the any examples?

Again, there are some examples on the Grizzly home page.  Looking these
you will start to get an understanding of the key concepts; Controller,
SelectionKeyHandler, ReadFilter, and ProtocolParser.

> 4/ I'm using netbeans for development but I don't prefer uing maven.
> What would be the best way to stat developing with Grizzly in
> netbeans. I'd like to be able to access javadocs within netbeans

Don't worry about maven.  You only need maven for building the Grizzly
framework source code.  For you own development you can use the default
NetBeans Ant based projects.   There's a tutorial on the Grizzly home
page that describes how to use NetBeans to get and build the Grizzly
source code.  It describes how to get and install the maven plug-in for
netbeans.

And, yes you can setup netbeans to include Grizzly javadocs.  I'd have
to go look up how to do it to remember how.  You may be able to find it
in the NetBeans IDE help area too.  Let me know if you need further help
in getting this setup.   (Actually, if you would like to write a
tutorial on how to setup Grizzly javadocs in NetBeans and contribute it
to the Grizzly community, I would be glad to send you a Grizzly t-shirt.)

Hope that's enough to get you started.   And, I'm sure others will jump
in and answer some questions too.

charlie ...

>
> Thanks a lot.
>
> Ukyo
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbie question

Patrick Julien-2
In reply to this post by Ukyo Virgden-2
I too am somewhat new to Grizzly having used it for some time under the covers in Glassfish.  I also think the current structure is very difficult to get into.

Comparing this to Apache Mina, you get one download, and it has everything.  With the version 2 milestone, it's even easier, just one main jar file to include and you're done.

Looking at all these directories under the download structure, I don't even know what I should be downloading.  Don't get me wrong, I've read the examples and I'm excited by what I saw.  I've even read Jeanfrancois Arcand's blog from bottom to top.

At this point, I understand the core classes, but I don't even know where they actually reside.  Just my 2 cents that the current structure could be made easier to get into for new people.

On Fri, Feb 22, 2008 at 5:34 AM, Ukyo Virgden <[hidden email]> wrote:
Hi,

I'm a total newbie on Grizzly. After having experienced NIO
complexities first hand, I've decided to give Grizzly a try.

My requirements are simple. I need to develop a simple TCP server
which a couple of clients will connect and send XML documents of size
2-4K as fast as possible.

For simplicity I'm thinking about developing a connection based
protocol where each client identifies itself, starts sending XML
documents, and after the last document, closes the connection.

My questions are
1/ Is possible to easily implement this in Grizzly?
2/ How do I start? The download page contains LOTS of directories.
3/ Are the any examples?
4/ I'm using netbeans for development but I don't prefer uing maven.
What would be the best way to stat developing with Grizzly in
netbeans. I'd like to be able to access javadocs within netbeans

Thanks a lot.

Ukyo



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]




--
http://codepimps.org
Reply | Threaded
Open this post in threaded view
|

Re: newbie question

Erik Svensson-2
In reply to this post by Ukyo Virgden-2
On 2/22/08 11:34 AM, "Ukyo Virgden" <[hidden email]> wrote:

> Hi,
>
> I'm a total newbie on Grizzly. After having experienced NIO
> complexities first hand, I've decided to give Grizzly a try.
>
> My requirements are simple. I need to develop a simple TCP server
> which a couple of clients will connect and send XML documents of size
> 2-4K as fast as possible.
>
> For simplicity I'm thinking about developing a connection based
> protocol where each client identifies itself, starts sending XML
> documents, and after the last document, closes the connection.
>
> My questions are
> 1/ Is possible to easily implement this in Grizzly?
> 2/ How do I start? The download page contains LOTS of directories.
> 3/ Are the any examples?
> 4/ I'm using netbeans for development but I don't prefer uing maven.
> What would be the best way to stat developing with Grizzly in
> netbeans. I'd like to be able to access javadocs within netbeans

I have a small tutorial for writing a client with Grizzly near completion. I
hope to put it on the mailing list tonight or during the weekend. It might
help you out a bit.

Cheers
Erik Svensson, SIX AB


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbie question

Jeanfrancois Arcand-2
In reply to this post by Patrick Julien-2
Hi,

Patrick Julien wrote:
> I too am somewhat new to Grizzly having used it for some time under the
> covers in Glassfish.  I also think the current structure is very
> difficult to get into.

Agree.

>
> Comparing this to Apache Mina, you get one download, and it has
> everything.  With the version 2 milestone, it's even easier, just one
> main jar file to include and you're done.

Agree it is easier, but when you embed Grizzly inside you application,
you want to have the minimal set of classes. This is why Grizzly has
several packages. Now I fully agree we need to better document which jar
is for what. Can you file an issue here so we track the problem:

https://grizzly.dev.java.net/issues/

The minimum we can do is to document it properly on the front page,
explaining which jars you need.

If you want a mina like jar, the grizzly-framework-1.7.2.jar [1] is the
one you are looking at. It doesn't have any http/comet/jruby/http-utils
extra code in it. If you need http support, you can either download a
single jar [2] or several [3]

>
> Looking at all these directories under the download structure, I don't
> even know what I should be downloading.  Don't get me wrong, I've read
> the examples and I'm excited by what I saw.  I've even read Jeanfrancois
> Arcand's blog from bottom to top.
>
> At this point, I understand the core classes, but I don't even know
> where they actually reside.  Just my 2 cents that the current structure
> could be made easier to get into for new people.

Thanks for the feedback!

-- Jeanfrancois

[1]
http://download.java.net/maven/2/com/sun/grizzly/grizzly-framework/1.7.2/
[2] http://download.java.net/maven/2/com/sun/grizzly/grizzly-http/1.7.2/
[3]
http://download.java.net/maven/2/com/sun/grizzly/grizzly-http-webserver/1.7.2/

>
> On Fri, Feb 22, 2008 at 5:34 AM, Ukyo Virgden <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Hi,
>
>     I'm a total newbie on Grizzly. After having experienced NIO
>     complexities first hand, I've decided to give Grizzly a try.
>
>     My requirements are simple. I need to develop a simple TCP server
>     which a couple of clients will connect and send XML documents of size
>     2-4K as fast as possible.
>
>     For simplicity I'm thinking about developing a connection based
>     protocol where each client identifies itself, starts sending XML
>     documents, and after the last document, closes the connection.
>
>     My questions are
>     1/ Is possible to easily implement this in Grizzly?
>     2/ How do I start? The download page contains LOTS of directories.
>     3/ Are the any examples?
>     4/ I'm using netbeans for development but I don't prefer uing maven.
>     What would be the best way to stat developing with Grizzly in
>     netbeans. I'd like to be able to access javadocs within netbeans
>
>     Thanks a lot.
>
>     Ukyo
>
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: [hidden email]
>     <mailto:[hidden email]>
>     For additional commands, e-mail: [hidden email]
>     <mailto:[hidden email]>
>
>
>
>
> --
> http://codepimps.org

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: newbie question

Patrick Julien-2

On Fri, Feb 22, 2008 at 9:17 AM, Jeanfrancois Arcand <[hidden email]> wrote:


>
> Comparing this to Apache Mina, you get one download, and it has
> everything.  With the version 2 milestone, it's even easier, just one
> main jar file to include and you're done.

Agree it is easier, but when you embed Grizzly inside you application,
you want to have the minimal set of classes. This is why Grizzly has
several packages. Now I fully agree we need to better document which jar
is for what. Can you file an issue here so we track the problem:

https://grizzly.dev.java.net/issues/


Here is it is:
https://grizzly.dev.java.net/issues/show_bug.cgi?id=69

But to your point, I wasn't promoting that Grizzly should be assembled into one large jar.  If I'm looking for a Mina like jar, than I should be able to just select this one jar and be done with it.  What I'm talking about is that the thought process between distributing and embedding Grizzly should be disjoint.

In other words, Mina has several jars too but only one zip file for its distribution.  If I embed it, I'm still only going to only include the jars that I need.  However, the Mina guys aren't hazing me with a large directory structure on their site.  That download site is enough to discourage many.  To be perfectly honest, I don't think I would have bothered to figure it out with Grizzly if it weren't for the fact that I'm heavily using Glassfish now.  I just don't think I would have cared because Mina is just too easy to get into.

The idea is that Grizzly, even all jars combined, is small enough just to be one download.  Nobody is going to care about the size of that download.  Once that hurdle is out of the way, we can then proceed to tutorials, which should actually describe the jars you need, and not have to worry if we are going to be missing something.
 
Anyway, I'm past that hurdle now with Grizzly, so I guess I don't really care anymore if this happens or not.  Just sharing my experience of what it was like for me to get into all of this.

<snip/>