Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1344
  • Last Modified:

create non blocking fifo file in java

Hi,
  IS there any way to create non blocking fifo(like a pipe file) file in java
0
prgeorge3383
Asked:
prgeorge3383
  • 4
  • 3
  • 2
  • +2
1 Solution
 
CEHJCommented:
What are you going to do with it?
0
 
prgeorge3383Author Commented:
i am planning to write the parse xml data in to a pipe file and have another process read from it and load to the tables
0
 
CEHJCommented:
Hmm that may not be suitable for queueing, depending on the xml. Why not process it consecutively as opposed to concurrently?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
prgeorge3383Author Commented:
will be parsing the xml data in toa pipe delimtted file and each record sperated by carriage return.....
loading in to tables is the slow part
0
 
mightyoneCommented:
must it be a file? which java version 1.5?

consider using queues instead....
0
 
CEHJCommented:
>>in toa pipe delimtted file

Why? Why not directly into the db?
0
 
WebstormCommented:
Hi prgeorge3383,

If you're using unix, you may use named pipe.
You can also use shell pipe :
   java -cp ... <yourclass> | ...

or use java.net.Socket
0
 
mrigankCommented:
You can do some thing like
a) the write process writes into different files, each file having a fixed number of xml parent elements. File names have their file numbers appended.
b) the parse process reads the already written files (based on last modified date or a number appended to the file name) .

The only latency here is the time when both the source and parse process vie for the same file, let the parse process wait, or write the file after a specified time elapses.
0
 
prgeorge3383Author Commented:
using mysql inmemory option now..... this seems quick and fast enough....
0
 
CEHJCommented:
:-)
0
 
mightyoneCommented:
lol
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now