Git Product home page Git Product logo

hookbox's Introduction

= HookBox Notes =

Hookbox is a comet server and message queue that tightly integrates with web application frameworks. The goal of Hookbox is to allow your web application (php, django, rails, etc.) to handle all of the logic pertaining to authentication, authorization, logging, message transformation, etc, while still hiding the hard parts of Comet.

== Hookbox HTTP Api ==

=== /publish ===

Request

    URL: [HOOKBOX]/publish

Request Form:
    channel_name: The destination to publish the message
    payload: (default null) The payload for the message

Responses
    true: It worked
    false: Some error occurred

=== /channel_info ===

Request

    URL: [HOOKBOX]/channel_info

Request Form:
    channel_name: The destination to publish the message
    payload: (default null) The payload for the message

Response:
    true: It worked
    false: Some error occurred

Response Data
    channel_name (string): The name of the channel
    subscribers (list): List of channel subscribers
    reflective (bool): Does this channel reflect publishes to publisher
    history (int): Length of history kept in the channel

=== /set_channel_options ===

Request

    URL: [HOOKBOX]/set_channel_options

Request Form:
    channel_name: The name of the channel to modify with the given options.
    reflective: (bool, default=true)
    history_size: (int, default=0) Determines the size of the history kept per channel. This history is sent to users when they subscribe to a channel.
    moderated: (bool, default=true) If true, then all events on the channel must be authorized via a callback.
    moderated_publish: (bool, default=true) If true, publish events must be authorized via a callback.
    moderated_subscribe: (bool, default=true) If true, subscribe events must be authorized via a callback.
    moderated_unsubscribe: (bool, default=true) If true, unsubscribe events must be authorized via a callback.
    presenceful: (bool, default=false) If true, presence lists will be attached to each publish frame. Also, SUBSCRIBED and UNSUBSCRIBED frames will be sent to all channel subscribers when another user subscribes or unsubscribes.
    anonymous: (bool, default=false) If true, usernames will be omitted from publish frames
Response:
    true: It worked
    false: Some error occurred

Response Data
    None

== HookBox Webhooks ==

Each webhook takes arguments in the form of a querystring encoded post body that should just work with existing form processing infrastructure.

Each webhook returns a JSON list, of the form [ boolean, object ]. The first argument signifies the authorization/success of the operation, and the object contains various options that vary by hook type.

All webhooks will have a "Cookie:" header with a value identical to the browser that caused the request to be initiated. The "context" of the webhook call should therefore contain a session for the originating browser.


=== connect ===

Request

    URL: [ROOT]/connect

Request Form:
    (empty)

Responses:
    true: Authorize connection
    false: Deny connection

Response Options
    name (optional): the Display Name for this connection; it will be used for presence.
    auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.
    auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.

=== create channel ===

Request
    URL: [ROOT]/create_channel

Request Form:
    destination: The channel's URI


Responses:
    true: Authorize channel creation
    false: Deny channel creation

Response Options
    history: (int, default 0) Specifies the amount of history that should be saved on the channel. When a user first subscribes they will be sent this history.
    set_history: (list, default []) Pre-populates history for the channel

Note: A create channel is issuing when a user subscribes to a non-existent destination. There will usually be a /subscribe callback immediately following a create_channel callback, unless the channel creation is denied.

=== publish ===

Request
    URL: [ROOT]/publish

Request Form:
    destination: The channel's URI
    payload: The json payload to be published

Responses:
    true: Authorize publishing
    false: Deny publishing

Response Options
    override_payload (optional): If specified, this payload will be delivered instead of the original payload
    auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.
    auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.


=== unsubscribe ===

Request
    URL: [ROOT]/unsubscribe

Request Form:
    destination: The channel's URI

Responses:
    true: Authorize unsubscribe
    false: Deny unsubscribe

Response Options
    auto_subscribe (optional): (list) A list of channels to attempt to auto-subscribe the user. Each will generate a subscribe callback.
    auto_unsubscribe (optional): (list) A list of channels to attempt to auto-unsubscribe the user. Each will generate an unsubscribe callback.


=== disconnect ===

Request
    URL: [ROOT]/disconnect

Request Form:
    channels: (list) The channels the users was in.

Responses:
    true: Required (Doesn't really do anything)
    false: Meaningless (but does the same as true.)

Response Options
    (None)

== Overview ==

A typical session with a Hookbox application might Look like this:

1) User navigates to http://www.example.com/index.html
    The user is given a login page, which he fills out.
2) Browser POSTs to http://www.example.com/login
    Included in the post body is the username and password
3) Web application returns Cookie: session_id=abc;
4) Web application redirects user to http://www.example.com/home
    The user is now logged into the application and sees the gui
5) Browser calls hookbox.connect('http://hookbox.example.com')
6) Browser send a CONNECT frame to hookbox, including { cookie: "session_id=abc"; }
7) Hookbox makes an HTTP POST to http://www.example.com/hookbox/connect
    Hookbox includes the header "Cookie: session_id=abc;"
8) The Web Application responds with a json payload: [ true, {}]
    This gives authorization for the client to connect
9) Browser calls hookbox.publish('test.location', ["Hello", "World"]

10) Hookbox makes an HTTP POST to http://www.example.com/hookbox/publish
    Hookbox includes the header "Cookie: session_id=abc;"
    Hookbox includes a query string in the POST body with the data
        payload=["Hello", "World"]
        channel_name=test.location
11) The Web app returns the json payload: [true, { } ]
    This gives authorization for the client to publish the message
12) Hookbox sends a PUBLISH frame to all clients currently subscribed to the
    channel 'test.location'

hookbox's People

Contributors

alcides avatar alexharo avatar briandorsey avatar bubbleboy14 avatar desmaj avatar dlg avatar fairfieldt avatar faulkner avatar honzakral avatar jordoh avatar leopd avatar mcarter avatar msch avatar skaughtx0r avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hookbox's Issues

private users<-> user messaging

I know we discussed private messaging on irc, and its a planned feature - but i'll add a ticket here so it doesnt get lost and we can track progress.

Hosted Hookbox, mangling Payload Objects sent to Webhook

It seems that the Hosted Hookbox parses the JSON from the payload, but then returns a print of the parsed JSON.

It's currently passing this to my callback: {u'data': u'MyMessage', u'type': u'message'}

The u'data' is clearly indicative of a dict being printed out rather than having json.dumps() called on it.

hookbox is unable to relay messages with unicode characters

I managed to write a simple chat application.
If I try writing in Bulgarian, Hookbox fails with the following error in the console:

Traceback (most recent call last):
File "/home/Programming/pylons/virtualenv-0.9.7/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/wsgi.py", line 306, in handle_one_response
result = self.application(self.environ, start_response)
File "/usr/lib/python2.6/site-packages/paste/urlmap.py", line 202, in call
return app(environ, start_response)
File "build/bdist.linux-x86_64/egg/csp_eventlet/init.py", line 77, in call
x = handler(session, environ, start_response)
File "build/bdist.linux-x86_64/egg/csp_eventlet/init.py", line 100, in render_send
session.read(environ['csp.form'].get('d', ''))
File "build/bdist.linux-x86_64/egg/csp_eventlet/init.py", line 228, in read
data = str(data)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 51-54: ordinal not in range(128)

installation issues : NameError: global name 'eventlet' is not defined

Hi,

We're trying to install Hookbox but this error appears every time :

[dev@xxx]$ hookbox -help
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/bin/hookbox", line 8, in
load_entry_point('hookbox==0.3.3', 'console_scripts', 'hookbox')()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 277, in load_en try_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 2179, in load_e ntry_point
return ep.load()
File "/usr/lib/python2.5/site-packages/pkg_resources.py", line 1912, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.5/site-packages/hookbox-0.3.3-py2.5.egg/hookbox/start.p y", line 2, in
import output_wrapper
File "/usr/lib/python2.5/site-packages/hookbox-0.3.3-py2.5.egg/hookbox/output_ wrapper.py", line 46, in
import eventlet
File "/usr/lib/python2.5/site-packages/eventlet-0.9.10.dev1-py2.5.egg/eventlet /init.py", line 45, in
traceback.print_exc()
File "/usr/lib/python2.5/traceback.py", line 227, in print_exc
print_exception(etype, value, tb, limit, file)
File "/usr/lib/python2.5/traceback.py", line 124, in print_exception
print(file, 'Traceback (most recent call last):')
File "/usr/lib/python2.5/traceback.py", line 13, in print
file.write(str+terminator)
File "/usr/lib/python2.5/site-packages/hookbox-0.3.3-py2.5.egg/hookbox/output
wrapper.py", line 8, in write
self.outputter.write(self.orig, data)
File "/usr/lib/python2.5/site-packages/hookbox-0.3.3-py2.5.egg/hookbox/output
wrapper.py", line 40, in write
eventlet.spawn(self.do_write)
NameError: global name 'eventlet' is not defined

After reading other issues, we update eventlet to 0.9.10dev but the problem is still there.

Any ideas of something we've missed ?
All my thanks in advance :)

Plo.

better descriptions for exceptions

Hi,

i got this today, from hookbox when it couldnt connect to my callback:
error: (111, 'ECONNREFUSED')
desmaj explained to me what it means, but a better description would help me debug that stuff on my own.

Make connected users' ip addresses available from hookbox admin page (and possibly web apps via hookbox)

Sometimes it can be useful to know who is interacting with the web app and whether connected users are unique persons/machines or one with multiple browsers or browser tabs connected to the page. Allowing admins to see the ip addresses of connected users via the admin page would help to this end. Allowing the web app itself access to connected users' originating ip addresses would help in cases where you wanted to restrict access to the web app to certain ips, etc.

Method Addition - Publish via Subscription, JS API

The addition of a publish method to the subscription object returned by the JS API should probably contain the publish method as described in the API docs. Leaving the conn.publish() method would be easy enough, however a method from within the subscription method which automatically substituted the channel name parameter and passed handling to the conn object would be simplistic and make more sense.

This way, arrays of subscription objects can be used and the publish method could be called on each rather than extracting the channel name from each in order to use the conn.publish() method.

/csp not required in hookbox.connect js?

On using
conn = hookbox.connect('http://' + jshost + ':8001' + '/csp');

there is an error

Seems like the request ends up going to /csp/csp/handshake?ct=application%2Fjavascript

At least the connection establishment works when I use

conn = hookbox.connect('http://' + jshost + ':8001' + '/csp');

instead.

Hope it helps. The docs say use '/csp' pretty explicitly.

UI issue in Opera 10.61

There's an annoying cursor and progress bar indicating that the page is constantly loading while the connection persists.

Add datetimes to publish/(un)subscribe events and history

Hookbox should keep track of when these events happen.

The connect frame should require javascript to send the current datetime according to the client, and hookbox's reply should include the time differential between the client and server. The hookbox js client should then modify all datetimes on events by adding the time differential.

Installation problem with easy_install

...
Downloading http://pypi.python.org/packages/source/g/greenlet/greenlet-0.3.1.tar.gz#md5=8d75d7f3f659e915e286e1b0fa0e1c4d
Processing greenlet-0.3.1.tar.gz
Running greenlet-0.3.1/setup.py -q bdist_egg --dist-dir /tmp/easy_install-qAAW5M/greenlet-0.3.1/egg-dist-tmp-WX8OoM
/usr/lib/python2.6/distutils/dist.py:266: UserWarning: Unknown distribution option: 'repository'
warnings.warn(msg)
In file included from greenlet.c:5:
greenlet.h:11:20: error: Python.h: No such file or directory
In file included from greenlet.c:5:
greenlet.h:16: error: expected specifier-qualifier-list before ‘PyObject_HEAD’
greenlet.c:6:26: error: structmember.h: No such file or directory
greenlet.c:115: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘PyGreenlet_Type’
greenlet.c:118: error: ‘NULL’ undeclared here (not in a function)
greenlet.c:124: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:125: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:133: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:134: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:135: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:136: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c: In function ‘green_create_main’:
greenlet.c:159: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:159: error: (Each undeclared identifier is reported only once
greenlet.c:159: error: for each function it appears in.)
greenlet.c:159: error: ‘dict’ undeclared (first use in this function)
greenlet.c:159: warning: implicit declaration of function ‘PyThreadState_GetDict’
greenlet.c:161: warning: implicit declaration of function ‘PyErr_Occurred’
greenlet.c:162: warning: implicit declaration of function ‘PyErr_NoMemory’
greenlet.c:167: warning: implicit declaration of function ‘PyType_GenericAlloc’
greenlet.c:167: error: ‘PyGreenlet_Type’ undeclared (first use in this function)
greenlet.c:167: warning: cast to pointer from integer of different size
greenlet.c:170: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:171: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:172: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:173: warning: implicit declaration of function ‘Py_INCREF’
greenlet.c: In function ‘green_updatecurrent’:
greenlet.c:182: error: ‘PyThreadState’ undeclared (first use in this function)
greenlet.c:182: error: ‘tstate’ undeclared (first use in this function)
greenlet.c:185: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:185: error: ‘deleteme’ undeclared (first use in this function)
greenlet.c:189: warning: implicit declaration of function ‘PyDict_SetItem’
greenlet.c:189: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:189: error: ‘ts_curkey’ undeclared (first use in this function)
greenlet.c:189: error: expected expression before ‘)’ token
greenlet.c:193: warning: implicit declaration of function ‘PyThreadState_GET’
greenlet.c:195: warning: implicit declaration of function ‘PyDict_GetItem’
greenlet.c:195: warning: cast to pointer from integer of different size
greenlet.c:198: error: ‘Py_None’ undeclared (first use in this function)
greenlet.c:199: warning: implicit declaration of function ‘PyErr_Clear’
greenlet.c:208: warning: implicit declaration of function ‘Py_DECREF’
greenlet.c:211: error: ‘ts_delkey’ undeclared (first use in this function)
greenlet.c:213: warning: implicit declaration of function ‘PyList_SetSlice’
greenlet.c:213: error: ‘INT_MAX’ undeclared (first use in this function)
greenlet.c: At top level:
greenlet.c:218: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c: In function ‘g_save’:
greenlet.c:241: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c:242: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:243: warning: implicit declaration of function ‘assert’
greenlet.c:243: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:245: warning: implicit declaration of function ‘PyMem_Realloc’
greenlet.c:245: error: ‘PyGreenlet’ has no member named ‘stack_copy’
greenlet.c:245: warning: initialization makes pointer from integer without a cast
greenlet.c:250: warning: implicit declaration of function ‘memcpy’
greenlet.c:250: warning: incompatible implicit declaration of built-in function ‘memcpy’
greenlet.c:250: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:251: error: ‘PyGreenlet’ has no member named ‘stack_copy’
greenlet.c:252: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c: In function ‘slp_restore_state’:
greenlet.c:262: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c:263: warning: incompatible implicit declaration of built-in function ‘memcpy’
greenlet.c:263: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:263: error: ‘PyGreenlet’ has no member named ‘stack_copy’
greenlet.c:263: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c:264: warning: implicit declaration of function ‘PyMem_Free’
greenlet.c:264: error: ‘PyGreenlet’ has no member named ‘stack_copy’
greenlet.c:265: error: ‘PyGreenlet’ has no member named ‘stack_copy’
greenlet.c:266: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c:268: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:268: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:269: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:269: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:271: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c: In function ‘slp_save_state’:
greenlet.c:277: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:278: error: ‘PyGreenlet’ has no member named ‘stack_saved’
greenlet.c:279: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:280: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:282: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:284: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:286: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:288: error: ‘PyGreenlet’ has no member named ‘stack_prev’
In file included from slp_platformselect.h:8,
from greenlet.c:314:
platform/switch_amd64_unix.h: In function ‘slp_switch’:
platform/switch_amd64_unix.h:42: error: ‘PyGreenlet’ has no member named ‘stack_start’
platform/switch_amd64_unix.h:42: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c: In function ‘g_switchstack’:
greenlet.c:340: error: ‘PyThreadState’ undeclared (first use in this function)
greenlet.c:340: error: ‘tstate’ undeclared (first use in this function)
greenlet.c:341: error: ‘PyGreenlet’ has no member named ‘recursion_depth’
greenlet.c:342: error: ‘PyGreenlet’ has no member named ‘top_frame’
greenlet.c:347: warning: implicit declaration of function ‘Py_XDECREF’
greenlet.c:347: error: ‘ts_passaround_args’ undeclared (first use in this function)
greenlet.c:350: error: ‘ts_passaround_kwargs’ undeclared (first use in this function)
greenlet.c:355: error: ‘PyGreenlet’ has no member named ‘recursion_depth’
greenlet.c:356: error: ‘PyGreenlet’ has no member named ‘top_frame’
greenlet.c:357: error: ‘PyGreenlet’ has no member named ‘top_frame’
greenlet.c: At top level:
greenlet.c:365: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:433: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c: In function ‘g_initialstub’:
greenlet.c:470: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:470: error: ‘o’ undeclared (first use in this function)
greenlet.c:473: error: ‘run’ undeclared (first use in this function)
greenlet.c:473: warning: implicit declaration of function ‘PyObject_GetAttrString’
greenlet.c:473: error: expected expression before ‘)’ token
greenlet.c:475: error: ‘ts_passaround_args’ undeclared (first use in this function)
greenlet.c:478: error: ‘ts_passaround_kwargs’ undeclared (first use in this function)
greenlet.c:483: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:484: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:484: warning: implicit declaration of function ‘green_statedict’
greenlet.c:484: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:485: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:489: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:490: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:491: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:493: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:493: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:496: error: ‘PyGreenlet’ has no member named ‘stack_prev’
greenlet.c:498: error: ‘PyGreenlet’ has no member named ‘top_frame’
greenlet.c:499: error: ‘PyGreenlet’ has no member named ‘recursion_depth’
greenlet.c:499: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c:507: error: ‘args’ undeclared (first use in this function)
greenlet.c:508: error: ‘kwargs’ undeclared (first use in this function)
greenlet.c:509: error: ‘result’ undeclared (first use in this function)
greenlet.c:511: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:519: warning: implicit declaration of function ‘PyEval_CallObjectWithKeywords’
greenlet.c:525: warning: implicit declaration of function ‘g_handle_exit’
greenlet.c:528: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:529: warning: implicit declaration of function ‘g_switch’
greenlet.c:529: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:531: warning: implicit declaration of function ‘PyErr_WriteUnraisable’
greenlet.c:531: error: expected expression before ‘)’ token
greenlet.c:532: warning: implicit declaration of function ‘Py_FatalError’
greenlet.c: At top level:
greenlet.c:541: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:558: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c:559: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c:561: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c:561: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c: In function ‘green_init’:
greenlet.c:563: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:563: error: ‘run’ undeclared (first use in this function)
greenlet.c:564: error: ‘nparent’ undeclared (first use in this function)
greenlet.c:566: warning: implicit declaration of function ‘PyArg_ParseTupleAndKeywords’
greenlet.c:566: error: ‘args’ undeclared (first use in this function)
greenlet.c:566: error: ‘kwargs’ undeclared (first use in this function)
greenlet.c:571: error: too many arguments to function ‘green_setrun’
greenlet.c:575: error: too many arguments to function ‘green_setparent’
greenlet.c: In function ‘kill_greenlet’:
greenlet.c:586: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:586: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c:590: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:590: error: ‘result’ undeclared (first use in this function)
greenlet.c:591: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:591: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c:595: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:597: warning: implicit declaration of function ‘PyErr_SetNone’
greenlet.c:597: error: ‘PyExc_GreenletExit’ undeclared (first use in this function)
greenlet.c:607: error: ‘lst’ undeclared (first use in this function)
greenlet.c:608: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:608: error: ‘ts_delkey’ undeclared (first use in this function)
greenlet.c:610: warning: implicit declaration of function ‘PyList_New’
greenlet.c:611: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:615: warning: implicit declaration of function ‘PyList_Append’
greenlet.c:615: error: expected expression before ‘)’ token
greenlet.c:617: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:617: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c: In function ‘green_dealloc’:
greenlet.c:655: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:655: error: ‘error_type’ undeclared (first use in this function)
greenlet.c:655: error: ‘error_value’ undeclared (first use in this function)
greenlet.c:655: warning: left-hand operand of comma expression has no effect
greenlet.c:655: error: ‘error_traceback’ undeclared (first use in this function)
greenlet.c:655: warning: left-hand operand of comma expression has no effect
greenlet.c:662: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:662: error: ‘tmp’ undeclared (first use in this function)
greenlet.c:662: error: expected expression before ‘)’ token
greenlet.c:662: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:662: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:663: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c:666: error: expected expression before ‘)’ token
greenlet.c:667: error: expected expression before ‘)’ token
greenlet.c:669: warning: implicit declaration of function ‘PyErr_Fetch’
greenlet.c:671: error: expected expression before ‘)’ token
greenlet.c:675: warning: implicit declaration of function ‘PyErr_Restore’
greenlet.c:679: error: expected expression before ‘)’ token
greenlet.c:680: error: expected expression before ‘)’ token
greenlet.c:681: error: expected expression before ‘)’ token
greenlet.c:684: error: ‘f’ undeclared (first use in this function)
greenlet.c:684: warning: implicit declaration of function ‘PySys_GetObject’
greenlet.c:686: warning: implicit declaration of function ‘PyFile_WriteString’
greenlet.c:688: warning: implicit declaration of function ‘PyFile_WriteObject’
greenlet.c:688: error: expected expression before ‘)’ token
greenlet.c:693: error: expected expression before ‘)’ token
greenlet.c:695: error: expected expression before ‘)’ token
greenlet.c:696: warning: implicit declaration of function ‘Py_NewReference’
greenlet.c:696: error: expected expression before ‘)’ token
greenlet.c:700: error: expected expression before ‘)’ token
greenlet.c:708: error: ‘PyGreenlet’ has no member named ‘weakreflist’
greenlet.c:709: warning: implicit declaration of function ‘PyObject_ClearWeakRefs’
greenlet.c:709: error: expected expression before ‘)’ token
greenlet.c:710: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:710: error: expected expression before ‘)’ token
greenlet.c:710: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:710: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:711: error: expected expression before ‘)’ token
greenlet.c:711: error: expected ‘)’ before ‘self’
greenlet.c: At top level:
greenlet.c:719: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:732: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:747: error: expected ‘)’ before string constant
greenlet.c:765: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:788: error: expected ‘)’ before string constant
greenlet.c:803: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c: In function ‘green_bool’:
greenlet.c:877: error: ‘PyGreenlet’ has no member named ‘stack_start’
greenlet.c: At top level:
greenlet.c:880: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:891: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:901: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c: In function ‘green_setrun’:
greenlet.c:903: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:903: error: ‘o’ undeclared (first use in this function)
greenlet.c:904: error: ‘PyGreenlet’ has no member named ‘stack_stop’
greenlet.c:905: warning: implicit declaration of function ‘PyErr_SetString’
greenlet.c:905: error: ‘PyExc_AttributeError’ undeclared (first use in this function)
greenlet.c:910: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:911: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:911: error: ‘nrun’ undeclared (first use in this function)
greenlet.c:912: warning: implicit declaration of function ‘Py_XINCREF’
greenlet.c: At top level:
greenlet.c:917: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:924: error: expected declaration specifiers or ‘...’ before ‘PyObject’
greenlet.c: In function ‘green_setparent’:
greenlet.c:927: error: ‘nparent’ undeclared (first use in this function)
greenlet.c:928: error: ‘PyExc_AttributeError’ undeclared (first use in this function)
greenlet.c:931: warning: implicit declaration of function ‘PyObject_TypeCheck’
greenlet.c:931: error: ‘PyGreenlet_Type’ undeclared (first use in this function)
greenlet.c:932: error: ‘PyExc_TypeError’ undeclared (first use in this function)
greenlet.c:935: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:937: error: ‘PyExc_ValueError’ undeclared (first use in this function)
greenlet.c:941: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c:942: error: ‘PyGreenlet’ has no member named ‘parent’
greenlet.c: At top level:
greenlet.c:948: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c: In function ‘PyGreenlet_GetCurrent’:
greenlet.c:965: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:965: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c: In function ‘PyGreenlet_SetParent’:
greenlet.c:975: error: ‘PyGreenlet’ has no member named ‘run_info’
greenlet.c:975: error: invalid type argument of ‘->’ (have ‘int’)
greenlet.c:979: error: ‘PyGreenlet_Type’ undeclared (first use in this function)
greenlet.c:980: error: ‘PyExc_TypeError’ undeclared (first use in this function)
greenlet.c:984: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:984: error: expected expression before ‘)’ token
greenlet.c: At top level:
greenlet.c:988: error: expected ‘)’ before ‘
’ token
greenlet.c:1008: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:1035: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘
’ token
greenlet.c:1047: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘green_methods’
greenlet.c:1054: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘green_getsets’
greenlet.c:1066: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘green_as_number’
greenlet.c:1083: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘PyGreenlet_Type’
greenlet.c:1137: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘’ token
greenlet.c:1145: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘GreenMethods’
greenlet.c: In function ‘initgreenlet’:
greenlet.c:1173: error: ‘PyObject’ undeclared (first use in this function)
greenlet.c:1173: error: ‘m’ undeclared (first use in this function)
greenlet.c:1173: error: invalid operands to binary * (have ‘char *
’ and ‘char *’)
greenlet.c:1173: warning: statement with no effect
greenlet.c:1175: error: ‘c_api_object’ undeclared (first use in this function)
greenlet.c:1175: error: invalid operands to binary * (have ‘char *
’ and ‘char *’)
greenlet.c:1175: warning: statement with no effect
greenlet.c:1185: warning: implicit declaration of function ‘Py_InitModule’
greenlet.c:1185: error: ‘GreenMethods’ undeclared (first use in this function)
greenlet.c:1185: warning: statement with no effect
greenlet.c:1192: warning: implicit declaration of function ‘PyModule_AddStringConstant’
greenlet.c:1201: error: ‘ts_curkey’ undeclared (first use in this function)
greenlet.c:1201: warning: implicit declaration of function ‘PyString_InternFromString’
greenlet.c:1201: warning: statement with no effect
greenlet.c:1202: error: ‘ts_delkey’ undeclared (first use in this function)
greenlet.c:1202: warning: statement with no effect
greenlet.c:1208: warning: implicit declaration of function ‘PyType_Ready’
greenlet.c:1208: error: ‘PyGreenlet_Type’ undeclared (first use in this function)
greenlet.c:1212: error: ‘PyExc_GreenletError’ undeclared (first use in this function)
greenlet.c:1212: warning: implicit declaration of function ‘PyErr_NewException’
greenlet.c:1212: warning: statement with no effect
greenlet.c:1217: error: ‘PyExc_GreenletExit’ undeclared (first use in this function)
greenlet.c:1218: warning: statement with no effect
greenlet.c:1225: warning: comparison of distinct pointer types lacks a cast
greenlet.c:1231: warning: implicit declaration of function ‘PyModule_AddObject’
greenlet.c:1231: error: expected expression before ‘)’ token
greenlet.c:1231: error: invalid operands to binary * (have ‘char *
’ and ‘char *’)
greenlet.c:1239: warning: implicit declaration of function ‘PyBool_FromLong’
greenlet.c:1244: error: ‘o’ undeclared (first use in this function)
greenlet.c:1244: error: invalid operands to binary * (have ‘char *
’ and ‘char *_’)
greenlet.c:1244: warning: statement with no effect
greenlet.c:1246: warning: implicit declaration of function ‘PyDict_SetItemString’
greenlet.c:1246: error: request for member ‘tp_dict’ in something not a structure or union
greenlet.c:1262: error: ‘PyGreenlet_New’ undeclared (first use in this function)
greenlet.c:1265: error: ‘PyGreenlet_Throw’ undeclared (first use in this function)
greenlet.c:1266: error: ‘PyGreenlet_Switch’ undeclared (first use in this function)
greenlet.c:1270: warning: implicit declaration of function ‘PyCObject_FromVoidPtr’
greenlet.c:1270: warning: statement with no effect
error: Setup script exited with error: command 'gcc' failed with exit status 1

Enabling hookbox to hold (web app) application data for each user

Presumably, many pages that implement hookbox will do so to allow their stateless, non-server web app (such as a web app written in php) to function something like a server by pushing updates (that are a result of connected users' interactions with the web app) to all other connected clients.

For example, in my particular app, client A interacts with the web app via standard ajax requests, and all other clients are apprised of client A's interactions via the web app calling hookbox's rest publish url. Each client's javascript then determines from the payload what action to take to represent/react to the update.

Currently, in order to update all users about a change in state for a particular user, if client A's score increases, the web app can make a rest publish to tell every client to update this user's score.

However, what happens when a new user enters the page/channel and we want to show that user all of the other user's current scores, or otherwise initialize that user to the current state of things in a different application? Since the web app is stateless, we have to query our persistent storage (MySQL) for the score of every user in the channel, or every pertinent setting, package it up, make a rest publish call, and have each user's javascript process it.

I propose that hookbox allow for arbitrary application data to be associated with each present user so that updating said information for users in the channel is trivial. If web app data could reside in a hash for each user in the channel, then that data would be accessible on the client side simply by referencing frame.user.

Getting the state for all users in the channel would be a matter of iterating over the array of present users (already made available by hoobox) and referencing a key in their hash. This would render unnecessary MySQL lookups of everything bearing on the state by the web app and additional javascript functions or switch cases. By allowing hookbox to store application data for each user in a hash for the duration of the session (which can be update or unset via a rest call), when a new user joins the channel, all of the information they might need to initialize the proper state of the application (client side) would be available from hookbox, rather than having to first query all of the information for each user from persistent storage via the stateless web app, send a rest publish, and then write client side js to iterate through it.

I know in my own use case that being able to update george.points from the web app via /rest?cmd=updateUser&user=George&key=points&value=10 and then have that data be available to users in the channel and all new users who enter the channel would greatly simplify the development of almost any multi-user application I would personally use hookbox to implement.

Thanks for reading!

Sometimes hookbox fails to autosubscribe users to channels.

This happens when I return something like:
return [True, {'name': session.get('user').get('userid'), 'auto_subscribe': ['global', session.get('user').get('partnerid')]}]
in my /hookbox/connect controller.
This only happens sometimes:

Traceback (most recent call last):
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/hubs/poll.py", line 99, in wait
listener(fileno)
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/hubs/hub.py", line 21, in call
return self.cb(_args, *_kw)
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/greenthread.py", line 195, in main
result = function(_args, *_kwargs)
File "/home/loxs/Software/hookbox/hookbox/server.py", line 216, in maybe_auto_subscribe
channel.subscribe(user, needs_auth=False)
File "/home/loxs/Software/hookbox/hookbox/channel.py", line 222, in subscribe
conn.send_frame('SUBSCRIBE', frame)
AttributeError: 'NoneType' object has no attribute 'send_frame'
Removing descriptor: 5

X-Real-IP & X-Forwarded-For headers for web callbacks

it will be useful to have these headers for web callbacks so that the web hook can see the real ip of the user.

for example when nginx does proxying:

        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

if run with --debug, hokbox try to find a module that isn't installed

$ ./hookboxStart.sh
Listening to hookbox on http://0.0.0.0:8001
Traceback (most recent call last):
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/hubs/hub.py", line 249, in fire_timers
timer()
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/hubs/timer.py", line 62, in call
cb(_args, *_kw)
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/eventlet-0.9.7-py2.6.egg/eventlet/greenthread.py", line 195, in main
result = function(_args, *_kwargs)
File "/home/loxs/itembase/virtualenv/lib/python2.6/site-packages/hookbox-0.2.6-py2.6.egg/hookbox/start.py", line 37, in debugloop
from pyjsiocompile.compile import main as pyjsiocompile
ImportError: No module named pyjsiocompile.compile

Docs: Mako template error on sphinx_building

The generation works as intended, but when I look at the generated index.hmlt, the _() function is reported to be missing.

As someone reported on the mailing list, I get an error like "undefined is not callable" on the _() function.

admin/status interface

an admin/status interface for getting number of subscribers/users and other admin stuff.

Admin traceback "ValueError: list.remove(x): x not in list"

Traceback (most recent call last):
File "/home/hookbox/env/lib/python2.6/site-packages/eventlet-0.9.9-py2.6.egg/eventlet/hubs/hub.py", line 285, in fire_timers
timer()
File "/home/hookbox/env/lib/python2.6/site-packages/eventlet-0.9.9-py2.6.egg/eventlet/hubs/timer.py", line 56, in call
cb(_args, *_kw)
File "/home/hookbox/env/lib/python2.6/site-packages/eventlet-0.9.9-py2.6.egg/eventlet/event.py", line 167, in _do_send
waiter.throw(_exc)
File "/home/hookbox/env/lib/python2.6/site-packages/eventlet-0.9.9-py2.6.egg/eventlet/greenthread.py", line 202, in main
result = function(_args, **kwargs)
File "/home/hookbox/src/hookbox/hookbox/admin/admin.py", line 418, in _run
self._cleanup()
File "/home/hookbox/src/hookbox/hookbox/admin/admin.py", line 423, in _cleanup
self._admin_app.logout(self)
File "/home/hookbox/src/hookbox/hookbox/admin/admin.py", line 81, in logout
self.conns.remove(conn)
ValueError: list.remove(x): x not in list

Documentation Problem - Publish via JS API

In the JS API documentation, it is stated that one must call the publish method from the subscription object.

subscription.publish(42);
subscription.publish({foo: "bar"});
subscription.publish(null);
subscription.publish([1,2,3, {a: [4,5,6] });

However, subscriptions do not have a "publish" method, rather that is found in the connection handle.

conn.publish("mychannel", message);

ImportError: No module named output_wrapper

Hello,

I tried building and running the most recent version of hookbox from github, mcarter-hookbox-0d1af6c.zip, which appears to have a fix for a bug I reported.

When I tried running it, though, it appears it cannot find a module it requires to start, output_wrapper. Here is a link to the error output:

http://pastebin.com/GdQtpstK

Thank you

When you reload a hookbox enabled page in IE, JS onUnsubscribe() never fires for browser's previous expired user (works in FireFox and Chrome, though)

Hello,

When you reload a hookbox enabled page in FireFox or Chrome and thereby reconnect to hookbox you receive an onUnsubscribe() callback which notifies you that the connections previously established in the same browser have unsubscribed (timed out). However, that does not happen in IE.

This is an issue because IE users will inevitably reload their browsers and functionality that depends on who is present won't work properly for them.

Hookbox outputs this error as soon as you reload the hookbox enabled page via IE:

http://pastebin.com/gxViiXHt

A minute after you reload IE, hookbox will evidently try to send the unsubscribe message but fail. Hookbox outputs this error:

Error with disconnect callback Invalid callback response, status=404 (/hookbox/disconnect)

(This error does not occur in FireFox or Chrome, and instead onUnsubscribe fires on account of the user who's connection was severed when the browser was reloaded)

Thanks so much for looking into this!

REST calls on second interface

On Wed, Sep 8, 2010 at 11:37 PM, marie_dk [email protected] wrote:
On 9 Sep., 01:53, Michael Carter [email protected] wrote:

This feature doesn't exist, but it wouldn't be terribly difficult to add. To
be clear: You want to only expose the web/rest api over a specific (private)
interface, and the public protocol over another (outward facing) interface?

Yes, exactly that would be great!
You could just add a second interface option which specifies what
interface the rest api should listen to.

Cool, can you make an issue for this on the github tracker? I will make sure it gets into our 0.4.0 release.

-Michael Carter

non ascii payloads generate exceptions

when i try to send 'grzegżółka' i get following exception:

WARNING:RTJPConnection:Unexpected error: 'ascii' codec can't encode characters in position 5-7: ordinal not in range(128)
Traceback (most recent call last):
  File "/home/ergo/python/lib/python2.5/site-packages/hookbox-0.2.10-py2.5.egg/hookbox/protocol.py", line 64, in _run
    f(fid, fargs)
  File "/home/ergo/python/lib/python2.5/site-packages/hookbox-0.2.10-py2.5.egg/hookbox/protocol.py", line 117, in frame_PUBLISH
     channel.publish(self.user, fargs.get('payload', 'null'), conn=self)
  File "/home/ergo/python/lib/python2.5/site-packages/hookbox-0.2.10-py2.5.egg/hookbox/channel.py", line 164, in publish
    success, options = self.server.http_request('publish', user.get_cookie(conn), form)
  File "/home/ergo/python/lib/python2.5/site-packages/hookbox-0.2.10-py2.5.egg/hookbox/server.py", line 97, in http_request
    form_body = urllib.urlencode(form)
  File "/usr/lib/python2.5/urllib.py", line 1250, in urlencode
    v = quote_plus(str(v))
UnicodeEncodeError: 'ascii' codec can't encode characters in position 5-7: ordinal not in range(128)

create channel cb not called

If I call subscribe on a non existing channel, the create_channel callback is never called.
Protocol.py call server.get_channel witch create the channel without any call back to the web application.
In fact, I don't know when this callback is used (except through the create channel rest api).

installation issues.

Hi,

I was trying to install hookbox on my Fedora 9. Using Python 2.5.1 with setuptools.
I've got this error below. And what are the commands to start the hookbox server? I wasn't able to find it in the documentation.
thanks

[root@DrkServ hookbox]# hookbox
Traceback (most recent call last):
Traceback (most recent call last):
File "/usr/bin/hookbox", line 8, in
load_entry_point('hookbox==0.3.2', 'console_scripts', 'hookbox')()
File "/usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg/pkg_resources.py", line 318, in load_entry_point
File "/usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg/pkg_resources.py", line 2221, in load_entry_point
File "/usr/lib/python2.5/site-packages/setuptools-0.6c11-py2.5.egg/pkg_resources.py", line 1954, in load
File "/usr/lib/python2.5/site-packages/hookbox-0.3.2-py2.5.egg/hookbox/start.py", line 2, in
import output_wrapper
File "/usr/lib/python2.5/site-packages/hookbox-0.3.2-py2.5.egg/hookbox/output_wrapper.py", line 46, in
import eventlet
File "/usr/lib/python2.5/site-packages/eventlet-0.9.9-py2.5.egg/eventlet/init.py", line 45, in
traceback.print_exc()
File "/usr/lib/python2.5/traceback.py", line 227, in print_exc
print_exception(etype, value, tb, limit, file)
File "/usr/lib/python2.5/traceback.py", line 124, in print_exception
_print(file, 'Traceback (most recent call last):')
File "/usr/lib/python2.5/traceback.py", line 13, in _print
file.write(str+terminator)
File "/usr/lib/python2.5/site-packages/hookbox-0.3.2-py2.5.egg/hookbox/output_wrapper.py", line 8, in write
self.outputter.write(self.orig, data)
File "/usr/lib/python2.5/site-packages/hookbox-0.3.2-py2.5.egg/hookbox/output_wrapper.py", line 40, in write
eventlet.spawn(self.do_write)
NameError: global name 'eventlet' is not defined

Web Socket support is Broken

How To Reproduce:

Follow the steps to run the "python_graphic_eq" demo.
Open http://localhost:8080 in Google Chrome (v6.0.472.0 or later).
Observe that the hookbox process prints the following message:
"access - INFO - Incoming WebSocket connection 127.0.0.1 127.0.0.1:2974"
Observe that the slider bars do not update dynamically.
Open the "Resources" tab in the browser's developer tools.
Observe that it does not report any XHR traffic.

This problem was reproduced on Ubuntu Lucid Lynx.

Hookbox 0.2.0 installation under OS X 10.6.3

Hookbox 0.2.0 installation under OS X 10.6.3 fails thus:

  • Using easy_install throws TypeError: reduce() of empty sequence with no initial value. Seems to be related to the os.walk issued in setup.py around line 53. Mucking around in iPython I get this:

In [44]: print(os.path.exists('hookbox/static'))
False

  • Installing from source gets further but fails (naturally) in the absence of GCC.

Resolution: Install Snow Leopard / iPhone SDK and install again from source.

Documentation out of date

Some of the documentation is out of date, from the version of Hookbox on PyPI to this version.

For example, secret is now security_token, and in the current version /rest is now /web.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.