Vlad, On Sunday 07 December 2008 16:12, prhlava wrote: > > You're asking for the pipe to be repeatedly opened, one > > uninterrupted glob of bytes read and processed and then the pipe > > closed. Is that really what you intend? > > Yes, that was my intention, maybe a rethink is in order... > > > As written, this suggest a kind of "daemon" that monitors the pipe, > > waiting for successive writers, each of which must write everything > > they want processed by the far side in a single write call and > > furthermore that transmission must not exceed the operating > > system's pipe high-water mark. All this seems a bit fragile to me. > > > > But more practically, you should _say_ what you want your code to > > accomplish. > > Store e-mail messages in a database (I am porting a program that > already does this, as an exercise) + making it work through pipe (as > java start-up is longish) => therefore I will have submitter and > "daemon" receiver...
I cannot really recommend using named pipes for this. Or, really, for anything. Naturally, a CGI-style approach that uses Java applications is going to have a severely limited request processing rate because of the very high JVM start-up cost. So the desire to create a permanent server is appropriate. However, the use of a named pipe most likely is not. If your application is client/server, you really should just go with an ordinary TCP connection (or, conceivably, a UDP port), define a proper protocol and do the whole thing properly. Realistically, I'd start by looking at the ordinary Servlet / HttpServlet mechanism. You get so much from existing servlet containers (Tomcat, Jetty, GlassFish, etc.) that it's very hard to justify starting from scratch. > > > Thanks for the explanations, the blocking is not a problem. ... > > > > It was not clear whether or not your mention of the blocking > > behavior was something you considered unexpected or problematic. > > No worries, I ment it as a hint, but this is also the 1st time I am > woking with named pipe, so the explanations were welcome... Named pipes have peculiar semantics and, of course, do not cross machine boundaries (unless you're running in one of the now-rare distributed Unix kernels—I say this as a one-time employee of Locus Computing Corporation...). I can't say named pipes really useful for much other than their use by shells for their <( command ) syntax. > ... > > Vlad Randall Schulz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---