Architecture for concurrency
by Joan Miller
Hi everybody!
your project looks awesome and it gives me confidence to use TG2 but
I'm going to comment anything about the architecture:
Twisted is great, but forces you into callback hell. In change, pyev
[1] is cool, or you could be more interested io Tornado [2], the
scalable, non-blocking web server that power FriendFeed.
[1] http://code.google.com/p/pyev/
[2] http://www.tornadoweb.org/
14 years, 4 months
AMQP support & remaining issue
by Luke Macken
Hey all,
So over the past few weeks I've been working on solidifying AMQP support within
Moksha. I created a new AMQPSocket backend for the LiveSocket, and made it
dead simple to enable.
The patch below is an example of how to hook your Moksha app up to the public
(temporary) Fedora Qpid AMQP broker.
This makes your widgets to speak the AMQP protocol through the Orbited proxy to
the message broker.
Things should work fine for the majority of cases, but I'm currently working
with J5 to squash one last bug that occurs when receiving large amounts of data
from a remote broker. I wasn't able to reproduce this issue with a local Qpid
instance, so I'm assuming the broker is framing segments differently due to the
latency of the connection. Anyway, we'll keep you all posted on the progress.
luke
--- a/development.ini
+++ b/development.ini
@@ -81,7 +81,7 @@ app_db = sqlite:///%s.db
# The backing protocol for live widgets.
# Available backends: stomp, amqp
-moksha.livesocket.backend = stomp
+moksha.livesocket.backend = amqp
# The location of our Orbited server
orbited_host = localhost
@@ -90,17 +90,17 @@ orbited_scheme = http
# Stomp broker configuration.
# By default we use the MorbidQ broker, run by Orbited, for development.
-stomp_broker = localhost
-stomp_port = 61613
-stomp_user = guest
-stomp_pass = guest
+#stomp_broker = localhost
+#stomp_port = 61613
+#stomp_user = guest
+#stomp_pass = guest
# Optional AMQP Broker
-#amqp_broker = guest/guest@localhost
-#amqp_broker_host = localhost
-#amqp_broker_port = 5672
-#amqp_broker_user = guest
-#amqp_broker_pass = guest
+amqp_broker = guest/guest@publictest8.fedoraproject.org:80
+amqp_broker_host = publictest8.fedoraproject.org
+amqp_broker_port = 80
+amqp_broker_user = guest
+amqp_broker_pass = guest
# Documentation directory
docs_dir = docs
--- a/orbited.cfg
+++ b/orbited.cfg
@@ -13,6 +13,7 @@ stomp://:61613
* -> localhost:61613
# AMQP broker
* -> localhost:5672
+* -> publictest8.fedoraproject.org:80
# IRC
* -> irc.freenode.net:6667
14 years, 4 months
json connector and torrent stats
by Seth Vidal
So I went through the faq and generated a widget for statistics of the
current torrents. I also sorted through what I will need to do the
flotwidget graph over time but I need to sort out where the data will be
stored and what will be fetching it first.
Patch is attached. It includes a generic json connector for getting random
json data and then doing _something_ with it. There are a couple of fixmes
in the code about whitelisting the urls the connector is allowed to visit.
A couple of questions:
- why the @classmethod decorator use in the connectors? It doesn't SEEM
to be necessary but I'm not sure if it was something I missed in my own
testing
- Related - what is the point of the registering in the
IQuery/ICall/IConnect objects? Feels like a lot of redundant typing.
- It would make life somewhat easier if there was a better way from within
a page to know where within the code it lived. I was doing a lot of
grepping to figure out where to look for other things. A trackback when in
development mode would help make finding things simpler.
Comments on the attached code welcome.
-sv
14 years, 4 months