Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why these deps in Editor example #30

Closed
linonetwo opened this issue Jun 30, 2023 · 5 comments
Closed

Why these deps in Editor example #30

linonetwo opened this issue Jun 30, 2023 · 5 comments

Comments

@linonetwo
Copy link

linonetwo commented Jun 30, 2023

I'm learning the usage from the code, here are something not clear:

Why is

      extraContext: {
        PubSub,
      },

https://github.com/FlydeHQ/flyde/blob/a3da13b5d25d6bbb2356ff6c0d04d593b2f35767/website/src/components/EmbeddedFlyde/EmbeddedFlyde.tsx#L2

this seem to not use elsewhere?

Answer: used in Publish node

But why not let nodes come with their own dependency, instead of let runtime provide for them?


and why is import { fakeVm } from "@site/src/fake-vm";, seems

import {
  execute,
} from '@flyde/core';

can already do the code execution?

@linonetwo
Copy link
Author

Thought flyde is lack of doc, but NoFlo is more complicated and no one can answer questions, so I decided to use flyde at the moment. @GabiGrin can you help me here?

@GabiGrin
Copy link
Contributor

GabiGrin commented Jun 30, 2023

That’s actually a technical debt from a major change to Flyde. Flyde started as a cloud-based “visual serverless” platform but I quickly realized it must start as an OS project. Flows used to run in a vm2 instance on my servers, but when running on the client it wasn’t really necessary

Regarding PubSub, leaving it to the context of the node means I can’t separate their execution and kinda breaks the whole modular design. The real solution here is to make it a first-class citizen

@GabiGrin
Copy link
Contributor

Does that answer your questions? looking forward to your thoughts

@linonetwo
Copy link
Author

OK, I can understand that. As long as i can publish other nodes in a self contained way.

I'm going to write some plugins providing nodes with dependency, and load them using esm/eval. Those dependences won't need to be provided by the host (flyde runtime)

@GabiGrin
Copy link
Contributor

Ok, let me know if you need any help! Would love seeing Flyde being integrated in your project

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants