Better HN
topnewbestaskshowjobs
Log inSign up

mtth

16 karma · joined Sep 2, 2015 (11y ago) · 13 submissions

Submissions

1.

Show HN: Git-jot – Git notes for branches(github.com ↗)

1 points · by mtth · 1y ago · discuss

comment 3y ago · link · parent

Hello HN!

After several years as a data-scientist/engineer I was surprised by the lack of options for deploying mathematical optimization models, especially compared to the machine learning world. There are great libraries (Pyomo, JuMP, ...) but few end-to-end solutions to go from prototype idea to production API, and even fewer which provide strong mathematical consistency guarantees. This is where Opvious comes in... Its features include:

+ A declarative API to create models (linear, mixed-integer, quadratic) and automatically generate their LaTeX definitions.

+ Built-in productivity and debugging capabilities: multi-objective strategies, smart infeasibility detection, numerical performance insights…

+ A variety of integrations so you can solve problems from almost anywhere, for example pandas-compatible APIs for data pipelines and a TypeScript client to embed optimization directly in a web app.

If you are interested in trying it out, the best place to get started is the welcome guide which walks through an interactive end-to-end example: https://www.opvious.io/notebooks/retro/notebooks/?path=guide... The platform is free for non-commercial use, no separate solver installation or license required. I hope you find it useful and would love to hear your thoughts!

3.

Show HN: Opvious, a batteries-included optimization platform(github.com ↗)

1 points · by mtth · 3y ago · 1 comment

comment 11y ago · link · parent

Creator here. Happy to answer any questions!

5.

Show HN: HdfsCLI – A python API and command line interface for HDFS(github.com ↗)

2 points · by mtth · 11y ago · 1 comment

comment 11y ago · link · parent

I don't know enough about Thrift to compare them unfortunately.

comment 11y ago · link · parent

Mostly because `avro` was already taken on NPM and I wanted a short name to `require`. Since schemas (and schema files) seemed to me to be at the heart of Avro, I thought it was a reasonable option.

comment 11y ago · link · parent

I'll start with the second question since it's easier to answer: some of the other libraries don't support all Avro features (for example I don't think `node-avro-io` supports encoding records defined inside arrays), so they're unable to run some of the benchmarks. Both the reference Java implementation and `avsc` are able to parse all these schemas so don't have any -1s in their columns.

Performance-wise, the main benefits came from doing as much preprocessing as possible. Here are a couple examples of what is done when a schema is parsed:

+ All methods for encoding and decoding nested types get fully resolved, removing the need for lookups (for example an array of integers would have a reference to the method for encoding integers).

+ A constructor, and encoding/decoding methods gets programmatically generated for each record type. This avoids having to iterate over the fields each time. Same for unions. (Having a "Class" for each record type also lets us attach useful methods to its prototype, available for all record instances.)

Then there are a few other general ideas like making sure v8 is able to optimize all the methods on the critical path, or reusing buffers as much as possible to avoid allocating too many objects.

comment 11y ago · link · parent

I haven't tested this but my guess would be that performance would be similar as they both run on v8. The only difference is the buffer implementation which is roughly as fast it seems (benchmarks here [1]).

[1] https://github.com/feross/buffer#performance

comment 11y ago · link · parent

Thanks!

I like to think of Avro in two (related) parts:

+ A very compact binary serialization, which lets you efficiently store or transfer data over the wire. (Avro actually also defines a way to encode your data as JSON in cases when you need a human-readable representation.)

+ A way to define "data types". For example this schema [1] defines what we expect a "Human" entry to look like, and we can now do things like check whether we are missing any information, make sure all fields are valid, sort, efficiently copy objects, etc.

This is glossing over many things (files, RPC, ...) but I hope this helps a bit! You can find a lot more information in the official Avro documentation [2] if you're curious.

[1] https://github.com/mtth/avsc/blob/master/etc/benchmarks/sche...

[2] https://avro.apache.org/docs/current/index.html

comment 11y ago · link · parent

Right, not yet. Supporting IDL files would be great to have though. I'll look into it when adding protocol support.

comment 11y ago · link · parent

Creator here. If you have any questions, please ask!

13.

Show HN: Avsc – a pure JavaScript Avro implementation(github.com ↗)

27 points · by mtth · 11y ago · 14 comments