Hacker News new | ask | show | jobs
by ptx 3047 days ago
> communicate with it in both directions in real-time without significant overhead

Doesn't all the communication have to be done by passing JSON-encoded messages between threads? So compared to calling a function on the same thread, there is very significant overhead, especially if you want to pass large data structures (which would have to be serialized) or if the calling thread needs to block waiting for the answer.

But as long as you stick to send small and asynchronous messages, it doesn't have a significant impact on the user experience, I suppose.

Or did they do something to improve this lately?