Merge lp:~drawks/graphite/graphite-msgpack into lp:~graphite-dev/graphite/main
Status: | Work in progress |
---|---|
Proposed branch: | lp:~drawks/graphite/graphite-msgpack |
Merge into: | lp:~graphite-dev/graphite/main |
Diff against target: |
173 lines (+65/-9) 6 files modified
carbon/bin/validate-storage-schemas.py (+1/-1) carbon/conf/carbon.conf.example (+6/-0) carbon/lib/carbon/conf.py (+5/-0) carbon/lib/carbon/protocols.py (+30/-1) carbon/lib/carbon/service.py (+15/-7) check-dependencies.py (+8/-0) |
To merge this branch: | bzr merge lp:~drawks/graphite/graphite-msgpack |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sidnei da Silva (community) | Approve | ||
Review via email: mp+92921@code.launchpad.net |
Description of the change
Added msgpack as a receiver protocol. msgpack is super fast at deserializing and much safer than pickle since it doesn't support serializing things like modules, functions, or class objects. Also added support to enable/disable individual listeners in carbon.conf
New code path can be tested with a simple metric writer like:
import msgpack, socket, time:
s=socket.
fs=s.makefile()
for second in xrange(
msgpack.
fs.flush()
fs.close()
s.shutdown(
Unmerged revisions
- 689. By Dave Rawks
-
changed shebang line to use python from env instead of harcoded interpreter
- 688. By Dave Rawks
-
Disable msgpack receiver by default
- 687. By Dave Rawks <email address hidden>
-
Added config options to enable/disable line,pickle, and msgpack receivers.
made msgpack import conditional on the msgpack receiver being enabled
updated check_dependencies to test for msgpack - 686. By Dave Rawks <email address hidden>
-
Added msgpack protocol linereceiver
1. Please move the import of Unpacker from msgpack from module-level to inside connectionMade().
2. (as said on IRC), note that setting the port to 0 effectively disables it, so the 3 new extra settings are not needed. If you do think it's better/more explicit to keep them, then might make sense to remove the 'if port:' from service.py and require setting the ENABLE_* settings instead.