Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to design a backend system for svelvet?#463

Unanswered
AlloryDante asked this question inQ&A
Discussion options

Ok, I really have a difficult problem I need to solve. I kind of want to try and build a no code solution using svelvet. My problem is that I cannot seem to figure it out how to design the backend system.

In my use case, I want for the user to connect blocks on the frontend and save their project. After the project is saved I need a way to keep the project logic running on background in a server.

My specific use case is that I want to build a no code live chat bot so the users can design their own systems easly. So how do I actually get the project nodes, links and convert them to server code?

For this I think I need some sort of list with the nodes connecting between them and probably I need to build my own interpreter solution that will fire up a server worker, is that right?

I would be so grateful if someone could provide an answer to this.

P.S I need guidance so I am open to any suggestion

Edit1: Is there any option where I can read the node list with their connections, or I need to build it by myself through listeners?

You must be logged in to vote

Replies: 2 comments

Comment options

There are quite a few things to consider in a design like this, many of which are out of scope of this library's feature set.

Binding to the nodes/edges in the Svelvet graph seems to be in progress:#428. There are workarounds to bind to this data currently, but it's still a bit clunky.

As for the whole backend part of your application, you'd probably open up aWebSocket to deal with live syncing of your frontend network and your backend. As for the runtime, there's not a 'direct' conversion to your server-side code: you'll probably need to implement this yourself, depending on what your application needs to do. You then need to implement storing user flows, authentication, databases, etc...

It's a reasonably complex task, but have you considered other options that already do this?
Node-Red may already be close to the thing you want to build. The backend 'logic' runs on the server, but you edit the nodes in your browser.
NoFlo did a similar thing, however it's not been maintained/updated in a few years.

Implementing this kind of thing from scratch could be a fun project, but it might be worth seeing if one of these existing tools can cover your needs.

Best of luck!

You must be logged in to vote
0 replies
Comment options

There are quite a few things to consider in a design like this, many of which are out of scope of this library's feature set.

Binding to the nodes/edges in the Svelvet graph seems to be in progress:#428. There are workarounds to bind to this data currently, but it's still a bit clunky.

As for the whole backend part of your application, you'd probably open up aWebSocket to deal with live syncing of your frontend network and your backend. As for the runtime, there's not a 'direct' conversion to your server-side code: you'll probably need to implement this yourself, depending on what your application needs to do. You then need to implement storing user flows, authentication, databases, etc...

It's a reasonably complex task, but have you considered other options that already do this?Node-Red may already be close to the thing you want to build. The backend 'logic' runs on the server, but you edit the nodes in your browser.NoFlo did a similar thing, however it's not been maintained/updated in a few years.

Implementing this kind of thing from scratch could be a fun project, but it might be worth seeing if one of these existing tools can cover your needs.

Best of luck!

  1. Thank you so much for the answer. You already gave me some nice ideeas. In short, I wont use node-red unless Svelvet implementation compleatly fails . I prefer making a very small working poc for a future project to see how things are going.

  2. You are right. For each node, I could have a server function. If its necesary users can play on a node and a server function will trigger in live editing mode.(action triggered by ws)
    When the user saves the flow, I think I will need to make an interpretor that runs those functions step by step (I will have to figure out a way to interpass the variables between functions)

The hard thing that I will face is that I am still new to this library, so the flow map will be actually a difficult challenge. I will need to detect connections and variables(that user sets inside blocks) abd construct the flow in a JSON format.

I will start the project in november, until then I need to do some pre-planning with my tech stack. I feel confident that Svelvet would be my best candidate. If not, then I will do it with node-red.

You must be logged in to vote
0 replies
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
2 participants
@AlloryDante@BOJIT

[8]ページ先頭

©2009-2025 Movatter.jp