Non-blocking file behaviour for Reader

Hi!
It will be really nice if Reader will not block files for writing. Assume someone is using TeX to create PDF and he need to
a) examine the results;
b) edit the source.
It becomes a nightmare with Reader. Compile TeX, open Reader, examine results, close Reader. And then from the beginning.
Auto reloading of a PDF file is also a nice feature!
So far I can see only one solution: one should use another viewer to get non-blocking behaviour.
Thanks!

OK, let us see. I use Windows XP Professional SP3, Reader version is 9.3.0. I made a simple test: openned a file in Reader, then openned this file in my favourite text editor and tried to change "%PDF-1.4" to "%PDF-1.3" and save. I received a "File sharing violation error". I can also try to do it in Ubuntu.
As for the open source viewers. That is what I am currently doing: I use additional viewer to view the files I create and I use Adobe Reader to view all other files. One can leave with such solution, but it is not the best.

Similar Messages

  • Non-blocking file access?

    1. Did I miss something: is there a way in java 1.5 (or even java 1.6) to read files and query file metadata (size, last modified, that kind of thing) in a non-blocking manner?
    2. Is there a way to figure out where physical harddrive boundaries lie without resorting to tricks like running 'df' and parsing the output, which is rather un-portable? I obviously don't want to create a thread per file read (one aim is that the maximum number of threads is constant - even with a gazillion requests the amount of threads will never exceed a (low) constant.) but just 1 thread to perform all required reads would possibly end up wasting time if there are multiple harddrives and the CPU is idling anyway. I'd guess at this point that 1 thread per physical harddrive handling all file access is the best way to go, but how do I figure out those boundaries?
    3. Is NIO2 (JSR 203) going to add features to work with files in a non-blocking way?
    4. Is there a full-stack (templating, database access, writing web services, serving up the data) web server out there someplace that works entirely on a non-blocking methodology? I don't think so, but I might have missed something. JETTY tries something, but the servlet specs fundamentally do not work with non-blocking I/O, so it doesn't count.
    background:
    I'm writing a non-blocking webserver. KISS is the attitude - so far the basic system and any services (my take on the servlet spec, as the servlet spec doesn't play nice with NIO principles) on it all run inside a single thread, no thread pool.
    So far it all works, and stress testing it with 1000 connections, 200 at the same time shows a process time of about half a millisecond per request, on a simple macbook, which is nice, because that beats apache even at serving up 404s.
    So far I have only written very simple test apps that for example do calculations and the like, nothing that you'd actually do with web apps, like, say, serving (template-powered) data from files on a harddrive.
    Because of the absolute requirement for each service NEVER to block while serving up bytes, manually working with files would be an unbelievable pain on the part of the web service developer. Hence I'm building templating and DB access into the system.
    Unfortunately, I realized, reading NIO specs, that there doesn't seem to be any way to perform file operations in a non-blocking manner (not just reading them, but getting file size and last modified timestamps as well). I'll obviously have to use a lot of caching tactics, but before I can cache, I need to read files somehow.
    The aim of this webserver is basically to survive massive spikes in traffic, be it from digg/slashdot, or from a DDOS attack, as best as possible, and where that isn't possible, to gracefully fall apart. That is, service as many requests as possible at a certain minimum bandwidth per request, prioritizing repeat visitors and site moderators, and deny the rest instantly, instead of just falling apart in shambles as happends in your usual LAMP or servlet design, not serving even 1 request right most of the time.
    Thanks a lot for everyone's time!

    ejp wrote:
    BufferedInputStream will improve the performance by a factor of several thousand because it cuts down on system calls.Well, that might be true if you're reading individual bytes with a call to read(), or making many small read( buffer ) requests. But if you call read( buffer ) with a reasonably sized buffer (BufferedInputStream uses 8192 bytes as a default buffer size), then you're going to get performance equal to or possibly better than a BufferedInputStream.

  • Using non blocking connect() call for SCTP sockets in Solaris10

    Hi,
    I have a problem with non blocking connect call on SCTP socket.
    I am using the sctp stack support in Solaris10.
    When the connect is successful, I can get the pollout event on the socket.
    But there is no event observed when the peer does not exist. In other words, I could not get the pollout event on connection failure. This logic works fine with TCP sockets on both Solaris and Suse10.
    I am working with SCTP one-to-one style sockets.
    Is there any way to handle this issue?
    Do I need to load any patch to resolve this issue?
    It will be great if I get a solution in this regard.
    Thanks in advance.
    Best Regards,
    Bipin.

    There are at least two problems here.
    A. In the receiver you should test for -1 from the read() immediately, rather than continue with the loop and try to write -1 bytes to the file.
    B. In the sender you are ignoring the return value of client.write(), which can be anything from 0 to the buffer length. If you get 0 you should wait for another OP_WRITE to trigger; if you get a 'short write' you need to retry it until you've got nothing left to write from the current buffer, before you read any more data. This is where the data is vanishing.

  • Writing Java Non-Blocking Socket Server for  Winsock Client

    Hi.
    Im a newbie to Sockets. I need to write a Non-Blocking Socket server (using java.nio) that accepts connection and reads the data sent by WinSock clients, and write them to another winsock client. Its quite intriguing. How do I do that? Is it possible?
    Thanks in advance
    Arun

    Well, in traditional 4.2 BSD sockets, you'd fill up a set of filedescriptors of connections (an array of bits usually), and push that in the read parameter of a call to 'select'. Select then blocks until at least one of the file descriptors become available for reading, or writing if you also made an fd_set full of file descriptors (but you can usually write freely to a socket, so there is not much use for that). Then you start finding out which of these file descriptors have actually become available for reading, and you pass those to a bunch of worker-threads. The advantage is that your set of worker-threads can be quite small, while your number of connections can still be quite large (unless, of course, everyone of your clients start talking all at once, but that is no different from the one-socket-one-thread-model that java.net.* forces upon you).
    In java, the 'select' call is replaced by a call to java.nio.channels.Selector.select(); and then the fishing out of the selected stuff comes from java.nio.channels.Selector.selectedKeys().
    To add a thingy to a selector, use (for example) java.nio.channel.ServerSocketChannel.register(Selector, ops, att);
    whereby the ops parameter is the kind of action you'd like to select this channel for; SelectionKey.OP_READ etc..
    The workerthread bit is also easy to write, but I leave that to you as an exercise.

  • Non-blocking file selector?

    Running W98/Labview 5.1.1, I have a DAQ application that collects data and
    streams it to file. For this I would like to be able to change output
    files without breaking the DAQ loop. For some reason, however the DAQ loop
    occurence will time out the moment I open the file dialog, even though
    the dialog runs in it's own while loop and even in it's own sub VI with
    low priority. Any suggestions how I could get a non-blocking dialog box?
    TIA,
    Rudolf

    Hi Rudolf,
    take a look
    http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&75C636329327A87B862568690074800A&cat=8ABEC12D4C0AA4A3862567AC00583899
    I hope it help you in many cases.
    Mike
    Rudolf Potucek wrote:
    > Running W98/Labview 5.1.1, I have a DAQ application that collects data and
    > streams it to file. For this I would like to be able to change output
    > files without breaking the DAQ loop. For some reason, however the DAQ loop
    > occurence will time out the moment I open the file dialog, even though
    > the dialog runs in it's own while loop and even in it's own sub VI with
    > low priority. Any suggestions how I could get a non-blocking dialog box?
    >
    > TIA,
    >
    > Rudolf

  • Check if file open for read (INPUT)

    Hi,
    how ti cheeck if file is open for reading. I have problem, that one file could be open for reading, for example with RFBIBL00, and my Z program creates this file. My program should not be able to open this file, because of inconsistencies in RFBIBL00. Diff. filenames aren't an option....
    thx
    mario

    not helping, in case that one program has
    open dataset dsn for input in text mode encoding default.
    in other program:
    open dataset dsn for output in text mode encoding default.
    returns sy-subrc = 0.
    and i'm able to use
    transfer string to dsn
    . and change file.
    I don't want to do that

  • FileInputStream.read()  and non-blocking file i/o

    According to the API, FileInputStream.read() is :
    public native int read() throws IOException
    Reads a byte of data from this input stream. This method blocks if no input is yet available.
    Returns:
    the next byte of data, or -1 if the end of the file is reached.In what instances does the read() blocks? Is there a danger that the call to read() would block forever?

    thanks martian!
    is the ff code right enough to prevent i/o blocking?
      FileInputStream fis = new FileInputStream(src);
      FileOutputStream fos = new FileOutputStream(sPersistorFolder+src.getName());
      if(fis.available() > 0) {
        int c = -1;
        while((c=fis.read()) != -1) {
          fos.write(c);
      fis.close();
      fos.close();

  • Reg RFCSDK files download for reading file in the background.

    Hi All,
    I am trying to read a file in the background for which I need the RFCSDK. i am using R/3 Version 4.6C...
    I searched every where in the service market place but with no luck. Can any one tell me if there is any other location to find the same.
    <removed by moderator>
    Any help would be highly appreciated.
    BR,
    Krishna.
    Edited by: Thomas Zloch on Oct 25, 2010 9:58 AM

    Hi Krishna,
    Try at below link,
    [http://blogs.msdn.com/b/adapters/archive/2007/10/07/obtaining-the-rfc-sdk-unicode-libraries-from-sap-service-marketplace.aspx]

  • Upgrade Livecycle File Format for Reader XI Compatibility

    I am having an issue with a basic form created in Livecycle ES (Bundled with Acrobat 9 Pro).  I am unable to print the form in Reader XI but Reader X works fine.  The application stops responding when clicking print. I wanted to know if there is an easy way to update this file to be compatible with Reader XI.  I have ES3 currently installed.  Thank you in advance.
    EDIT: Would also like to know if there is a way of debugging this file to determine what is causing the app crash.  I have an older version of the file that does not cause Reader to crash. 
    Rob

    UPDATE: I was able to comb through the form and found someone had added a malformed image of some sort.  Once that was removed the form printed fine.

  • Reading files created for reading on the Palm platform

    I have a substantial amount of content on a Palm expansion card (Treo 600). I want to be able to read this material on an iPhone. Can this be done and how?

    I asked a writer of similar software (http://www.lionscribe.com/default.htm) a question about these Palm files. He said these files are stand-alone Palm applications, and they won't work in any other device.
    I don't want to give up this reference material, much of which is in Hebrew (see http://www.jewishcontent.org/#palm). And I would like to use it on a new iPhone.

  • Non-Blocking SocketChannel read give Connection timed out

    Hi,
    My program is using Non-Block NIO SocketChannel for both Server and Client sides. However, if the connection between server and client has been idle for a while, when the client try to communicate with server, it gets blocked for a while (15 minutes) and then receives the following exception:
    java.io.IOException: Connection timed out
         at sun.nio.ch.FileDispatcher.read0(Native Method)
         at sun.nio.ch.SocketDispatcher.read(Unknown Source)
         at sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)
         at sun.nio.ch.IOUtil.read(Unknown Source)
         at sun.nio.ch.SocketChannelImpl.read(Unknown Source)
    How can this be since the read is in Non-Blocking mode? Also, is there anyway to determine the timeout without being blocked?

    This would mean that you are trying to read from the socket without having properly completed the connection, which timed out. I would say you are connecting in non-blocking mode but not calling finishConnect() when you get OP_CONNECT.

  • Does iCloud maintain file versions for non-Apple file types?

    Does iCloud maintain file versions for non-Apple file types? 

    Does iCloud maintain file versions for non-Apple file types? 

  • Thread vs Non-Blocking - invoke thead

    Hi,
    My question related to Thread vs Non-Blocking IO used for network application. If my application needs to handle several thousands or even ten thousand connection simultaneously, did I little research, I concluded that instead of having 10,000 thread running (don't know even that number is possible), I should use NIO instead. My question is that, if I use NIO and fire up a thread everytime I had new data coming in to process, will over head of creating new thread reduce performance a lot than having all the thread running all the time? Should I handle incoming data sequentially and try to avoid blocking during the process?
    TIA

    If you would take the trouble of reading the previous 10 or 20 posts in this forum about threads and/or NIO you would have your answer, or at least most of it.

  • File Adapter and reading all XML files from direcotry

    Problem occurs on PI 7.1
    I defined sender file adapter. File name mask is: "*.xml" to read all XML messages from directory.
    Quality of service is: Exactly One.
    Poll Interval: 30
    Retry interval: 30
    Processing mode: Archive with option "Add Timestamp".
    Processing sequence: by name.
    I though that with above configuration my File Adapter will be reading folder for all coming XML files. But  somehow it is reading XMLs only when I'm activating it in Integration Builder.
    Any idea what can cause such strange problem?

    Hi Tomasz,
    As per my understanding, you need to activate the file adapter for reading the XML files on your directory. Right?
    If that is the case, then the issue might be with the Cache.
    1. Clear the cache from the Integration Builder.
    2. Check in SXI_CACHE whether there are any issues. Click on Delta Cache refresh to find out if there are any cache related issues.
    Thanks,

  • Multiple File Location in Read operation in File Adapter.

    Hi,
    I am using File Adapter for Read operation. Normally we would make a Logical Directory for reading files at that location. But I have come up with a scenario where we need to read file from 6 different File locations.
    Is there any way that the same BPEL process can read file from 6 different locations.
    OR
    Do I need to make 6 BPEL processes to read file from 6 different locations.
    I am using Oracle SOA 10.1.3.4 and JDeveloper 10.1.3.4.
    Will really appreciate if someone can help in this regard.
    Thanks for the needful.
    Cheers,
    Varun

    Hi Oracler,
    Thanks for your reply.
    As suggested, the BPEL process with six different file adapters for six different directories and put them on each of the six branches of the pick activity. Will there be any performance oriented issues if you use six adapters for polling at 6 different locations??
    Also, the other solution that you have provided from this link Re: Can we have dynamic folder for Polling in BPEL works fine. One of a problem that I encounter while using this solution is that everytime you do any chnages in your BPEL process, the entries from bpel.xml are missing.
    Thanks for the needful.
    Cheers,
    Varun

Maybe you are looking for