Sign up ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

We are setting up something like a document library on Amazon AWS. The architecture is basically 1. AMI server running MongoDB 2. A bunch of PDF documents on elastic block storage 3. Some server-side scripting that pulls and parses metadata into MongoDB, and finally, 4. some front-end services that query the database. The end goal is a website that facilitates search and discovery of the PDF library (e.g. show me all PDFs written by X).

First, I wonder if this is a reasonable way to go about things. (Is this a good design pattern?) Second, we are having a difficult time exposing MongoDB through REST API. We can access REST through the browser address bar, but getting stuck on sending GET requests in client-side javascript because of cross-server requests. Any help is appreciated.

share|improve this question
What's wrong with the REST interfaces in the MongoDB docs? – Peter K. Feb 9 '13 at 3:07
It's fine, but we cannot get to it through javascript because it is a cross-domain request. Tried with jquery, something like $.get("$cmd/?filter_count=collection&limi‌​t=1", function(data) { alert("Data Loaded: " + data); There must be some more elegant way to do this! – denten Feb 9 '13 at 3:29
The idea was to grab the the JSON query results and display with javascript. – denten Feb 9 '13 at 3:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.