Sans Periodically call remote-- possible?

I was wondering, imagine this situation. You have browser 1 on machine 1
and browser 2 on machine 2. I created a div so that I can update certain
elements on the database. Is it possible to have the data rendered on
browser 2 using ajax but without using the periodically call remote? Is
it possible to use the submit event from browser 1 to trigger browser 2
to update?

thanks,

Bing

anyone pls?

Guest wrote:

I was wondering, imagine this situation. You have browser 1 on machine 1
and browser 2 on machine 2. I created a div so that I can update certain
elements on the database. Is it possible to have the data rendered on
browser 2 using ajax but without using the periodically call remote? Is
it possible to use the submit event from browser 1 to trigger browser 2
to update?

thanks,

Bing

On Thu Jun 22, 2006 at 04:28:34AM +0200, Bing T. wrote:

anyone pls?

your main option is probably javascript’s settimeout(), selecting things
in the db newer than a server-generated timestamp stored in the client
and rjs to update any newer elements that may have arrived… if you plan
on doing a lot of this, you might want to check out a framework like
twisted - its written in python, and is expressly designed for these
kind of realtime messaging situations, and also works with many other
protocols besides http…

carmen wrote:

On Thu Jun 22, 2006 at 04:28:34AM +0200, Bing T. wrote:

anyone pls?

your main option is probably javascript’s settimeout(), selecting things
in the db newer than a server-generated timestamp stored in the client
and rjs to update any newer elements that may have arrived… if you plan
on doing a lot of this, you might want to check out a framework like
twisted - its written in python, and is expressly designed for these
kind of realtime messaging situations, and also works with many other
protocols besides http…

Wow, I was pretty overwhelmed after checking twisted. Well, I don’t have
any knowledge with python for one. Have you tried using twisted to work
with ruby? I checked out thr RAA and found several event frameworks but
again, still overwhelmed with which project maybe possible for what I
need- as I searched for projects with the keyword “events”

On Jun 21, 2006, at 8:44 PM, Bing T. wrote:

on doing a lot of this, you might want to check out a framework like
but
again, still overwhelmed with which project maybe possible for what I
need- as I searched for projects with the keyword “events”


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Have a look at EventMachine. Its on rubyforge.org. Its a very nice
event driven framework for ruby.

-Ezra

Ezra Z. wrote:

On Jun 21, 2006, at 8:44 PM, Bing T. wrote:

on doing a lot of this, you might want to check out a framework like
but
again, still overwhelmed with which project maybe possible for what I
need- as I searched for projects with the keyword “events”


Posted via http://www.ruby-forum.com/.


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

Have a look at EventMachine. Its on rubyforge.org. Its a very nice
event driven framework for ruby.

-Ezra

Hi Ezra,

I was just about to check EventMachine out. But can you help me out,
when you say it’s single-threaded what does it exactly mean? it means
that each client browser can only make one thread with the server at a
time?

thanks,

Bing

I had checked out Eventmachine and had a look at the forum. There was an
inquiry there by a potential user with almost the exact same problem as
mine and one of the responses indicated that, what I’m trying to do here
is to evade the polling action of ajax which eventmachine isn’t build
for.

On another note though, do you think it is possible to put an observer
field on a remote 2 browser that references against the actions from my
browser? It’s interesting but I totally don’t have any idea how it is
done. For example I was trying to check out gtalk inside gmail on my
browser. whenever I am typing, the person I’m talking to sees that
“user1 is typing…”

does it mean that upon creation of the js window, an observer is created
that is referenced again the person I am talking to?

These things are taken for granted so often but it’s so painfully
difficult to do!

thanks,

Bing

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs