Discussion:
[tex-k] IPC and TeX
Juan Batiz-Benet
2011-09-30 10:33:19 UTC
Permalink
Hello there!

I want to build a very efficient server to render (la)tex. The idea is not to hit disk at all, if it can be avoided, and just write everything via sockets. It seems that I should be using --ipc, but I can find no documentation of it anywhere. Any pointers would be greatly appreciated!

Cheers,
Juan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-k/attachments/20110930/0ae8d043/attachment.html>
Tom Rokicki
2011-09-30 20:47:25 UTC
Permalink
The IPC option (at least the way I wrote it originally) does not save any writes
to disk at all; it just uses an IPC channel to communicate which pages have
been written to the DVI file already.

For what you're doing, have you considered simply using a ram disk?

-tom

On Fri, Sep 30, 2011 at 3:33 AM, Juan Batiz-Benet
Post by Juan Batiz-Benet
Hello there!
I want to build a very efficient server to render (la)tex. The idea is not
to hit disk at all, if it can be avoided, and just write everything via
sockets. It seems that I should be using --ipc, but I can find no
documentation of it anywhere. Any pointers would be greatly appreciated!
Cheers,
Juan
--
-- ?http://cube20.org/ ?-- ?http://golly.sf.net/ ?--
Norman Gray
2011-09-30 21:00:25 UTC
Permalink
Juan, hello.
Post by Juan Batiz-Benet
I want to build a very efficient server to render (la)tex. The idea is not to hit disk at all, if it can be avoided, and just write everything via sockets. It seems that I should be using --ipc, but I can find no documentation of it anywhere. Any pointers would be greatly appreciated!
Depending on precisely what it is you're aiming to do, you might be interested in looking at Jonathan Fine's 'TeX Daemon'. The last reference I can find to it is from 2001 <http://www.ntg.nl/eurotex/fine.pdf>, but ... no, correction: Jonathan's put the code on bitbucket <https://bitbucket.org/jfine/texlike-daemon>.

Best wishes,

Norman
--
Norman Gray : http://nxg.me.uk
Karl Berry
2011-09-30 21:18:33 UTC
Permalink
I want to build a very efficient server to render (la)tex. The idea
is not to hit disk at all, if it can be avoided, and just write
everything via sockets.

Just a hunch, but I suspect you could get considerably further with
luatex than anything else.

k
Juan Batiz-Benet
2011-10-02 17:20:39 UTC
Permalink
Post by Tom Rokicki
The IPC option (at least the way I wrote it originally) does not save any writes
to disk at all; it just uses an IPC channel to communicate which pages have
been written to the DVI file already.
For what you're doing, have you considered simply using a ram disk?
-tom
--
-- http://cube20.org/ -- http://golly.sf.net/ --
Thanks Tom!Yeah, ram disk, or named pipes, could speed up the process considerably. But I'm also trying to avoid process creation, as it is pretty expensive. There doesn't seem to be any docs out there on how -ipc works. Any specific sources to look at? I'm not familiar with pascal, so i don't follow the code easily.
Post by Tom Rokicki
Juan, hello.
Depending on precisely what it is you're aiming to do, you might be interested in looking at Jonathan Fine's 'TeX Daemon'. The last reference I can find to it is from 2001 <http://www.ntg.nl/eurotex/fine.pdf>, but ... no, correction: Jonathan's put the code on bitbucket <https://bitbucket.org/jfine/texlike-daemon>.
Best wishes,
Norman
--
Norman Gray : http://nxg.me.uk
Thanks Norman! I tried to get it to work, but didn't. The tex binary just produced empty dvi files. I went through the setup process twice with the same result. I must've missed something. Though jfine's approach seems to be using pipes (py/tex), so that's encouraging!
Post by Tom Rokicki
Just a hunch, but I suspect you could get considerably further with
luatex than anything else.
k
Thanks, Karl! It seems that luatex's main purpose is to enable macros to be written in lua. Is there something about luatex's process that works differently? I see luasocket in the sources. Perhaps there's a way to script it through the callbacks? The docs aren't very descriptive on how. I'll keep exploring the code.


Cheers!
Juan



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/tex-k/attachments/20111002/91af33fd/attachment.html>
Loading...