I'm working on a Rails 3.1 chat-type app and I'm seeing a couple of
things I need some advice on.
First, it taking what seems to me to be a long (5+ seconds) period of
time for a client to get subscribed. Is that normal?
Second, clients are getting disconnected with regularity. I've pasted
some logging from Juggernaut below. The output represents 2 clients
sitting 'idle' wrt user intervention.
Any help understanding this behavior and advice on how I might go
about 'correcting' it would be very much appreciated.
TIA,
Bill
25 Oct 22:27:54 - Initializing client with transport "xhr-polling"
25 Oct 22:27:54 - Client 24299525143578649 connected
25 Oct 22:27:54 - Received: {"type":"subscribe","channel":"/chat/7"}
25 Oct 22:27:54 - Client subscribing to: /chat/7
25 Oct 22:28:02 - Client 6432006370741874 disconnected
25 Oct 22:30:00 - Initializing client with transport "xhr-polling"
25 Oct 22:30:00 - Client 12582906801253557 connected
25 Oct 22:30:00 - Received: {"type":"subscribe","channel":"/chat/7"}
25 Oct 22:30:00 - Client subscribing to: /chat/7
25 Oct 22:30:07 - Client 24299525143578649 disconnected
25 Oct 22:32:05 - Initializing client with transport "xhr-polling"
25 Oct 22:32:05 - Client 7235994231887162 connected
25 Oct 22:32:05 - Received: {"type":"subscribe","channel":"/chat/7"}
25 Oct 22:32:05 - Client subscribing to: /chat/7
25 Oct 22:32:13 - Client 12582906801253557 disconnected
25 Oct 22:34:11 - Initializing client with transport "xhr-polling"
25 Oct 22:34:11 - Client 3601086374837905 connected
25 Oct 22:34:11 - Received: {"type":"subscribe","channel":"/chat/7"}
25 Oct 22:34:11 - Client subscribing to: /chat/7
--
You received this message because you are subscribed to the Google Groups "Juggernaut 2" group.
To post to this group, send email to juggernaut...@googlegroups.com.
To unsubscribe from this group, send email to juggernaut-for-r...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/juggernaut-for-rails?hl=en.
Thanks very much for your reply. I appreciate it.
The example I posted was with one client on FF 3.6.23 and the other on
Chrome 15.0.874.106. Socket.io is at 0.7.9. The browsers were
running on the same machine as the app which is Rails 3.1 on top of
Ruby 1.9.2. The only additional piece of information I can think of
that may be relevant is that the clients are also using the jQuery
countdown timer plugin. I mention it because it occurred to me last
night that perhaps the countdown timer might be somehow 'getting in
the way' of Juggernaut and causing a timeout, but that's an uninformed
hypothesis.
Best regards,
Bill
BTW, I'm probably going to be bothering you over on the Spine list soon too. ;-)
Thanks,
Bill
wildbill@wildbill-hp-laptop:/$ sudo find -name socket.io
./usr/local/lib/node_modules/juggernaut/node_modules/socket.io
./usr/local/lib/node_modules/juggernaut/node_modules/socket.io/lib/socket.io
./home/wildbill/.npm/socket.io
./home/wildbill/.npm/socket.io/0.6.18/package/lib/socket.io
./home/wildbill/.rvm/gems/ruby-1.9.2-p290@chat/bundler/gems/juggernaut-6085a3497efb/vendor/socket.io
./home/wildbill/node_modules/socket.io
Which of these is _supposed_ to be there? And, by extension, which
should I update?
Thanks,
Bill
Does this look normal? Or like part of the problem? I was pretty
sure I got the installation right, but this gives me pause.
Thanks,
Bill
The Gemfile is pulling it from github. The "gem list" command doesn't
show it installed but "bundle show" tells me it's using 2.0.1. I was
a little surprised with the "gem list" result. Have only been using
RVM for a couple of months and jugggernaut is the only gem being
pulled into the mix in this way (gem 'juggernaut', :git =>
'git://github.com/maccman/juggernaut.git'). Do I need to do a "gem
install" for it?
Thanks,
Bill
PS. I saw on your blog that you're headed to NYC. If you decide
you'd like to see some of Texas, shoot me a note. I'd be very happy
to get you 'pointed.'
SXSW isn't too far off. If your flight plan takes you through DFW,
let me know. Depending on schedules, maybe I can pick you up drive
you down. The most direct route down the Interstate highway doesn't
have much to recommend it in terms of scenery, but a slightly longer
route gets you there through the Texas Hill Country.
wildbill@wildbill-hp-laptop:~/rails_apps/penny_auction$ npm info juggernaut
{ name: 'juggernaut',
description: 'Realtime PubSub server push.',
'dist-tags': { latest: '2.0.9' },
versions:
[ '2.0.0',
'2.0.1',
'2.0.2',
'2.0.3',
'2.0.4',
'2.0.5',
'2.0.6',
'2.0.7',
'2.0.8',
'2.0.9' ],
maintainers: 'maccman <mac...@gmail.com>',
author: 'maccman',
repository:
{ type: 'git',
url: 'git://github.com/maccman/juggernaut.git' },
time:
{ '2.0.0': '2011-03-23T21:34:41.793Z',
'2.0.1': '2011-03-23T21:34:41.793Z',
'2.0.2': '2011-03-23T21:45:53.367Z',
'2.0.3': '2011-03-30T00:51:40.453Z',
'2.0.4': '2011-04-04T23:30:21.967Z',
'2.0.5': '2011-05-16T21:48:56.966Z',
'2.0.6': '2011-09-21T18:00:31.218Z',
'2.0.7': '2011-09-21T22:14:19.189Z',
'2.0.8': '2011-09-27T20:47:42.979Z',
'2.0.9': '2011-09-28T12:31:16.296Z' },
version: '2.0.9',
licenses:
{ type: 'MIT',
url: 'https://github.com/maccman/juggernaut/blob/master/LICENSE' },
engine: 'node >=0.1.102',
main: './index',
bin: { juggernaut: './server.js' },
dependencies:
{ 'socket.io': '=0.8.4',
redis: '=0.6.6',
'node-static-maccman': '~0.5.3',
optimist: '~0.2.3' },
scripts: { start: 'node server.js' },
devDependencies: {},
engines: { node: '*' },
dist:
{ shasum: 'fffb430b8a00521ce0fbbc3f85a55444a6e01bbb',
tarball: 'http://registry.npmjs.org/juggernaut/-/juggernaut-2.0.9.tgz' },
directories: {} }
Thank you, Alex!
Bill
I just got a few minutes (forgot tonight was Halloween) and have some
strange (to me) news to report.
I modified the Gemfile (substituting '~> 2.1.0' for the git string),
installed the gem, and thought I'd 'fire it up' and see if the new
version fixed the issue I was having. So I did what I always do.
Opened a terminal and started redis. Opened another and started
juggernaut. Oops. "juggernaut: command not found." Hmmm. Oh hell.
I installed the gem but not the new version of juggernaut. npm
install -g juggernaut. npm: command not found. Hmmm. It's late so
I'm not going to dig into it tonight. I've still got a working
version on the laptop that I can use for comparison. If you've got
any ideas re: what I might have done wrong or what I might be missing,
please let me know.
Thanks,
Bill
Here's the output from the same commands on the workstation. I note
that node is in fact responsive, but juggernaut and npm are not. I
wonder if all the extra 'stuff' in PATH isn't the problem, but I
haven't been able to nail down exactly where it's being added. Any
pointers would be tremendously appreciated!
wildbill@wildbill-desktop2:~$ juggernaut -help
juggernaut: command not found
wildbill@wildbill-desktop2:~$ node -v
v0.4.11
wildbill@wildbill-desktop2:~$ npm ls
No command 'npm' found, did you mean:
Command 'dpm' from package 'dpm-postgres' (universe)
Command 'dpm' from package 'dpm-mysql' (universe)
Command 'apm' from package 'apmd' (main)
Command 'rpm' from package 'rpm' (main)
Command 'gpm' from package 'gpm' (universe)
Command 'pm' from package 'powerman' (universe)
Command 'nm' from package 'binutils' (main)
Command 'nm' from package 'binutils-multiarch' (universe)
Command 'fpm' from package 'fpm2' (universe)
Command 'npg' from package 'netdisco-backend' (universe)
Command 'epm' from package 'epm' (universe)
npm: command not found
wildbill@wildbill-desktop2:~$ echo $PATH
/home/wildbill/.rvm/bin:/home/wildbill/.rvm/gems/ruby-1.9.2-head/bin:/home/wildbill/.rvm/gems/ruby-1.9.2-head@global/bin:/home/wildbill/.rvm/rubies/ruby-1.9.2-head/bin:/home/wildbill/bin:/home/wildbill/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
--------------- I really wish I'd compared PATH values prior to making
the change -----------
PATH from laptop
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/wildbill/.rvm/bin
PATH from workstation (with extra 'stuff' removed)
--
You received this message because you are subscribed to the Google Groups "Juggernaut 2" group.
To post to this group, send email to juggernaut...@googlegroups.com.
To unsubscribe from this group, send email to juggernaut-for-r...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/juggernaut-for-rails?hl=en.