user-feedback icon indicating copy to clipboard operation
user-feedback copied to clipboard

Form team/group to define "embedding requirements"

Open mhdawson opened this issue 7 years ago • 49 comments

There is ongoing work to allow Node.js to be built as a static or shared library. This allows Node.js to be embedded in the process of another application. See https://github.com/nodejs/node/issues/14158, which is also being backported to 8.X and 6.X (https://github.com/nodejs/node/pull/19047, https://github.com/nodejs/node/pull/19050).

@yhwang is currently working on adding testing to the CI. That testing, however, will just be to make sure that the existing Node.js tests cases pass when using the static/shared library.

After that, we will want to add testing that covers typical use cases related to embedding Node.js into an application using either the static or shared libraries. I believe as part of that we'll also find that there are still some things missing. I just ran across this PR https://github.com/nodejs/node/pull/19005 which aims to address some of those kinds of things.

At this point, I'm wondering if there is enough interest to form a group that would work together or a number of months (maybe more) on defining and validating the different embedding use cases. The work would likely be:

  • Define/Document use cases
  • For each use case:
    • Build test case to cover use case
    • Identify any missing functionality
    • Add functionality
    • add test case to CI.

@yhwang @nodejs/delivery-channels @addaleax @luminosuslight, @cmfcmf, @Hannes01071995, @justus-hildebrand, @msoechting @nodejs/tsc @dshaw

mhdawson avatar Apr 12 '18 20:04 mhdawson

@groundwater I was hoping you might be interested in this, wondering if you go the ping through @nodejs/delivery-channels

mhdawson avatar Apr 26 '18 23:04 mhdawson

Thanks for CCing. We NW.js maintainers would like to keep an eye on this. Though we just released NW.js 0.30.1 with Node.js 10.0.0 within 24 hours, rebasing with latest Node.js is still a significant effort. We are interested in this topic on how to integrate Node more easily.

rogerwang avatar Apr 27 '18 01:04 rogerwang

@rogerwang thanks for replying, will include you when we get things rolling

mhdawson avatar Apr 27 '18 15:04 mhdawson

Hi @mhdawson. Thanks for this! We have a number of folks at JSConf EU, and I believe there is a node's summit occurring shortly beforehand. Would it be worth sending a few of our folks to kick this discussion off in-person?

groundwater avatar Apr 27 '18 15:04 groundwater

I think having folks at the summit would be awesome!

On Fri, Apr 27, 2018, 11:53 AM Jacob Groundwater [email protected] wrote:

Hi @mhdawson https://github.com/mhdawson. Thanks for this! We have a number of folks at JSConf EU, and I believe there is a summit occurring shortly beforehand. Would it be worth sending a few of our folks to kick this discussion off in-person?

— You are receiving this because you are on a team that was mentioned. Reply to this email directly, view it on GitHub https://github.com/nodejs/user-feedback/issues/51#issuecomment-385013637, or mute the thread https://github.com/notifications/unsubscribe-auth/AAecV7sxNVOg_xqfGPx2b0LqaasSzJ4dks5tsz79gaJpZM4TSdYW .

MylesBorins avatar Apr 27 '18 16:04 MylesBorins

Hello, yesterday i enabled the --shared flag on node 10 debian package. Worked perfectly and this is really cool. I think make install should continue to install the executable (the one linked to the built lib) though. Not yet ready on my side, but it's going to bring a lot of improvements with respect to packaged addons, and multiarch support in debian. I'll follow up on issues tracker if necessary. I wish i could share my enthousiasm regarding how nodejs has matured and is getting easier and easier to distribute...

kapouer avatar Apr 27 '18 16:04 kapouer

@groundwater I don't necessarily want to wait to start discussing and possibly meeting remotely until after the summit (not everybody will be at the summit either), but getting together in person at the summit would be great.

mhdawson avatar Apr 27 '18 17:04 mhdawson

@mhdawson agreed. Would you like to kick this off asynchronously or via a synchronous video discussion?

groundwater avatar Apr 27 '18 19:04 groundwater

I’d definitely like to be involved in this, yes.

Also, maybe /cc @fs-eire … please let me know if this is not the kind of thing you want to be pinged in, but it sounded like you might be somebody who wants to be aware that this is happening?

addaleax avatar Apr 27 '18 19:04 addaleax

I think starting with a video call to get together to review what I suggested above as the way forward and to agree on the best way to work together (github, regular meetings or whatever). I'll get together with @yhwang to set up a kickoff meeting.

mhdawson avatar May 01 '18 00:05 mhdawson

@gireeshpunathil FYI.

mhdawson avatar May 03 '18 15:05 mhdawson

We currently embed the shared library in IBM Integration Bus, we recently updated in quick succession from node 4 through 6 to node 8 and found the upgrade process pretty painful so anything we can do to help stabilise the interfaces or improve our own integration would be a benefit to us.

We are a bit unusual in that we also embed a JVM and on windows platforms a CLR as well so we may have some use cases / problems that other users do not so might bring some different use cases to the table.

davicrig avatar May 04 '18 14:05 davicrig

@davicrig sounds good, your insight will be valuable.

mhdawson avatar May 07 '18 14:05 mhdawson

With @mhdawson help, we plan to have a conference call to discuss about the shared lib usage and try to form the group for embedding users. Here is the agenda:

================================

  • Introductions
  • Update on work so far (Yi-hong and others)
  • Areas for investigation/discussion
    • Use cases
      • List top level use cases
      • Flesh out each use case/document
    • APIs
      • Document APIs for use when embedding
    • Tests
      • Create tests/test flows
      • Add tests/test flows to CI
  • Packaging
    • Investigate/document what we should in terms of packaging to make it easier to use shared library
  • Some questions
    • Communication
      • regular meeting?
      • github issues?
      • both
    • anybody else we should try to involve?
    • how to get more people involved
  • Action items
    • TBD ===============================

Feel free to add item into the agenda for discussion.

I created a doodle poll for the conference call ==> https://doodle.com/poll/tamxygwfsgh5dr5w. Please select your available time slots then we may select a proper time for the conference call once the most people who are interested in vote.

yhwang avatar May 08 '18 20:05 yhwang

@gabrielschulhof adding you as an FYI as from your comments in a different issue I'm hoping you are interested in participating here as well.

mhdawson avatar May 10 '18 18:05 mhdawson

Hey, just letting you know that there's a project that embeds .NET in Node but also the other way around. Perhaps it can provide some additional usage context. https://github.com/tjanczuk/edge

rkaw92 avatar May 11 '18 19:05 rkaw92

I'd like to add that https://github.com/janeasystems/nodejs-mobile is a project that allows you to embed node into Android/iOS application; Jaime @jaimecbernardo, might be interested in this; as I believe it would simplify updates if this was a consistent interface.

NathanaelA avatar May 11 '18 22:05 NathanaelA

@addaleax if you can make one of the proposed times can you fill out the doodle?

mhdawson avatar May 14 '18 15:05 mhdawson

@groundwater can you fill out the doodle?

mhdawson avatar May 14 '18 15:05 mhdawson

@rogerwang can you fill out the doodle?

mhdawson avatar May 14 '18 15:05 mhdawson

Hi, in debian, it's considered to be "the right thing" to build (independently packaged) node addons against libnode-dev. I've enabled this with nodejs 10 debian package (which is sitting in experimental right now because many addons are still not compatible with node 10). This to emphasize shared lib builds are not only useful for embedders, but for distributors as well.

kapouer avatar May 14 '18 16:05 kapouer

@kapouer are you talking about node.js as a shared library or things like openssl. The topic of this thread is the former.

mhdawson avatar May 14 '18 22:05 mhdawson

@mhdawson node.js as a shared library (which is as you point out, linked to other shared libs in debian).

kapouer avatar May 14 '18 22:05 kapouer

@kapouer I guess the libnode64 contains shared lib and libnode64-dev contains the header files. So distributors also care about the shared lib build as embedders. Thanks for the information.

yhwang avatar May 14 '18 23:05 yhwang

The poll result is 15:00 - 16:00 UTC/GMT this Thursday (17/May). Look forward to talking with you then. I will send out the invitation later.

yhwang avatar May 14 '18 23:05 yhwang

Doodle was closed. Will try to attend on Thursday.

rogerwang avatar May 15 '18 00:05 rogerwang

@rogerwang sorry for that and welcome to join the discussion on Thursday. And here is the zoom that we will use for the meeting: https://zoom.us/webinar/134723812

yhwang avatar May 15 '18 17:05 yhwang

I'll be there :)

codebytere avatar May 15 '18 17:05 codebytere

Great! I'll join the meeting on 17th May.

nitsakh avatar May 15 '18 17:05 nitsakh

I'll join on Thursday.

alexeykuzmin avatar May 15 '18 18:05 alexeykuzmin