Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create the server #17

Closed
6 of 7 tasks
gdey opened this issue May 18, 2019 · 3 comments
Closed
6 of 7 tasks

Create the server #17

gdey opened this issue May 18, 2019 · 3 comments

Comments

@gdey
Copy link
Member

gdey commented May 18, 2019

Add a server component to the atlante command.

Implement the following URLs:
${sheet_name} = 50k | 5k

  • 1. GET /sheets/${sheet_name}/mgdid/${mgdid-part}.pdf this will return the pdf. (Proxy) Should set all appropriate headers

  • 2. GET /sheets/${sheet_name}/info/${lng}/${lat}

  • 3. GET /sheets/${sheet_name}/info/mdgid/${mdgid-sheet_number}

these will return the following JSON:

{
  "mdgid" : string,
  "sheet_number" : null | number,
  "pdf_url":  null | url, // if null, pdf has not be generated
  "last_generated" :  null | date, // last time the pdf was generated
  "last_edited" : date,  // last time the data was edited
  "edited_by" : string, // the person who edited this last
  "series" : string,
  "geo_json" : geo_json // the geo_json of the bounding box.
  "lng" : null | float // the queried lng
  "lat" :  null | float // the queried lat
  "sheet_name": string
}
  • 4. POST /sheets/${sheet_name}/mdgid will cause the pdf generation the job to start.

expected:

{
   "mdgid" : string,
   "sheet_number" : null | number,
}

returned:

{
   "mdgid" : string,
   "sheet_number" : null | number,
   "sheet_name" : string,
   "job_id" : number,
   "status" : "requested" | "started" | "processing" | "compleated",
}
  • strike__[x] 5. GET /sheets/${sheet_name}/info/job_id/${job_id}__
  • 5. GET /jobs/${job_id}/status
{
   "mdgid" : string,
   "sheet_number" : null | number,
   "sheet_name" : string,
   "job_id" : number,
   "status" : "requested" | "started" | "processing" | "completed",
   "status_description" : string,
}
  • strike__[ ] 6. POST /sheets/${sheet_name}/notification used to notify the server that the pdf has been generated.__
  • 6. POST /jobs/${job_id}/status
{
   "status" : "started" | "processing" | "completed",
   "status_description" : string,
}
  • 7. GET /sheets/ used to get the currently configured sheets.
{
   "sheets" : []{
        "name": string,
        "scale" : number, // the scale in meters -- 5k => 5000; 50k => 50000
        "description":string,
    }
}
gdey added a commit that referenced this issue Jun 7, 2019
* Go the basic outline of the queue done.
* AWSBatch queue provider done.
* URL for submitting jobs
gdey added a commit that referenced this issue Jun 7, 2019
* Go the basic outline of the queue done.
* AWSBatch queue provider done.
* URL for submitting jobs
gdey added a commit that referenced this issue Jun 7, 2019
* Go the basic outline of the queue done.
* AWSBatch queue provider done.
* URL for submitting jobs
* Doc changes to README
* fixed Broken SQL
* Changed C -> C in the awsbatch.Provider
gdey added a commit that referenced this issue Jun 8, 2019
if the key was not in the s3 bucket we would still generate a presigned
url. Now we will first do a quick check and then only if the key exists
do we generate a presigned url.
ARolek pushed a commit that referenced this issue Jun 8, 2019
* [#17] fixed issue with s3 URL gen

if the key was not in the s3 bucket we would still generate a pre-signed
URL. Now we will first do a quick check and then only if the key exists
do we generate a pre-signed URL.
@ARolek
Copy link
Member

ARolek commented Jun 8, 2019

@gdey while testing I noticed that pdf_url goes away if the PDF has not been created yet. It should be null rather than omit empty.

edit: found the issue: https://github.com/go-spatial/maptoolkit/blob/master/atlante/server/server.go#L195

@gdey
Copy link
Member Author

gdey commented Jun 18, 2019

Removed omit-empty, it will remain now.

@gdey
Copy link
Member Author

gdey commented Jun 19, 2019

Moved 1. to #47

@gdey gdey closed this as completed Jun 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants