Code Monkey home page Code Monkey logo

node-red-contrib-proofpoint's People

Contributors

macinspak avatar mcafeeandrew avatar

Stargazers

 avatar

Watchers

 avatar  avatar

node-red-contrib-proofpoint's Issues

Switch to streaming lexical json parsing

Currently, the request to proofpoint is returned as a blob and then the next stage parses over the entire parsed json response structure streaming out reputations as they are detected.

This has a level (albeit small) of latency (while the response is streamed to the response buffer - plus, depending on how request works, may also then parse the response buffer) and a memory overhead as the entire parsed json structure resides in memory to be passed from the request response handler to the reputation searching component.

An alternate approach is to stream the response from the request directly to a json lexical streaming parser, and based on the known structure of the proofpoint response, start processing (and discarding) each file reputation as it is hydrated from the stream.

This removes both the memory and latency overheads at the client end (though doesn't overcome the server side latency, it's the best we can do).

Callback was already called on timestamp decode

persist? 2021-04-15T06:10:45Z
persist var? proofpointPersistence-eca69f22_a9908 2021-04-15T06:10:45Z
decoded persistent file content { lastTimestamp: '2021-04-15T06:10:45Z' }
22 Apr 15:13:29 - [info] [poll proofpoint siem:eca69f22.a9908] lastTimestamp
22 Apr 15:13:29 - [red] Uncaught Exception:
22 Apr 15:13:29 - Error: Callback was already called.
at C:\Users\xxxx.node-red\node_modules\async\dist\async.js:318:36
at C:\Users\xxxx.node-red\node_modules\node-red-contrib-proofpoint\proofpoint\poll.js:34:29
at read (C:\Users\xxxx.node-red\node_modules\node-red-contrib-proofpoint\proofpoint\util.js:100:13)
at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)

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.