Learning cometd

15 views
Skip to first unread message

Moritz

unread,
Oct 14, 2009, 4:44:08 PM10/14/09
to cometd-users
Hi,

First: I'm sorry if this is inappropriate to ask here. I have tried
other places (google, irc, friends...) but have had no luck so far.
I am also not a java expert in any way. (I have worked on one
professional java project so far and that's all my java experience
except for my tries with cometd. However, I have quite some
programming experience in other languages like PHP, C++, javascript
etc...)

So, my question: Where do I best learn how to write the cometd java
applications/servlets? What techniques do I need for that?

I am pretty good with javascript and have no problem with the client
side, just the server side.

The documentation on cometdproject.dojotoolkit.org is not very
detailed regarding explaining the serverside programming and seems to
concentrate more on the clientside. (which - looking at the domain -
makes sense)

So, where do I start?

Thanks for all any help or hints you can offer.

Ted

unread,
Oct 25, 2009, 4:57:46 AM10/25/09
to cometd-users
I'm in a similar position to you. Lack of documentation on server-side
development, and lack of general familiarity with Java/Jetty related
tools has been a real hurdle for me.

I found the most useful page has been this primer:
http://cometdproject.dojotoolkit.org/documentation/primer
Only it doesn't seem to actually work. Specifically, getting the dojo
or jquery overlays doesn't work for me. But that doesn't matter for
me, since I'm using nginx to forward the /cometd/ to the Jetty server,
and the actual javascript, html, etc. is hosted separately. In the
end, here is a writeup of what did work for me:
http://tkstech.blogspot.com/2009/10/simple-cometd-jetty-private-client.html
The simple servlet there might be a decent starting point.

Simone Bordet

unread,
Oct 25, 2009, 5:58:37 AM10/25/09
to cometd...@googlegroups.com
Hi,

On Sun, Oct 25, 2009 at 09:57, Ted <tschu...@gmail.com> wrote:
>
> I'm in a similar position to you. Lack of documentation on server-side
> development, and lack of general familiarity with Java/Jetty related
> tools has been a real hurdle for me.

Ok.
We want to make this as simple as possible, so we need definitely your input.

> I found the most useful page has been this primer:
> http://cometdproject.dojotoolkit.org/documentation/primer
> Only it doesn't seem to actually work. Specifically, getting the dojo
> or jquery overlays doesn't work for me.

You get some error ?
You're working from trunk ?
What exactly does not work ?

But the most important question is this:

Can you all that find problems with the documentation for server side,
write down few bullets of the most missing points that you feel must
be added to the documentation ?
With the bullets, I'll try to document those in the cometd.org website.

Thanks !

Simon
--
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless. Victoria Livschitz

Moritz

unread,
Oct 26, 2009, 5:31:23 AM10/26/09
to cometd-users
Hi,

Thank you for your help. :)

I'll try to make a little list:

- more information on what files have to be where (folder structure
and functions). especially where the serverside servelts/whatever have
to be
- how do these servlets/whatever look like? what classes must our
classes inherit/implement?
- what are the pros/cons of the different implementations? (jetty6/7,
primer, atmosphere, grizzly, etc...)


Regarding the Primer document page: Looking at that I have no idea
where the server logic is and what is going on. Looking at it (and the
files that are "installed" by maven I can only conclude that this
works because it is supported by magic.)


I am thankful for any improvements and am looking forward to create
some amazing cometd/bayeux applications.

Thank you,

Moritz Peters



On 25 Okt., 10:58, Simone Bordet <simone.bor...@gmail.com> wrote:
> Hi,
>
> On Sun, Oct 25, 2009 at 09:57, Ted <tschund...@gmail.com> wrote:
>
> > I'm in a similar position to you. Lack of documentation on server-side
> > development, and lack of general familiarity with Java/Jetty related
> > tools has been a real hurdle for me.
>
> Ok.
> We want to make this as simple as possible, so we need definitely your input.
>
> > I found the most useful page has been this primer:
> >http://cometdproject.dojotoolkit.org/documentation/primer
> > Only it doesn't seem to actually work. Specifically, getting the dojo
> > or jquery overlays doesn't work for me.
>
> You get some error ?
> You're working from trunk ?
> What exactly does not work ?
>
> But the most important question is this:
>
> Can you all that find problems with the documentation for server side,
> write down few bullets of the most missing points that you feel must
> be added to the documentation ?
> With the bullets, I'll try to document those in the cometd.org website.
>
> Thanks !
>
> Simon
> --http://bordet.blogspot.com

William Pietri

unread,
Nov 12, 2009, 6:06:42 AM11/12/09
to cometd-users
On Oct 25, 1:58 am, Simone Bordet <simone.bor...@gmail.com> wrote:
>
> Can you all that find problems with the documentation for server side,
> write down few bullets of the most missing points that you feel must
> be added to the documentation ?
> With the bullets, I'll try to document those in the cometd.org website.
>

Hi, Simon. Thanks for asking. I just spend 30 minutes or so poking at
Jetty, Eclipse, and Cometd web sites trying to figure out how to get
started, and was just about to give up for now when I saw this.

My main issue is the substantial complexity. I know you're trying to
address a number of audiences, but I'd love a simple way to get
started that matches my particular background and goal. In my case, it
would be a step-by-step for putting together a simple Java web app
that's comet-enabled. I'd imagine instructions something like:

1. Download and unpack the cometd package.
2. Download and unpack your favorite servlet container (we recommend
X).
3. Create a basic servlet project.
4. Create a simple index page that displays the current time from the
server via comet.
5. Add jars X, Y, and Z for cometd support.
6. Make a service for the current time by...
7. Publish the current time via cometd by...
8. Build, run, and view your web page with updating time display.

Steps 3, 5, and 8 would benefit from directory listings. Steps 4, 6,
and 7 would need sample code. Having a working version downloadable
from the docs would be a nice bonus.

I've done a ton of Java web stuff, so once I have something simple
working, I could take it from there.

Does that help answer your question?

Thanks,

William

Bill Li

unread,
Nov 14, 2009, 8:23:52 AM11/14/09
to cometd...@googlegroups.com
William,
 
Here is the way that works for me. 
 
2. Create a project from maven archetype. 
Bill

--
You received this message because you are subscribed to the Google Groups "cometd-users" group.
To post to this group, send email to cometd...@googlegroups.com
To unsubscribe from this group, send email to cometd-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/cometd-users

Visit the cometd website at http://www.cometd.com/



--
Bill Li(李保存)
www.BaliOnWeb.com
Reply all
Reply to author
Forward
0 new messages