Closed travisturner closed 7 years ago
@travisturner Go is coming out with plugin support in 1.8: https://tip.golang.org/pkg/plugin/
Do we want to consider making the plugin system in Go? It'd be nice to have the testing support and integration with doing Go.
@travisturner It's pretty easy to embed LuaJIT (usual caveats with depending on cgo). There's also a javascript interpreter written in Go called Otto, in case our audience would be more familiar with JS: https://github.com/robertkrimen/otto
I agree that LuaJIT's easy to integrate. It had some caveats when I last used it around max heap size, recursion depth, & integer precision but overall it was a great tool.
Do you know what the performance of Otto is? IIRC it's interpreted and can be pretty slow compared to LuaJIT or Go.
I'd still prefer to use a statically typed, compiled language that has testing support built-in (e.g. Go). I'm taking a look integrating the 1.8 plugin system to see if it'll work.
Since Javascript is very prevalent, it would lower the barrier to entry, so having support for it some day would be great. Not sure about the performance of Otto, but I would guess it's much slower than LuaJIT. Since it is written in pure Go, I guess there's no reason we can't have a Go 1.8 plugin for integrating it.
closing this in place of the work being done in #517
Overview
The goal for the Plugins prototype is to demonstrate how we might approach customized Pilosa queries. Use cases revolve around applying known algorithms to a Pilosa data set and letting the nodes in the cluster perform longer-running jobs which apply those alogrithms to local data and return results to an aggregator node.
The prototype should support the following example problem:
Presumably the solution will handle the problem in parallel and, like a map reduce approach, in multiple steps:
Functionality Needed for the Prototype
Map
portion of the [List/LUA] program to other nodesbitmaps
,counts
, ortop-n
s (id:count).Future requirements