Code Monkey home page Code Monkey logo

Comments (6)

stale avatar stale commented on May 25, 2024

This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

from cytoscape.js.

mikekucera avatar mikekucera commented on May 25, 2024

Can you please describe how this would work in more detail. Currently cytoscape.js can be run under node in a headless mode, and it can render graphs on the server using cytosnap. Can you describe how your proposal differs, and why cytosnap does not meet your requirements?

There is currently some preliminary work being done on exporting graphs to PDF, which should also work in headless mode. Would that satisfy your requirements?

from cytoscape.js.

PilsManuel avatar PilsManuel commented on May 25, 2024

I was researching node.js support for cytoscape when I stumbled upon this issue.

Unfortunately cytosnap is not an option as it seems to be not maintained anymore (last release 5 years ago) and has 4 high/critical security alerts according to socket.dev.

from cytoscape.js.

rettgerst avatar rettgerst commented on May 25, 2024

Can you please describe how this would work in more detail. Currently cytoscape.js can be run under node in a headless mode, and it can render graphs on the server using cytosnap. Can you describe how your proposal differs, and why cytosnap does not meet your requirements?

my main interest in this change is the ability to reuse existing cytoscape-consuming code in node,js, without the added complexity, latency* and docker image bloat that would come with using puppeteer. as @PilsManuel mentioned cytosnap has been unmaintained for 5 years, whereas jsdom and node-canvas are mature and well-maintained.

even if cytosnap were to be maintained again, it's more code that needs to be actively maintained whereas it was fairly trivial to patch cytoscape to remove references to global window - the cy.window() method already existed and was simply not used in a few places in the render code path.

*I assume that the jsdom and node-canvas code paths are faster than running a headless browser, at the very least on a cold start, I haven't verified this myself but if needed I could create a benchmark comparing the performance of cytosnap versus my PR.

There is currently some preliminary work being done on exporting graphs to PDF, which should also work in headless mode. Would that satisfy your requirements?

possibly? I presume rendering to a PDF would include some internal code to render to a raster or vector image to embed in said PDF, if this routine was accessible on its own through a public method, and the resulting image was stylistically identical to the canvas render, that might satisfy my requirements.

from cytoscape.js.

mikekucera avatar mikekucera commented on May 25, 2024

I've used cytosnap before and it was unreliable. I can understand why its not an option.

We've started on an extension for exporting the network to PDF using a vector image. But that project has just been started and probably won't be ready for a long while.

Max is currently not available to manage the cytoscape.js project like he normally does. I'm managing the release process in the meantime. I apologize I'm not up to speed on the latest happenings in this repository. If you feel your PR (#3229) is tested and ready for being merged then we should be able to include it in the 3.29.1 release, which should be ready in a few days. Let me know what you think. Thanks.

from cytoscape.js.

mikekucera avatar mikekucera commented on May 25, 2024

#3229 has been merged

from cytoscape.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.