stackvana / hook.io

Open-Source Microservice Hosting Platform
https://hook.io
Other
1.27k stars 119 forks source link

Remove datastore logic from child process in favor or parent process #145

Closed Marak closed 8 years ago

Marak commented 9 years ago

Currently, the datastore is only available for JavaScript.

This was by design.

Moving forward, additional languages will want to take advantage of the cloud datastore. In order to do this, we'll need to migrate the datastore API from the child process, and move it to the parent process.

Communication to the datastore will be done over STDIO. Considering we don't have a multiplexed stream interface over STDIO yet, this might be blocked on that.

Related: #144

Marak commented 9 years ago

Related #99 #113

Marak commented 9 years ago

It looks like the Node.js API has changed a bit for the better lately.

see: https://nodejs.org/api/child_process.html#child_process_options_stdio

We should be able to just use child_process.send() and not care if the child process is node binary or not.

Neat! Will try it out soon.