php ?

0 views
Skip to first unread message

mois...@gmail.com

unread,
Jul 17, 2006, 8:12:45 PM7/17/06
to cometd-dev
Hello,

I was wondering if it would be a pain to implement the same
functionality in a php script. I found this one (patServer)
http://www.php-tools.de/site.php?file=patServer/overview.xml
What do you think ? I'm a php programmer and I could volunteer to do
some coding in php if making a php version would be practical.

I posted this on the comed-users group also.

Best regards,
Moisa Doru

David Davis

unread,
Jul 17, 2006, 8:45:49 PM7/17/06
to comet...@googlegroups.com
We spoke on irc (#cometd on irc.perl.org), so I'm just repeating it here for the list.

< moisadoru> i was wondering if it would be possible to implement a comet server in php. I know that you can make a full http server in php using socket functions, but i was wondering if that is a good ideea
< moisadoru> if people already work on the python version, would it be practical ?
<@xantus> oh yeah, i saw your post
<@xantus> just not sure what to say...without sounding rude
<@xantus> php wouldn't be a good solution in my opinion
<@xantus> but don't let that stop you from trying
< moisadoru> there are some http servers implemented in pure php, but they are classical send data/close connection
<@xantus> I'm not sure how that library handles connections
<@xantus> is it a connection per thread
<@xantus> or is it select based (polling)
< moisadoru> i haven't dig deeply into the library, it was just an example of an http server
<@xantus> I guess that's what you have to figure out first, if its a thread/process per connection, avoid it
< moisadoru> i will try to implement one myself
< moisadoru> with a nonblocking socket
<@xantus> start up that http server, connect to it multiple times with telnet, and don't disconnect
<@xantus> then look at your process list
< moisadoru> how many connections would normally handle a comet server ?
<@xantus> thousands
<@xantus> the perl version has been tested with 50,000
<@xantus> I think it could be pushed to do more
< moisadoru> i will do some testing these days and let you know the results
<@xantus> ok
< moisadoru> php has similar capabilities to perl
< moisadoru> i mean socket-ing stuff
< moisadoru> and one more thing i'd like to say, this whole comet ideea is great :)
< moisadoru> thanks for the info xantus
< @xantus> np

mois...@gmail.com

unread,
Jul 18, 2006, 2:47:12 PM7/18/06
to cometd-dev
I've tested the patServer (which is a regular HTTP and general purpose
server) with about 30 concurrent telnet connections and it does not
appear to use a connection per thread; had one process with 2 threads
all the time. I'm currently caught with a deadline to a project. After
that i will dig into the patServer and will post here findings/ideeas
Quote from the patServer homepage:
" The main goal for developing patServer was to create a base class for
multi-user Flash MX applications by making use of Flash's XMLSocket
object. We'll soon publish a small example of how peer-to-peer
communication of Flash clients may be achieved with patServer..."
I will contact the developers and see if they are willing to
collaborate in making a cometd server maybe using some parts of their
codebase (which is LGPL).
But even without that, it should not be hard to implement the whole
thing from the ground. I just wish that the cometd protocol specs would
be at leat 90% finalized (i might have some proposals for that, if
anyone is interested).

Best Regards,
Moisa Doru

Alex Russell

unread,
Jul 18, 2006, 3:10:24 PM7/18/06
to comet...@googlegroups.com, mois...@gmail.com
On Tuesday 18 July 2006 11:47 am, mois...@gmail.com wrote:
> I've tested the patServer (which is a regular HTTP and general
> purpose server) with about 30 concurrent telnet connections and it
> does not appear to use a connection per thread; had one process with
> 2 threads all the time. I'm currently caught with a deadline to a
> project. After that i will dig into the patServer and will post here
> findings/ideeas Quote from the patServer homepage:
> " The main goal for developing patServer was to create a base class
> for multi-user Flash MX applications by making use of Flash's
> XMLSocket object. We'll soon publish a small example of how
> peer-to-peer communication of Flash clients may be achieved with
> patServer..."

Makes sense. I think we'll even have a Flash XMLSocket tunnel type for
cometd, so thing should be broadly similar in terms of architecture.

> I will contact the developers and see if they are
> willing to collaborate in making a cometd server maybe using some
> parts of their codebase (which is LGPL).

We still don't have licensing sorted, so it might be good to see how
much code it really is. The XMLSocket protocol is dead simple.

> But even without that, it should not be hard to implement the whole
> thing from the ground. I just wish that the cometd protocol specs
> would be at leat 90% finalized (i might have some proposals for that,
> if anyone is interested).

The current proposed protocol specs are in SVN.

Regards

--
Alex Russell
al...@sitepen.com A99F 8785 F491 D5FD 04D7 ACD9 4158 FFDF 2894 6876
al...@dojotoolkit.org BE03 E88D EABB 2116 CC49 8259 CF78 E242 59C3 9723

Reply all
Reply to author
Forward
0 new messages