Falco mentioned in another thread that he avoided a similar problem by
putting the two Comet end-points in different controllers. I think the
issue might be browser-related since browsers implement rules about
how many open connections you can have to a particular server (maybe
URL?) at one time.
To support many kinds of updates, I think the right approach is to
just use one Comet connection for each user and funnel all of a user's
updates into that user's BossMQ channel. So the BossNews callback
should push updates to each connected user's channel, rather than to
one generic channel. Does that make sense? It will require a bit of
work, but I think having a separate connection for each type of update
won't scale from the browser's perspective.
Evan
--
Evan Miller
http://www.evanmiller.org/
init() ->
{ok, WatchId} = boss_news:watch("greetings",
fun(created, NewGreeting) ->
boss_mq:push("new-greetings", NewGreeting);
(deleted, OldGreeting) ->
boss_mq:push("old-greetings", OldGreeting)
end),
{ok, [WatchId]}.