mohamedmansour / hackathon-letsgo.io

letsgo.io - Photo Hack Day 4 project
http://letsgo.io
5 stars 6 forks source link

Server is not pulling code from Github #37

Closed justinormont closed 11 years ago

justinormont commented 11 years ago

I committed code 9 hours ago, and it hasn't made it to the server.

Compare: https://github.com/mohamedmansour/letsgo.io/blob/master/public/javascripts/website.js to: http://letsgo.io/javascripts/website.js

It's missing line 49: if (document.documentElement.clientWidth * document.documentElement.clientHeight > 600000) { urlState.lp = true; }

mohamedmansour commented 11 years ago

Please remove webshot dependency, that doesn't work. Not even on Azure, or my personal machine.

Command: deploy.cmd

Handling node.js deployment.

KuduSync.NET from: 'C:\DWASFiles\Sites\phd4\VirtualDirectory0\site\repository' to: 'C:\DWASFiles\Sites\phd4\VirtualDirectory0\site\wwwroot'

Copying file: 'iisnode.yml'

Copying file: 'public\javascripts\app.js'

Copying file: 'public\javascripts\website.js'

Node.js versions available on the platform are: 0.6.17, 0.6.20, 0.8.2.

Selected node.js version 0.8.2. Use package.json file to choose a different version.

npm http GET https://registry.npmjs.org/webshot

npm http 200 https://registry.npmjs.org/webshot

npm http GET https://registry.npmjs.org/webshot/-/webshot-0.3.2.tgz

npm http 200 https://registry.npmjs.org/webshot/-/webshot-0.3.2.tgz

Process 'starter.cmd' aborted due to idle timeout.

Same thing happened to me locally.

justinormont commented 11 years ago

So, what makes it run on my machine, and not others? Perhaps, it works on mac?

mohamedmansour commented 11 years ago

Perhaps windows compatibility

--- Original Message ---

From: "justinormont" notifications@github.com Sent: April 17, 2013 12:29 AM To: "mohamedmansour/letsgo.io" letsgo.io@noreply.github.com Cc: "Mohamed Mansour" mmansour@outlook.com Subject: Re: [letsgo.io] Server is not pulling code from Github (#37)

So, what makes it run on my machine, and not others?


Reply to this email directly or view it on GitHub: https://github.com/mohamedmansour/letsgo.io/issues/37#issuecomment-16490941

jeremybenaim commented 11 years ago

maybe the fact that we cannot install PhantomJS on an Azure instance?

mohamedmansour commented 11 years ago

We have to research on that. Phantomjs works fine on windows, we use it exclusively in Microsoft.

I believe since we are using a cloud platform, phantomjs wont work on Azure Websites, heroku, appengine.

But it should work in dedicated cloud OS, like Azure VM, AWS, Linode.

I say we should remove webshot dependency because it requires a full vm to run, I can't even make it run on my Windows so it says that it is buggy, and it is resource intensive.

We shouldn't be scrapping the website to produce a screenshot, lots of CPU cycles will happen since phantomjs is basically a headless browser.

We should find another solution which is cloud friendly that doesn't require an external process to run.

Sent from my Windows 8 Phone


From: Jeremy Benaimmailto:notifications@github.com Sent: ‎4/‎17/‎2013 9:36 AM To: mohamedmansour/letsgo.iomailto:letsgo.io@noreply.github.com Cc: Mohamed Mansourmailto:mmansour@outlook.com Subject: Re: [letsgo.io] Server is not pulling code from Github (#37)

maybe the fact that we cannot install PhantomJS on an Azure instance?


Reply to this email directly or view it on GitHub: https://github.com/mohamedmansour/letsgo.io/issues/37#issuecomment-16517208

jeremybenaim commented 11 years ago

Actually I find the concept of having a screenshot of the map pretty cheap : /

justinormont commented 11 years ago

@jeremybenaim : What kind of image would you like to include for a social share?

I'm looking to share branded screen shots like this: LetsGoIO Shared Image San Fancisco to New York City

LetsGOIO Shared Image Berlin to Tibet

If they have an image showing, we can show it easily... LetsGoIO Shared Image San Fancisco to New York City - With Photo

Maybe unbranded is better? LetsGoIO Shared Image San Fancisco to New York City - With Photo - Unbranded

jeremybenaim commented 11 years ago

But I don't get the purpose of sharing a screenshot, maybe we should work on having a proper user section where he can actually manage his saved trips and from there we'll see how to get a nice picture of the itinerary

mohamedmansour commented 11 years ago

Spawning another process, waiting for that headless browser to start, waiting for the JavaScript to finish executing, and finally waiting for the page load to end, is not cheap :) Not only that it isn't cheap, it is costly, and will run out of CPU cycles quickly.

Sent from my Windows 8 Phone


From: Jeremy Benaimmailto:notifications@github.com Sent: ‎4/‎17/‎2013 9:50 AM To: mohamedmansour/letsgo.iomailto:letsgo.io@noreply.github.com Cc: Mohamed Mansourmailto:mmansour@outlook.com Subject: Re: [letsgo.io] Server is not pulling code from Github (#37)

Actually I find the concept of having a screenshot of the map pretty cheap : /


Reply to this email directly or view it on GitHub: https://github.com/mohamedmansour/letsgo.io/issues/37#issuecomment-16518011

justinormont commented 11 years ago

The purpose of including an image in a social share, is that it attracts much more attention than social share only with a text description.

If a user's intent is to share the photo, perhaps we'd display just the photo with or without the chrome & side map which shows the photo location and that it is part of a larger experience? If the user's intent is to share the route, perhaps we should show the whole map? If the user's intention is to share their itinerary, perhaps we should put the photos from their itinerary in film stip, or other form?

The map screenshot would be included with social shares which come from a bare url with parameters, which will come from a 'link to this page' button. In code this is produced from the getUrl() or replaceWindowHistory() functions.

The urls look like: http://letsgo.io/?q=New+York+City&from=San+Francisco&wp=37.77711868286133,-122.41963958740234,40.71455001831055,-74.00711822509766&dpid=8158094262&lp=true

justinormont commented 11 years ago

A screen shot takes 0.16 cpu seconds in node, and 1.17 cpu seconds in phantom on my mac.

I'd love if the social shares started to have an impact on our server. Also, we can trivially move that part to another server, and at worst, the image part will timeout.

mohamedmansour commented 11 years ago

~2CPU is expensive and is slow once it is remote and not local. We should look at different ways sharing routes. I don't believe we have right to share the screenshot since we don't own it in any way (copyright). I would rather us share the route to facebook. And the Facebook image should be tiny not big (unless we are planning to share the image to facebook. Make another issue for this. It needs more thinking before we start implementing.

This bug was for not deploying server, so closing it now.