Hi Paul and thanks for the reply. I know! The design is a bit messy as there 
should be no interactions between the filemgr and the middleware. I was asking 
this question from Chris to see how fast is transferring a file via a post 
command versus downloading the whole file from some specific place and he 
suggested to post it here. And I am glad I did.  You are right that it depends 
to the system. Also, I found out that I am required to use a post command and 
have no options anyways.

Thanks for your help again.

--Faranak

________________________________________
From: Ramirez, Paul M (388J) [[email protected]]
Sent: Wednesday, January 11, 2012 8:23 AM
To: [email protected]
Subject: Re: Restful commands versus reading a file by a middleware

Hi Faranak,

I'm a bit confused by your email because it sounds as though this question is 
more for the constraints of the ruby middleware you are interacting with. 
There's no reason the crawler couldn't send the metadata to the ruby middleware 
as a post ingestion success action or that the ruby middleware couldn't read 
the metadata from the filemgr. Writing the metadata file to disk seems like an 
unnecessary step but I could be wrong if those are system requirements. That 
said the ruby middleware can query the filemgr for the product metadata via 
xmlrpc or via REST (if you install the curation webapp which comes with a set 
of REST services). The answer really depends on your project system 
requirements.

I believe there is documentation to the REST services I'm talking about but I 
forget the link so hopefully someone will chime in. Although from what I can 
gather from your statement it sounds like you may want to try writing a 
CrawlerAction. In which case you also may want to write a failure action too as 
I'm assuming that the ruby middleware should know when stuff has gone awry.

I've done a very similar thing on another project and simply used the Apache 
HTTP client API within a crawler action to interact with a REST service.

Thanks,
Paul Ramirez

On Jan 10, 2012, at 2:46 PM, Davoodi, Faranak (388J) wrote:

> Hi All,
>
> I have a system that consists of a crawler and a filemgr that reads and 
> extracts few metadata from the files submitted to the staging area, then 
> submits the extracted metadata keys and their values over to a ruby 
> middleware. The system is already kind of slow. I am wondering if sending the 
> metadata keys and values via a set of restful commands are faster or leaving 
> the metadata file somewhere for the middleware to grab. Let me know what you 
> think.
>
> Thanks,
> Faranak

Reply via email to