Calling Universe Subroutines from Node

183 views
Skip to first unread message

Nivethan T

unread,
Feb 3, 2022, 1:44:16 AM2/3/22
to Pick and MultiValue Databases
I've been playing around with node and calling universe subroutines and got it working. There's quite a bit of rough edges but I think it's an interesting route to  make a wrapper for intercall that works with node.

The C code is a mess because I don't know C but I think it would be much easier had I not chosen a function that takes variadic arguments like ic_subcall. This means that it would be relatively straightforward to wrap most of the intercall functions for use with javascript.

Not that I'm going to! but maybe someone will enjoy this!


I'd also be happy to hear about any improvements I can make/readings you recommend to get a better handle on C.

Joseba Real de Asua

unread,
Feb 9, 2022, 6:13:04 AM2/9/22
to Pick and MultiValue Databases
You can use Linkar. Linkar has a node.js framework. You can see all information at https://kosday.com/Manuals/en_WEB_LINKARFRAMEWORKNODEJS/Main/index.html

Nivethan T

unread,
Feb 12, 2022, 7:19:38 PM2/12/22
to Pick and MultiValue Databases

Ah! I'll take a look at this.

While doing some more universe/node stuff I wrote a quick npm paclage to work with multivalue from JS:


This uses javascripts proxy object to allow you to access things in the BASIC style of indexes starting at 1 and passing in subscripts like [1,2,3].

Nivethan T

unread,
Feb 22, 2022, 8:59:37 AM2/22/22
to Pick and MultiValue Databases
I wrapped most of the intercall library for use with nodejs. This is a synchronous library, a future project might be make it all async but I'm not sure how to go about it yet.

You can grab it here:


I also have documentation at:



Is there a way to get transactions working with intercall? I read most of the manual at this point but didn't see anything about it.

Brian Speirs

unread,
Feb 22, 2022, 2:55:52 PM2/22/22
to Pick and MultiValue Databases
I would expect the best way to handle transactions would be to do the whole transaction within a server-side subroutine. So, you would simply call the subroutine passing the appropriate parameters and get back some form of status element.

Cheers,

Brian
Reply all
Reply to author
Forward
0 new messages