conveyor
conveyor copied to clipboard
Investigate pieces of source and global flows to move into API
So the source definitions are getting long. But there are several pieces that are showing up on each flow which could be moved into the API.
Config Endpoints
These are the endpoints used to GET/PUT the flow level configuration values. At the moment I don't see any value in having them inside of the flow. Even if access to them was needed inside of the flow there may be a way to handle an override. Something like the
- API receives request for
/flow/{{name}}/config
- API checks for
node-red/{{name}}/config
endpoint status. If it's a 404 then it uses an internal method.
Data Endpoints
These are more commonly tied into the main flow. The best example being the CSV upload. You can POST individual record manually to the API. But the POST endpoint is also used by the UI to upload a file. But if we found a sensible override as discussed above could be doable.
Bulk inserting
Right now each flow has 3-5 nodes that split an array and reform it in the format necessary. This could be moved into the global flow, or the API, or even an ES plugin for easy bulk inserts. One consideration is that the Conveyor API may need public IP access in the event people are streaming data into Conveyor. We wouldn't want to create the bulk API endpoint in the Conveyor API and have it be exposed as well...
Index Patterns
The management of this is getting more and more intense. It is easy to update in Node-RED for subsequent version changes, but may be cleaner in the API. Also right now the Global Flow doesn't attempt to clean up index patterns as flows are deleted, this would be easier in the API.
Hopefully more ideas to come.