Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ease-dev] Introduction

Hi Christian,

Regarding fetching the scripts, when user initially sets a remote location (say GitHub), its domain is identified from the address and the scripts are fetched to the local machine. I have created a class for fetching those scripts from GitHub repositories. As of now it requires one API call for each scripts it fetches but it can be reduced to one API request to fetch all scripts from a given repository on GitHub. The number of API requests do matter here as GitHub provides a maximum of 5000 requests per hour for an authenticated user and 60 for an unauthenticated user for requests regarding content. So if the corresponding address is identified, it makes sense to fetch Git credentials stored in Eclipse and if not, ask the user for the credentials.

So, instead of extending http parser as pointed out here, wouldn't it be better to use a separate class that parses the location using web API as HttpParser would recursively look for anchors to fetch download urls for raw files and GitHub provides a JSON response of the recursive tree (containing urls for all the files and directories in the repository) for a particular repository in one request ? Can we consider this as a legit approach ?

In case of gerrit and svn, a different approach might be required.

Thanks again for helping
Utsav Oza

On Wed, Mar 8, 2017 at 12:33 PM, <Christian.Pontesegger@xxxxxxxxxxxx> wrote:

Hi,

 

we periodically scan script locations and look for changes in the script content. There we do not parse the code itself, but the keyword section only. This is needed when scripts are used to augment the UI or get triggered on certain actions taken by the user.

When the script gets executed we always fetch a fresh copy from its storage location, we do not execute cached data. Caching entire scripts might be another topic. You may make it part of your proposal, however it is not necessary. Instead you should find some way to figure out if it is worth fetching a script again to parse its keywords. Locally we use timestamps to recognize if files have changed. Remotely you might use svn versions, commit hashes or similar means.

 

Christian

 

 

From: ease-dev-bounces@xxxxxxxxxxx [mailto:ease-dev-bounces@eclipse.org] On Behalf Of Utsav Oza
Sent: Tuesday, March 07, 2017 4:12 PM
To: ease developer discussions
Subject: Re: [ease-dev] Introduction

 

Hi Christian,

For the scripts stored in workspace and file system locations, the changes made in the scripts are reflected immediately in those scripts, but if we are adding a remote location, after fetching those scripts locally, how will the changes made to those local scripts get reflected on the remote scripts ?

 

Thanks for helping

 


_______________________________________________
ease-dev mailing list
ease-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ease-dev


Back to the top