TechnionYP5777 / Bugquery

Bug query
9 stars 1 forks source link

Use HTTP POST for Stack Trace Submission #30

Closed yosefraisman closed 7 years ago

yosefraisman commented 7 years ago

Replace our simple HTTP GET request interface with more complex HTTP POST requests. A POST request isn't (theoretically) limited in size, and thus is more suitable for submitting long-form stack traces which could potentially exceed some size limits of the HTTP GET request.

Current Idea for Implementation

  1. Log every POST request (using hashing) in a list of current submissions.
  2. Reply to each POST request with that hash (index).
  3. Create a matching page in our site with the results.

Progress (this is a big one)

yossigil commented 7 years ago

:+1:

Amit-Oha commented 7 years ago

reading about jersey and MVC to make the website's design (code-wise) more elegant and robust before continuing

yossigil commented 7 years ago

Talk to @leyaniv. He was leading a major effort towards MVC in his group.

Amit-Oha commented 7 years ago

@yossigil I am familiar with the concept of MVC (thanks to 236700), I just never done it on a web application, certainly not a Java web application, and from what I can tell they do not deal with this problem.

Maybe you or @AdiOmari could help me with a related question I have - the reason I chose jersey is because I saw it earlier this semester on another course, but not in this context. Maybe I should go with another framework, like Spring or Play? Or stick with plain JSP? I would appreciate your opinion

AdiOmari commented 7 years ago

@AmitOhayon I think jersey seems to be good for our needs. I didn't use it before (I use angularjs and -yossi ignore this- asp.net), but from reading it seems like a good fit.

Amit-Oha commented 7 years ago

having trouble with jersey, trying to study it on a simpler example before messing with our existing code

yossigil commented 7 years ago

:+1: @AmitOhayon

Amit-Oha commented 7 years ago

Having some progress but learning by trial and error is very difficult and time consuming. Maybe we should open a new issue for MVC and progress in these two areas separately, because right now it is blocking the POST method progression. What do you think @yosefraisman @AdiOmari ?

yosefraisman commented 7 years ago

This issue will be fixed by the re-implementation of the website. Closing.

Amit-Oha commented 7 years ago

Website is ready, need to link the Plugin @yosefraisman I used Id for searches instead of hashes, and you get the link to the search in the response to the POST method - this is the link you should use.

yosefraisman commented 7 years ago

Successfully implemented the POST request interface in the plugin, disregarding my previous implementation with Apache HttpComponents because of Maven issues. ~Now on to figure out why = gets printed at the end of every trace (and how to get rid of it).~ It's padding (caused by byte[] encoding), going to remove == and = if they show up in the String's ending.

Amit-Oha commented 7 years ago

Adjusted the website's submit form and now everything works, though because HTML form has to send a key-value formatted POST, there is a slightly different handling for traces sent from plugin and traces sent from website. @yosefraisman and I will decide on a uniform implementation to prevent this.

yossigil commented 7 years ago

:+1: