Giter Club home page Giter Club logo

pixel-ping's Introduction

This is the repository for the legacy DocumentCloud site, please see the current repository here:

https://github.com/muckrock/documentcloud

______                                      _   _____ _                 _
|  _  \                                    | | /  __ \ |               | |
| | | |___   ___ _   _ _ __ ___   ___ _ __ | |_| /  \/ | ___  _   _  __| |
| | | / _ \ / __| | | | '_ ` _ \ / _ \ '_ \| __| |   | |/ _ \| | | |/ _` |
| |/ / (_) | (__| |_| | | | | | |  __/ | | | |_| \__/\ | (_) | |_| | (_| |
|___/ \___/ \___|\__,_|_| |_| |_|\___|_| |_|\__|\____/_|\___/ \__,_|\__,_|

DocumentCloud is a catalog of primary source documents and a tool for annotating, organizing and publishing them on the web. Documents are contributed by journalists, researchers and archivists.

This codebase contains the entirety of DocumentCloud.org, and pulls together the rest of our open-source projects: Docsplit is used to extract data from incoming documents; that work is parallelized across CloudCrowd; data on the client-side is modeled by Backbone.js, which depends on Underscore.js for all of its abilities; Jammit concatenates and compresses the dozens of CSS and JS files into a single asset package; the NYTimes' Document Viewer displays the documents, while Pixel Ping records the traffic.

If you find a security issue while browsing the source, please email [email protected] to inform us of the problem.

Code contributed to this project is provided under the MIT license (see the LICENSE file). Some components of the project are subject to their own licenses as indicated (see /vendor and /public/javascripts/vendor directories).

pixel-ping's People

Contributors

cyberdelia avatar danielbeardsley avatar gka avatar jashkenas avatar knowtheory avatar mbjordan avatar thejefflarson avatar xiongchiamiov 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

pixel-ping's Issues

Question: How to find flushed data

Hey all,

Sorry I'm new to this find of stuff, but I successfully got pixel-ping working on our server, and when I run it it appears to successfully flush based on the messages, but I cant find any new files or anything like that. I'm working off the DocCloud explanation of how to use this, so the endpoint is mydomain/save_hits. I'm using 9187 port as well.

Any help on this would be greatly appreciated. Thanks in advance.

test fails when more than five pixels are requested

While now the simple test with just 3 requests succeeds, a very similar test with six requests fails

❯ cake test                                                                                                                        
4:  one
8:  two
6:  three
--- flushed ---
Test Failed  { one: 4, two: 8, three: 6 }

Apparently the last requests is timed out, and the flush is only happening after the 60-seconds interval defined in test/config.json has passed. Also note that the counts are completely wrong, the expected result should be either

{ "one": 1, "two": 2, "three": 3 }

or, since the last request failed, at least:

{ "one": 1, "two": 2, "three": 2 }

I could reproduce this multiple counting of single pixel.gif requests in a real server setting, so this is a serious bug.

Server doesn't seem to be collecting hits

So I followed all the instructions you have available to install pixel-ping on a server. When I run pixel-ping on the command line, it goes through the flush as intended. However, there never seems to be any data.

I cant experiment on port 80 because I get a Uncaught Exception: Error: listen EADDRINUSE 107.170.210.56:80 which I assume is cause Apache is running on that same port. So I used Port 9817 in the config like in the example provided in documentation. I have a pixel.gif in the html root of the server.

Also tried to troubleshoot inside the code, and I don't ever seem to get any data from the server or record objects. FWIW, here is a log of server after it initializes:

Server { domain: null, _events: { request: [Function], connection: [Function: connectionListener] }, _eventsCount: 2, _maxListeners: undefined, _connections: 0, _handle: null, _usingSlaves: false, _slaves: [], _unref: false, allowHalfOpen: true, pauseOnConnect: false, httpAllowHalfOpen: false, timeout: 120000, keepAliveTimeout: 5000, _pendingResponseData: 0, maxHeadersCount: null, [Symbol(asyncId)]: -1 }

I'm super green to node.js so I'm trying to learn all this as I go. Any help would be appreciated. Thanks.

Ubuntu 16.04 - Apache2 - Node 8.10

Flushing: allow doing it in batch

If the flushing server can't be reached for a bit, a large batch of stats may build up. We've had an instance recently where the data size after encoding (6MB) was too big for the endpoint it was being sent to.

Suggestion

Chunk the and submit it in batches

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.