Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #11971
| From | Roedy Green <see_website@mindprod.com.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: Interplatform (interprocess, interlanguage) communication |
| Date | 2012-02-12 04:30 -0800 |
| Organization | Canadian Mind Products |
| Message-ID | <d0cfj7l08qp29v1vi8m4qc2fiq3jfg7ej0@4ax.com> (permalink) |
| References | <IPC-20120203200443@ram.dialup.fu-berlin.de> <5d6ri75i15ei1uv9ill2dgrno1cgd28sho@4ax.com> <268ri7tlv525st589d40efiq0137f0vaag@4ax.com> <jgk874$njb$1@news.albasani.net> |
On Sat, 04 Feb 2012 22:33:23 +0100, Jan Burse <janburse@fastmail.fm> wrote, quoted or indirectly quoted someone who said : >Obtain the lock: > raf = new RandomAccessFile(file, "rw"); > > fo = new FileOutputStream(raf.getFD()); > fo.getChannel().lock(0, Long.MAX_VALUE, false); > >Release the lock: > fo.close(); That is quite a bit of overhead. I would work fine for low traffic. I was hoping for something that would let you leave the file open in both jobs. e.g. a reserved block or blocks in the file that the intercommunicators read and wrote to lock. I suppose you could send messages to a task that owned the file (a primitive database), but then you might as well send messages directly to each other. -- Roedy Green Canadian Mind Products http://mindprod.com One of the most useful comments you can put in a program is "If you change this, remember to change ?XXX? too".
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Interplatform (interprocess, interlanguage) communication Roedy Green <see_website@mindprod.com.invalid> - 2012-02-04 12:50 -0800
Re: Interplatform (interprocess, interlanguage) communication Roedy Green <see_website@mindprod.com.invalid> - 2012-02-04 13:22 -0800
Re: Interplatform (interprocess, interlanguage) communication Jan Burse <janburse@fastmail.fm> - 2012-02-04 22:33 +0100
Re: Interplatform (interprocess, interlanguage) communication Roedy Green <see_website@mindprod.com.invalid> - 2012-02-12 04:30 -0800
Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-04 18:42 -0500
Re: Interplatform (interprocess, interlanguage) communication Arne Vajhøj <arne@vajhoej.dk> - 2012-02-04 18:39 -0500
csiph-web