Comments (7)
There is a way to make an output act as 'global', as per the docs. Simply double click the output, and all inputs consuming that type will automatically be connected, without cluttering the UI. Only when you hover a global output, or related input, will the connectors visualize.
See below for an example.
- Within the
mongodb
node, themongodb
output is set as global, and the mouse is hovering that output (hence you see the connections) - Both
mongodb.collection
nodes have theircollections
output set as global, automatically connecting them to themongodb.collection.insert/collections
input. Hovering either output or input would visualize the connections just like themongodb/mongodb
output which is currently highlighted.
Let me know if that answers your question!
And yes, the docs definitely need at least a screenshot on this :-)
from xible.
Thanks for your response @steve2507 ,
This kind of works for each workflow, let me put it this way, if you have multiple workflows then we will have multiple connections to the mongodb database if each workflow has the mongodb connection node, which is not the best practice in this case for performance on both end (the db and xible) as this will have multiple open connections.
I was assuming the ability to create 1 mongodb connection that can be shared between multiple workflows, so a global connection to all workflows where the connection object can be shared.
Hope that clarifies it? If this is something that you aim to add to xible, I dont mind contributing on that front.
from xible.
Yeah any thoughts on this would be appreciated. Back when I used Xible for home automation, I had a similar 'issue' and was thinking about creating a separate 'global flow' or something like that to store nodes which are exposed to every flow available.
from xible.
Update: This wont work below as I noticed each flow runs a different PID, wont be able to share singleton objects, just keeping the below for inspiration for other ideas
A suggestion would be that the node that has been created that will be "connecting to a server or serving a global connection" would contain an executable file defined in the structure and the execution of this code returns an object (server connection for example) as a singleton. EXAMPLE:
Mongodb connect to server node will contain the following;
- Structure File : Add description somehow that it will contain connection defs. that are generated as an object form the editor "Many connection types that can be used on multiple nodes" which would contain as an example ("server host, port, username, password")
- Index.js File :
- SingletonDefinitions.js "Need a better name" : Which will contain the ability to load the configurations defined on the editor as an object, executed and saved as a singleton.
when using this node, the user will have a dropdown list asking which configuration it would use (the predefined configurations).
Might be tricky to explain in text for now but do you get the gist of it ?
from xible.
You already concluded this I see, but indeed every flow runs as its own process to not hinder each other in the case of computational intensive tasks. This will also allow for clustering a Xible setup later versions.
I do believe what you need is possible, without any extra development from a nodepack developer, simply by letting a Xible user define some nodes (such as the mongodb one) in a central place.
from xible.
Would you have a suggestion on how to proceed with that ?
The multi-process approach makes total sense
from xible.
Yes, I think so.
I'm currently working on a solution where a flow can import any other flow (the flow definition, not a flow instance). This would make it possible to simply store connection nodes and such in one flow and include that flow in others.
A next step would be to make a special place available for a 'global' flow that by default is included in all flows.
from xible.
Related Issues (20)
- Improve error handling within flows
- "xiblepm nodepack init" cli for setting up default node structure within a nodepack HOT 1
- In firefox, the 'describe' or help mode on a node doesn't zoom/scale the node
- "Import demo flow" button when editor is empty
- HTML imports are no longer supported, breaking editor functionality in Chrome 80+
- Node version 14 not supported; ERR_INVALID_ARG_TYPE on xible.init() HOT 3
- Are you still continuing to support This project? HOT 5
- Use require.resolve() to import nodepacks HOT 1
- Move to ESM
- Errors thrown when loading node(pack)s are ignored HOT 7
- Tag fields in the editor that are stored in the vault
- Show flow instances in editor dock
- Add ability to encrypt vault store with a key
- Ensure state is stored outside docker container
- Support editor input/data definitions in structure.json
- Implement server-side validation on dataStructure
- Acknowledge package.json "engines" attribute
- Login to registry through UI
- Is the project in being developed? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xible.