Coder Social home page Coder Social logo

plog's Issues

Expose GC stats

It would be useful to expose minimal histograms of GC stats.

See ManagementFactory.getGarbageCollectorMXBeans()

Revamp TCP protocol

Proposal to be reviewed:

  • Use \0 as a line prefix for advanced protocol.
  • Advanced protocol supports commands, including stats.
  • Advanced protocol allows to specify tags, ask for acknowledgement(?).

Allow tags in UDP v0 protocol

  • One extra field (2 bytes) in the header is for the metadata length.
  • The metadata is prepended to the payload.
  • The metadata consists of one MessagePack object (we could add more afterwards), an array of strings, called "tags".
  • Those tags get mapped to byte[][] in Message.
  • Tags from the last processed fragment win; well-behaving clients only set tags on the last fragment to avoid reducing the chunk size or increasing packet count.

Allow for native transport under Linux

Netty offers a native transport.
It should soon allow for great perf improvements by using recvmmsg/sendmmsg.
See netty/netty#2719 for early support.

Sadly Plog currently hardcodes the transport to Nio. This should be configurable.

Report end-of-pipeline messages

If messages reach the end of the pipeline, we should do something about it.

Separate but similar to end of pipeline exceptions counting mechanism?

Replace sinks with out-of-tree filters

  • Removes the dependency to Kafka
  • Removes a bunch of code from plog-server into separate modules
  • Unifies the model around Netty 4 channels

Would break the config format.

build.gradle: establish version using git

~~README.mdon https://github.com/ajoberstar/gradle-git should cover it.~~ (doesn't supportgit describe`-like naming)

Tags like v4.0.0 should turn version into "4.0.0", and non-tagged releases should contain an unique suffix.

Clean up integration tests

  • Integration tests should pass
  • We shouldn't play around around with the console as we can trivially have our own in-memory "sink"

Revamp stats

Stats are a bit limited right now; per-port stats would be really useful, but keeping global stats would be nice too.

Provide defaults for listeners

Currently, each UDP and TCP port has to be fully configured.
Offer UDP & TCP default configuration sections that get merged with each port at startup.

Message filters

We should keep Plog simple and focused. However app-specific filters could provide value: fire-and-forget eventing in apps is great, but when events need some extra work, there's currently no good way to keep that work local (hence distributed horizontally and away from network spies) yet out of the app workers.

Such tasks could include filtering out sensitive information, converting messages between formats, annotating them with information about the host or its state, etc.

We could have per-port filters, with the following design decisions for a first shot:

  • In the port config, add the optional:

    filters = [
      { provider: "your.class",
        ...
      }, ...
    ]
    
  • your.class would be found in the classpath, have to implement:

    interface FilterProvider { PlogFilter getHandler(Config cfg); }
    
  • And PlogFilter in turn:

    interface PlogFilter extends ChannelHandler { /* extras? */ }
    

This model would allow handlers to hold state, turn each message into zero or more messages, let exceptions get logged and counted in our stats (TBV).

Questions left out of this initial implementation, hopefully forever as they would add complexity:

  • Filter metrics reporting (poll by adding to the interface, push via the pipeline?)
  • ?

Allow multiple `bind()`s

Netty allows us to bind multiple times, which is a very useful performance improvement for UDP sockets under Linux as it allows for multiple listeners.

In that case, it would be useful to allow threads = 0 and skip the thread pool altogether in UDPListener, to avoid the dispatch overhead (including extra context switches).

Support for kt: tags in plog-kafka

  • If a message has kt:foo and kt:bar tags, forward the message to the foo and bar topics.
  • Configuration now specifies a default topic, used for messages that do not have such tags.
  • If the default topic is not set, a warning is printed on startup and messages are ignored (allows for more clever pipelines)
  • The magical value null can be used for the default or tag to avoid sending to Kafka, for example for warmup or to use the same port for multiple sinks and client-side routing.

Groovy REPL as a Gradle task

The classpath should match testCompile in plog-distro.

This could be very useful to quickly hack around stuff.

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.