| Summary: | Create servlets for uploading data to mylar.eclipse.org | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | meghan <meghan_allen> | ||||||||||||
| Component: | Mylyn | Assignee: | meghan <meghan_allen> | ||||||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||||||
| Severity: | enhancement | ||||||||||||||
| Priority: | P3 | CC: | mik.kersten, nhapke, robert.elves, steffen.pingel | ||||||||||||
| Version: | unspecified | ||||||||||||||
| Target Milestone: | --- | ||||||||||||||
| Hardware: | PC | ||||||||||||||
| OS: | Windows XP | ||||||||||||||
| Whiteboard: | |||||||||||||||
| Bug Depends on: | |||||||||||||||
| Bug Blocks: | 178604 | ||||||||||||||
| Attachments: |
|
||||||||||||||
|
Description
meghan
Mik, what would be the best way to submit this package? I have it in /isd/se2/project/mylar/cvs, called org.eclipse.mylar.monitor.usage.upload right now. Should I just create a .zip of the whole package and attach that? Or, should I move it into the org.eclipse.mylar.monitor.usage package and just create a patch? I'm not too sure where it's going to end up, which is why I'm not sure what to do with it right now. I'm attaching a zip of this... Please let me know if I need to move it around before it can be committed. The zip includes the external libraries (apache commons-io and apache fileupload). I thought it was best to include them for completeness, but I guess they should be removed before it's committed? Created attachment 57158 [details]
zip of this package
I figure that these should go into either 1) a sandbox/org.eclipse.mylar.monitor.server project that I can create, or into 2) a servlets folder under org.eclipse.mylar.monitor.usage. That servlets folder can be a source folder, but we wouldn't distribute it. How many files is this in total? Once we figure out what to do, I'll get you to make a patch. But could you first check if commons-io and apache fileupload are Orbit projects? If they're not, then we need to go with option (1), since the Sandbox can have external dependencies. +1 for mylar.server project. It should be easy to build a war file from those... They are not in Orbit. So, I guess we'll go with option 1. Let me know when the project is ready and then I'll create a patch. There are 2 .java files so far in WEB-INF/src, but I have a 3rd I'd like to add which will show a brief summary of the data that has been uploaded and we need to include the WEB-INF/web.xml file too. *** Bug 114124 has been marked as a duplicate of this bug. *** Meghan: I have created the sandbox/org.eclipse.mylar.monitor.server project, and you should now create patches for that. As for the Apache libraries: * Add the libraries to the "lib" folder. * Create a .cvsignore file in that folder, and add the name of each library so that it is not checked in * Add a link to each library into lib/readme.txt, so that it's easy for others to download thanks Mik, I'll make a patch tomorrow. just trying to move the stuff from the old project to this new project, and I'm wondering if the new project needed to be created as a Tomcat project? The structure in the current project is: WEB-INF/src/upload/*.java, WEB-INF/web.xml, and WEB-INF/lib/*.jar but the new project is just a normal java project (I think) and it won't let me mimic the structure of the other project. Feel free to make it whatever kind of project you like. You should be able to do that by having the files be in the spots that the Tomcat support expects (is it WTP you're using?), and also copying the appropriate nature and builders into the .project file in that project. Might be easiest to just copy over the entire .project (and maybe also .classpath) file, and then just change the project name to be the right one (should be first entry in .project file). Created attachment 58678 [details]
patch with servlets
This patch contains the necessary chages to the project and 3 servlets, 1 to get a user id, 1 to upload data and 1 to show the (very simple) usage analysis.
Created attachment 58679 [details]
mylar/context/zip
The (very simple) Usage Analysis servlet just reads a text file and displays it. There is a java class that reads the uploaded data and populates this text file - I will set that up as a cron job to run daily. The output looks like this (on sample data): Total events: 153671 Number of unique users: 8 10 most used views: 14.12%: org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart (21712) 12.70%: org.eclipse.jdt.ui.PackageExplorer (19528) 12.27%: org.eclipse.jdt.ui.CompilationUnitEditor (18857) 10.96%: org.eclipse.jst.jsp.core.jspsource.source (16845) 6.78%: org.eclipse.mylar.java.ui.editor.MylarCompilationUnitEditor (10419) 4.04%: org.eclipse.ui.DefaultTextEditor (6218) 4.03%: org.eclipse.wst.html.core.htmlsource.source (6202) 3.93%: org.eclipse.pde.ui.manifestEditor (6041) 3.58%: org.eclipse.team.sync.views.SynchronizeView (5515) 3.53%: com.something.eclipse.shelled.ui.editors.SHEditor (5437) This could obviously be easily added to... When it's working can you point me at the URL to try it out? Created attachment 61568 [details]
updated patch for servlets
The project used to be building the .class files to /bin, but this became a problem when I tried to deploy it becuase Tomcat expects the .class files to be in /WEB-INF/classes/packageName - this patch fixes the error.
Patch applied. I got the commons-fileupaload-1.2 instead of 1.1.1. The only problem I saw is that we still need the javax servlet stuff, and you seem to be getting the dependencies from your C: Severity and Description Path Resource Location Creation Time Id Project 'org.eclipse.mylar.monitor.server' is missing required library: 'C:\Temp\tomcat\apache-tomcat-6.0.2\lib\servlet-api.jar' org.eclipse.mylar.monitor.server Build path 1174585662384 766198 What's the right place to get this from? Please update the readme.txt when you get that too. Note that I've added the libraries to a .cvsignore file in the WEB-INF/lib directory. Created attachment 61754 [details]
adds the javax servlet library
I updated the readme.txt, but I'm not sure if I've got the .cvsignore file working correctly. I created one (and thought it was included in the last patch), but I guess it wasn't - sorry about that. Let me know if this change fixes the problem with the javax.servlet stuff. Patch applied. Anything left on this bug? no, I don't think so I think this one can be closed. Great, closing. Hmm. It seems like stats pages as well as upload pages are down... Argh, the server keeps crashing. Steffen, Rob, any ideas? This feature is now live so we need to figure out a way to ensure that the server stays running. Putting the JIRA repository on a separate server would be a good start (assuming that the monitor servlet does not have a terrible memory leak): bug 178392. The monitor servlet could easily use up a large amount of memory because the analysis puts each interaction event in memory. The servlet needs to make sure that there are no references to the events (e.g. in maps) after each run. Meghan: could you create a new bug to look into this? |