Hemlock with PHP

3 views
Skip to first unread message

Jan Hančič

unread,
Jun 11, 2009, 2:08:17 PM6/11/09
to Hemlock
Hi,

I'm building a chat feature for one of our web pages at the moment
using the Meteor server (http://meteorserver.org/) and I'm having a
lot of problems on some clients where they don't get new messages for
more than 5 seconds.
My questions is: can I build my user interface with XHTML&JavaScript
and just use your flash component to notify my JS code that there is a
new message to be displayed (along with the relevant data)? I suspect
that I can send the data needed to this flash component which then in
turn sends it to other clients (or does it send it to the server
(PHP), from where it goes to the clients?).
I'm a little bit confused how all this works as documentation is
pretty vague at the moment, so sorry for ignorance.

thomas

unread,
Jun 11, 2009, 2:13:47 PM6/11/09
to Hemlock
Hi,
I'm sure this is possible although we haven't tried it. There is a
built in chat widget with the code, so if you only want chat then you
could do it easily without having to write so much acitonscript.

All the communication is done via XMPP through an ejabberd server, so
there doesn't have to be any other backend if it is a simple app.

There are other ways to communicate with xmpp from js, so if I was
wanting to do an xhtml/js solution I probably wouldn't use flash at
all.

Hope that helps.
Thomas

Jan Hančič

unread,
Jun 11, 2009, 2:29:31 PM6/11/09
to Hemlock
Thanks for the quick response!
Well eventually we will do other stuff too, not just chat, so I'm
really just looking for the best solution to push data from the server
to the client. I just thought that flash would be great for this (it
would ask as a proxy of sorts: get data from JS, send it to server and
vice versa).

lp

Ron DeVera

unread,
Jun 11, 2009, 2:32:44 PM6/11/09
to Hemlock
> My questions is: can I build my user interface with XHTML&JavaScript
> and just use your flash component to notify my JS code that there is a
> new message to be displayed (along with the relevant data)?

Theoretically, yes; this is something we're working on. You'll be able
to build an interface using the HTML, CSS, and JS you know and love,
and use Flash purely to maintain an open socket between the browser
and the server.

> I suspect
> that I can send the data needed to this flash component which then in
> turn sends it to other clients (or does it send it to the server
> (PHP), from where it goes to the clients?).

Data doesn't have to move through your PHP back-end, but goes through
the XMPP server.

In one of our Hemlock apps, we have a Ruby backend that talks to a
database, and also logs into an XMPP room as a regular user (thanks to
some third-party software that integrates Ruby with XMPP). This lets
us move data between XMPP and the database seamlessly. The same can be
done with any back-end language, including PHP, that has some
implementation of XMPP. Documentation on this architecture is in the
works.

Cheers,
Ron

Jan Hančič

unread,
Jun 11, 2009, 2:47:12 PM6/11/09
to Hemlock
Cool, when can we expect this (using flash only for sockets) to be
available?

lp

Ron DeVera

unread,
Jun 11, 2009, 2:52:04 PM6/11/09
to hem...@googlegroups.com
> Cool, when can we expect this (using flash only for sockets) to be
> available?

We'll need to chat about our Hemlock road map and priorities before
making any estimates. For what it's worth, I'm personally very
interested in working on this feature, so you're not alone.

Ron

Reply all
Reply to author
Forward
0 new messages