nori-io / nori Goto Github PK
View Code? Open in Web Editor NEWGolang Plugin Engine
Home Page: https://nori.io
License: Apache License 2.0
Golang Plugin Engine
Home Page: https://nori.io
License: Apache License 2.0
Wrong information in line 498. Must be information about ring
=== RUN TestDependencyGraph_Sort9
--- PASS: TestDependencyGraph_Sort9 (0.00s)
graph_test.go:479: Plugins' order until sorting:
graph_test.go:485: Plugin n. 1 in list until sotring: plugin1:1.0 Dependencies:
graph_test.go:489: Dependence n. 1 for plugin1 is [plugin1:>=1.0, <2.0][interface: Custom]
graph_test.go:495:
graph_test.go:498: plugin1:1.0
Dependency [plugin1][>=1.0, <2.0] not found
Compile nori and plugins inside docker.
Error occured, when plugins tried to start by engine Nori. Engine built in docker container.
Docker built Nori by golang 1.13.4
Plugins was built by golang 1.13.4 too with Makefile.
Error is "Plugin was built with a different version of package internal/cpu" for all plugins
Tutorial how to develop plugin
Tutorial must provides information of plugin design and shows how to develop and deploy your own plugin.
Plugin can request interfaces from the Registry.
Nori must support:
Registry
can load multiple plugins with the same interface with no error.For example, 2 plugins implement nori/Cache
interface. One plugin implements this interface for reads
, another plugin implements this interfaces for memcached
.
It would be great to have opportunity to configure which plugin Registry
must return on interface request by specific plugin.
For example, templates
plugin requests nori/Cache
interface and receives memcached
but sessions
plugin receives redis
on the same interface request .
Config example:
plugins:
- nori/templates: # plugin id
- nori/Cache: "nori/redis:2.1.3" # interface: id:version
- nori/sessions: # plugin id
- nori/Cache: "nori/memcached:1.0.2" # interface: id:version
Nori Engine Refactoring
@bruteforce1414 not in contributors list in README.md
Compile plugin in docker:
go build -buildmode=plugin -o /app/plugin/plugins.so /app/plugin/plugin.go
go build -buildmode=plugin -o /{mounted_volume_path}/plugins.so /{mounted_volume_path}/plugin.go
DifOfDone: run docker image with -v flagto mount directory with plugin sources, it executes, it finishs, we can see compiled plugin inside mounted directory
When ENGINE=MyISAM;
error occured
ERRO[0000] Error 1071: Specified key was too long; max key length is 1000 bytes
It worked when INNODB
There is no information about plugins with ring in line 527
=== RUN TestDependencyGraph_Sort10
--- PASS: TestDependencyGraph_Sort10 (0.00s)
graph_test.go:508: Plugins' order until sorting:
graph_test.go:514: Plugin n. 1 in list until sotring: plugin2:1.0 Dependencies:
graph_test.go:518: Dependence n. 1 for plugin2 is [plugin3:>=1.0, <2.0][interface: Custom]
graph_test.go:514: Plugin n. 2 in list until sotring: plugin3:1.0 Dependencies:
graph_test.go:518: Dependence n. 1 for plugin3 is [plugin2:>=1.0, <2.0][interface: Custom]
graph_test.go:524:
graph_test.go:527: dependency cycle found
Add information about absent interface.
In last string interface is absent. Add additi:nal information in Sort() function?
Result of test n.5:
graph_test.go:307: Plugins' order until sorting:
graph_test.go:313: Plugin n. 1 in list until sotring: plugin1:1.0 Dependencies:
graph_test.go:317: Dependence n. 1 for plugin1 is [:>1.0][interface: HTTP]>1.0] not found
graph_test.go:323:
graph_test.go:326: plugin1:1.0
Dependency [][
Implement gRPC server by specification from #19
=== RUN TestNewRegistry
--- FAIL: TestNewRegistry (0.00s)
registry_manager_test.go:48:
Error Trace: registry_manager_test.go:48
Error: Expected value not to be nil.
Test: TestNewRegistry
FAIL
Implement Storage interface from nori-common to get opportunity to store nori internal state in memory or in permanent storage system.
Implementations:
=== RUN TestManager_Resolve
--- FAIL: TestManager_Resolve (0.00s)
panic:
assert: mock: I don't know what to return because the method call was unexpected.
Either do Mock.On("GetInterface").Return(...) first, or remove the GetInterface() call.
This method was unexpected:
GetInterface()
at: [Meta.go:73 manager.go:138 manager.go:83 manager_test.go:89] [recovered]
panic:
assert: mock: I don't know what to return because the method call was unexpected.
Either do Mock.On("GetInterface").Return(...) first, or remove the GetInterface() call.
This method was unexpected:
GetInterface()
at: [Meta.go:73 manager.go:138 manager.go:83 manager_test.go:89]
Idea: core interfaces can be pluggable.
Nori can load implementation of core interfaces from plugin files.
Nori configuration has separate config options / keys to load these plugins.
{
"nori": {
"plugins": [
"/opt/nori/plugins/storage.so",
"/opt/nori/plugins/logger.so"
]
}
}
Requirements to Core Plugins:
Pluggable core interfaces: Hook
, Storage
.
Create documentation: Intro / Get started:
There are two main ways to get started with Nori
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.