Rostlab / JS16_ProjectF

In this project we will build a web portal for our GoT data analysis and visualization system. The website will integrate all the apps created in projects B-D with the help of the integration team assigned to Project E.
GNU General Public License v3.0
10 stars 8 forks source link

What does people say now on detail page #355

Open yashha opened 8 years ago

gyachdav commented 8 years ago

I can only give an opinion if I see it. Please mergeeeeee to staging.

yashha commented 8 years ago

Its only an issue, needs to be implemented :)

yashha commented 8 years ago

timepicker ;) http://www.material-ui.com/#/components/time-picker

yashha commented 8 years ago

I think I stop here with this issue :) There is a problem with the gotdailysentiment.runTwitterStreaming I think.

we have

d5.get('/runListen', function (req,res) {
  if (!req.query.name || !req.query.duration) {
    res.status(400).send('Please proviede name and duration');
  }
  gotdailysentiment.runTwitterStreaming(req.query.name,req.query.duration, function(result,err) {
    if (err) {
      res.sendStatus(404);
    } else {
      res.json(result);
    }
  })
});

But this is not working https://beta.got.show/d5/runListen/?name=Jon%20Snow&duration=1000

We push it to post release :)

jcebel commented 8 years ago

This is really odd. I thought we resolved that problem. @kajo404 can you take a look please.

yashha commented 8 years ago

Maybe its something on my part, but I don't wanna mess with it at the moment :)

gyachdav commented 8 years ago

yup maybe we can have it ready for S06E01. Only if @kajo404 and team would make sure that all kinks are out and this is safe to run.

jcebel commented 8 years ago

Please keep in mind that the duration is implemented in seconds. Maybe that can be a problem @yashha EDIT: This one returns something: https://beta.got.show/d5/runListen/?name=Jon%20Snow&duration=1

yashha commented 8 years ago

Maybe its because it is blocked after called one time? https://beta.got.show/d5/runListen/?name=Jon%20Snow&duration=10 The first time it took 10 sec and it come "Not found" back and the next times it took 1 sec to load not found. After some attempts I get 502 Bad Gateway

jcebel commented 8 years ago

Not found means, nobody is tweeting at the moment (I think for 10 sec it sounds reasonable). You may try it with any word you can think of (e.g. Donald Trump.. as the app is not checking if you're looking for GoT-Character in this function.) The reason that it stopped can be that it got blocked, but the twitter-blocking is certainly not my expertise. I'm trying to get a reaction from D5.. but I do not think this will happen this evening anymore

EDIT: For me it is still working fine

kajo404 commented 8 years ago

Hey guys I am sorry I was gone for the night, I will look into it tomorrow morning! One thing to keep in mind is to only use the twitter access token from one machine and one application at the same time. If used from multiple applications twitter will block the key for a certain time frame. I tried to catch that error aswell if i recall correctly but I am not sure if it works. But as I said, I will take a closer look tomorrow. Please update here if you find anything new

yashha commented 8 years ago

So it's not usable for the functionality we want to implement. We wanted users to be able to listen to twitter for a certain amount of time.

gyachdav commented 8 years ago

should be usable if the request originates from the same node instance and the client just reports the results.

I really see this as a cool feature that would be very useful on the site esp during episode air time. GoT def has a similar appeal as a sporting event and everything that happens live could generate excitement.

At any rate let's defer to post-release and only if there is willingness from the team to go ahead and implement a robust and secure feature.

kajo404 commented 8 years ago

should be usable if the request originates from the same node instance and the client just reports the results.

This is correct. If you can describe what exactly you are trying to do I can look in to it and see if I can come up with a solution before the airing of the first episode

sacdallago commented 8 years ago

For me, every time I tried so far it worked :) Really cool! I only have one concern: Security! If everyone can just call up that route and set a timeout and "spawn" jobs on the server which can potentially last an infinite number of seconds... :( You can hardcode something like "Get what people say about XYZ in the next 30 seconds" on the characters page, and have a "hardcoded" call to the backend of the website where this thing is running, but exposing it like this :boom:

Edit: basically, you can get a sentiment analysis for free on every "character", which is actually just a search term. We should get money if we really do it like this, I mean, just think about the stuff that people could do:

sacdallago commented 8 years ago

So how do we stand on this? If it's not gonna be in the page, exposing those routes is very dangerous and useless.

gyachdav commented 8 years ago

Unfortunately we would have to remove the pie chart from here. Sorry @yashha :worried:

sacdallago commented 8 years ago

@gyachdav #426