🎉 Node-RED 1.0.0-beta.3 released

My initial concern & worries, being a bit hesitant to upgrade, that something eventually could break was justified, I mean it happened to me. And it happened to you. Not that it was difficult to fix afterwards, not that I did not want to upgrade, I will for sure, also in the future.
What I maybe was missing was some kind of warnings issued together with the release pointing me in this direction to avoid the things to break. Remember I asked for a compatibility tool. Would it really be impossible to scan a flow file for such things?

Well, anyway, my upgraded system is running perfect, no other issues whatsoever

Well, we look forward to your example compatibility check tool :smiley_cat:

I'm sure that if any of us can think of a way to do some checks we will come forward and make some suggestions. After all, a lot of people will be in the same situation. But I think we can see from the conversations in this thread, that actually this is complex enough to talk about let alone programme tests for.

We'll do another beta on Monday to get this fix out there.

3 Likes

I'm just the annoying customer putting requirements together :wink:

Ooh, I’ve similar code like this in a subflow, though not directly a socket connection it might still go wrong. Thanks for the quick reminder, it’s on my test machine. Good reason to have that go to 1.0b3 for seeing how it handles that subflow now.
Third party library (through global context) that creates objects including circular references, with that object being passed down to a second function node...

Luckily we don’t think of you as customers :slight_smile:
More as opinionated friends down the pub

10 Likes

Wonderful

Yes of course, I feel the same, I was just joking a bit :wink:
Is unfortunately a bit far to a common pub where we all could meet, otherwise, a nice cold pint would be perfect right now

My best regards to all friends

3 Likes

NR has been a game-changer for me. I might even fully adopt the dashboard at some point - I must remember how to make good buttons though :-)) At one point I had haptic feedback and really good visuals then forgot all about it...

Thanks to Nick, Dave and all for the feedback on this - REALLY appreciated. As for the upgrade on Monday - well, we really could not ask for more. I'm at a pre-planned beach trip until Wednesday (last tan boost before going back to freezing blighty for the winter, though here in Southern Spain we just had the most horrendous floods) and I'll scan discussions immmediately on my return and presumably upgrade.

Sadly in our local pubs I'm the only one who can program AT ALL unless someone is sitting there very quietly and laughing.

.

4 Likes

Not sure that you are getting much sympathy given that you are sat in sunny Spain all summer :smile:

Speaking of pubs though. If anyone finds themselves in Sheffield, give me a shout, I'd be happy to share a pint or 2.

1 Like

...and I'm in Stockholm, Sweden if your path is crossing here. We do have nice beer here as well :wink:

Indeed you do, I was there a couple of years ago.

I was also due to speak there - unfortunately, some nasty person released Wannacry into the NHS and I had to cancel to help take care of that.

However, it is a tad more expensive to drink there than it is in Sheffield! :smile:

I can't help it but the following code made me unsure. Will the msg get cloned each time node.send is called?

var i = 0, howManyTimes = 5;

function f() {
    node.send(msg);
    i++;
    if( i < howManyTimes ){
        setTimeout( f, 3000 );
    }
}

f();

I'm fairly certain pre v1 the answer is no (send by ref)
Post v1 yes - clones will be sent (as you did not specify false for the 2nd parameter)

Also, I am guessing you are meaning this code to be ran in a function block.

As I read it, the node.send() in a custom node remains unchanged and cloning is the authors responsibility.

It does mean we will have different function signature for function nodes and custom nodes - something we'll just have to get used to.

Edit... Please correct me if I am wrong.

I did consider this.

Custom nodes must be written to handle messages properly because they have no idea how a user may wire them in. It cannot make any assumptions about how it will be used.

Whereas a Function node is written by the user in the context of the flow it is being used.

2 Likes

Once we ship the clone fix next week, then every message passed to node.send will get cloned as part of the call to node.send.
So yes, the function you've shared will cause the msg to be cloned every time.

OK, thanks, so it means that the cloned object will not be reused, instead there will be x number of cloned msg's left in memory until garbage collection runs? So just a problem with very large msg objects

They won't get garbage collected till whatever nodes you pass then on to have finished with them.

Interesting topic to follow. ”Pass by reference” was unexpectedly emotional for a while. Also a bit heavy on the dont break my flows side. In all that I hope the main point of a major release is not blurred. To point out the direction of the future.