anchor/vaultaire-query — pull request #16 by tranma (2014-10-16 05:59:33+00:00)
Title: Use one marquise connection per operation

This fix changes wrapped Marquise operations such as readSimple to establish one ZMQ connection for itself. No sharing should occur, confirmed by logging and staring fairly hard at the log.

Running the Borel query ``http://localhost:8080/customer/21891?start=2014-10-10;end=2014-10-15`` multiple times always yields:

```
{"customer-id":"21891","quantity":239100000000,"uom":"ns","resource":"cpu","resource_id":"b9dd40d9-3381-41be-8924-999635a5e60c"}
{"customer-id":"21891","quantity":231980000000,"uom":"ns","resource":"cpu","resource_id":"26b45eb0-d405-4796-bef6-2b15c78471aa"}
{"customer-id":"21891","quantity":243470000000,"uom":"ns","resource":"cpu","resource_id":"f85a74dd-8182-44d0-9b08-c34454781388"}
{"customer-id":"21891","quantity":225020000000,"uom":"ns","resource":"cpu","resource_id":"a21c591a-e9ce-4722-9f51-b7142aa89e1a"}
{"customer-id":"21891","quantity":206870000000,"uom":"ns","resource":"cpu","resource_id":"d4b3b2a4-9783-4883-b4ae-6e3b01bacc97"}
{"customer-id":"21891","quantity":569344,"uom":"B","resource":"disk.read.bytes","resource_id":"a21c591a-e9ce-4722-9f51-b7142aa89e1a"}
{"customer-id":"21891","quantity":569344,"uom":"B","resource":"disk.read.bytes","resource_id":"d4b3b2a4-9783-4883-b4ae-6e3b01bacc97"}
{"customer-id":"21891","quantity":569344,"uom":"B","resource":"disk.read.bytes","resource_id":"f85a74dd-8182-44d0-9b08-c34454781388"}
{"customer-id":"21891","quantity":26796032,"uom":"B","resource":"disk.read.bytes","resource_id":"26b45eb0-d405-4796-bef6-2b15c78471aa"}
{"customer-id":"21891","quantity":667648,"uom":"B","resource":"disk.read.bytes","resource_id":"b9dd40d9-3381-41be-8924-999635a5e60c"}
{"customer-id":"21891","quantity":279302144,"uom":"B","resource":"disk.write.bytes","resource_id":"d4b3b2a4-9783-4883-b4ae-6e3b01bacc97"}
{"customer-id":"21891","quantity":279830528,"uom":"B","resource":"disk.write.bytes","resource_id":"f85a74dd-8182-44d0-9b08-c34454781388"}
{"customer-id":"21891","quantity":279183360,"uom":"B","resource":"disk.write.bytes","resource_id":"a21c591a-e9ce-4722-9f51-b7142aa89e1a"}
{"customer-id":"21891","quantity":280870912,"uom":"B","resource":"disk.write.bytes","resource_id":"b9dd40d9-3381-41be-8924-999635a5e60c"}
{"customer-id":"21891","quantity":279969792,"uom":"B","resource":"disk.write.bytes","resource_id":"26b45eb0-d405-4796-bef6-2b15c78471aa"}
{"customer-id":"21891","quantity":11697170,"uom":"B","resource":"network.incoming.bytes","resource_id":"instance-00000a30-d4b3b2a4-9783-4883-b4ae-6e3b01bacc97-tapf7e0d3be-74"}
{"customer-id":"21891","quantity":11699874,"uom":"B","resource":"network.incoming.bytes","resource_id":"instance-00000a27-a21c591a-e9ce-4722-9f51-b7142aa89e1a-tap8f3edf48-c4"}
{"customer-id":"21891","quantity":11540543,"uom":"B","resource":"network.incoming.bytes","resource_id":"instance-00000a33-26b45eb0-d405-4796-bef6-2b15c78471aa-tapb95deb1e-e3"}
{"customer-id":"21891","quantity":11765390,"uom":"B","resource":"network.incoming.bytes","resource_id":"instance-00000a24-b9dd40d9-3381-41be-8924-999635a5e60c-tapd886fa2a-b0"}
{"customer-id":"21891","quantity":11694411,"uom":"B","resource":"network.incoming.bytes","resource_id":"instance-00000a2d-f85a74dd-8182-44d0-9b08-c34454781388-tape94da614-2c"}
{"customer-id":"21891","quantity":430234,"uom":"B","resource":"network.outgoing.bytes","resource_id":"instance-00000a27-a21c591a-e9ce-4722-9f51-b7142aa89e1a-tap8f3edf48-c4"}
{"customer-id":"21891","quantity":476349,"uom":"B","resource":"network.outgoing.bytes","resource_id":"instance-00000a30-d4b3b2a4-9783-4883-b4ae-6e3b01bacc97-tapf7e0d3be-74"}
{"customer-id":"21891","quantity":500230,"uom":"B","resource":"network.outgoing.bytes","resource_id":"instance-00000a2d-f85a74dd-8182-44d0-9b08-c34454781388-tape94da614-2c"}
{"customer-id":"21891","quantity":543562,"uom":"B","resource":"network.outgoing.bytes","resource_id":"instance-00000a24-b9dd40d9-3381-41be-8924-999635a5e60c-tapd886fa2a-b0"}
{"customer-id":"21891","quantity":458975,"uom":"B","resource":"network.outgoing.bytes","resource_id":"instance-00000a33-26b45eb0-d405-4796-bef6-2b15c78471aa-tapb95deb1e-e3"}
{"customer-id":"21891","quantity":431988000000000,"uom":"instance-small ns","resource":"instance","resource_id":"b9dd40d9-3381-41be-8924-999635a5e60c"}
{"customer-id":"21891","quantity":431988000000000,"uom":"instance-small ns","resource":"instance","resource_id":"a21c591a-e9ce-4722-9f51-b7142aa89e1a"}
{"customer-id":"21891","quantity":431976000000000,"uom":"instance-large ns","resource":"instance","resource_id":"26b45eb0-d405-4796-bef6-2b15c78471aa"}
{"customer-id":"21891","quantity":431981000000000,"uom":"instance-large ns","resource":"instance","resource_id":"d4b3b2a4-9783-4883-b4ae-6e3b01bacc97"}
{"customer-id":"21891","quantity":431988000000000,"uom":"instance-large ns","resource":"instance","resource_id":"f85a74dd-8182-44d0-9b08-c34454781388"}
```

So this should fix https://github.com/anchor/borel/issues/62. Please let me know if it breaks.