On Tue, Dec 09, 2014 at 09:13:02AM -0500, Karl Dahlke wrote: > > Pipes, sockets or message queues would be the three I'd think of here. > > Right. Probably pipes cause it's easy, but it mostly doesn't matter > and could be easily changed one to another. Right, when I did this last time I landed on message queues eventually since the interface was a bit nicer to use (you put a message in, you get a message out, no need to worry about reading the correct amount etc), but I don't really mind any of the three. > > > how would this play with blocking calls, > > All three of these, and any others you might think of, > block by default, and can also be set nonblocking, > but I've learned over the years nonblocking is a bad idea. > Never make a nonblocking call. > My jupiter speech adapter for example - reads index markers > coming back from the synthesizer asynchronously, and your keyboard commands, > perhaps telling speech to shut up, and maybe speech > commands coming from other processes through the fifo /etc/jupiter.fifo. > Three asynchronous streams to monitor simultaneously, > and the right way to do this is by calling select. > In other words, if a primary process is monitoring many asynchronous > events from other processes / streams, select() is your friend. > It does exactly what you want. > This is deep in the kernel, and thank god they put it there, > because you just can't simulate it through any kind of user space programming. > Anyways, I believe we will be able to migrate to various asynchronous events, > ajax, download to disk in background, etc etc, when the time comes. Agreed (though on a scalability note, as we're on linux anyway, I'd go for epoll over select, but select is more portable, and with 3 descriptors there's no noticeable, or probably measurable, performance difference). > I will see if I can bang this first step out, > partly because I haven't programmed in about a year, > and I find that I really miss it. > When you're not programming for your boss / professor, it really is fun. > I estimate a couple of weeks. Sounds good. > Meantime you (plural) might look at v8 and just evaluate. > I still haven't gotten a hello world program to compile, > and honestly that concerns me. Yeah, that does sound rather concerning. When I've got a bit of time (this weekend may be) I'll have a look at the Debian packaged version and see how far I get. I'm also investigating if there are any other js engines which are in a suitable state for use in a web browser. I've got no solid candidates yet but I've got a couple of ideas. Cheers, Adam.