[Gmod-ajax] Specify include paths or supplemental CONF files on the URL?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Gmod-ajax] Specify include paths or supplemental CONF files on the URL?

Ben Bimber
Hello,

Earlier I posted a question about dynamically controlling what data is available to the user.  The best option I'm finding is to use the URL to specify which tracks/stores to load.  In addition to tracks/stores, is it possible to use the URL to specify either a supplemental CONF file to load, or use the URL to specify addition paths to look for supplemental config?  Here's why I ask:

Each CONF file could specify the resources we want that user to see.  Creating one is pretty easy, and it could be done programmatically as JSON.  You could think of the supplemental config file as a 'session' or 'dataset', which could be saved for future use or shared.  Accumulating lots of supplemental conf files is much lower cost than actually duplicating source data.  In other words, the user could say 'i want to see this reference, these annotations, and these patient samples'.  This is written into a CONF file that specifies the appropriate paths to load.  On the URL, one could either pass in the relative location to actual supplemental CONF file.  The advantage of this over the documented addStore or addTrack is that a full CONF file can more easily specify any config we might need.

I realize I can specify data=../ on the URL.  If I understand this correctly, I think if I put a CONF file in the data directory it will be merged with the main config.  Assuming the works, this is the best idea I have so far.  It would be slightly more convenient to specify the actual path to the conf file itself (rather than creating a bunch of useless directories), but no the end of the world.  

Thanks for any suggestions.

-Ben






------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Specify include paths or supplemental CONF files on the URL?

Jillian Rowe
Hi Ben,

We have something similar going on here.

What we do is wrap the the JBrowse pages in a web framework. Here we use catalyst, but that may be overkill for your uses. The conf file becomes a variables, which is easy enough to do with any templating system. You could use the template toolkit even with just a perl cgi script, or I'm sure there's other options as well.

The user logs in and is authenticated, and then we query that user against an indepartment database that has a table for users <-> tracks. The trackdata is stored here, and written out to a file upon login. When the session is ended/expired that file is deleted.

You can specify visible tracks with the url, but if you use a web framework that handles session data the browser is pretty good at 'figuring it out' on its own.

I think supporting multiple config files is a nice idea. Then we could have one with the reference data, and one with user specific tracks.

Best,
Jillian


On 07/11/2014 09:13 PM, Ben Bimber wrote:
Hello,

Earlier I posted a question about dynamically controlling what data is available to the user.  The best option I'm finding is to use the URL to specify which tracks/stores to load.  In addition to tracks/stores, is it possible to use the URL to specify either a supplemental CONF file to load, or use the URL to specify addition paths to look for supplemental config?  Here's why I ask:

Each CONF file could specify the resources we want that user to see.  Creating one is pretty easy, and it could be done programmatically as JSON.  You could think of the supplemental config file as a 'session' or 'dataset', which could be saved for future use or shared.  Accumulating lots of supplemental conf files is much lower cost than actually duplicating source data.  In other words, the user could say 'i want to see this reference, these annotations, and these patient samples'.  This is written into a CONF file that specifies the appropriate paths to load.  On the URL, one could either pass in the relative location to actual supplemental CONF file.  The advantage of this over the documented addStore or addTrack is that a full CONF file can more easily specify any config we might need.

I realize I can specify data=../ on the URL.  If I understand this correctly, I think if I put a CONF file in the data directory it will be merged with the main config.  Assuming the works, this is the best idea I have so far.  It would be slightly more convenient to specify the actual path to the conf file itself (rather than creating a bunch of useless directories), but no the end of the world.  

Thanks for any suggestions.

-Ben







------------------------------------------------------------------------------


_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax
Reply | Threaded
Open this post in threaded view
|

Re: Specify include paths or supplemental CONF files on the URL?

Ben Bimber
Hi Jillian,

Yes, something roughly like this is basically what I was thinking.  I understand dynamically creating a CONF file - i was planning something extremely similar with a local DB.  However, could you elaborate a little on how you're using catalyst to specify which CONF jbrowse is going to use?  

Thanks,
Ben


On Sun, Jul 13, 2014 at 1:15 AM, Jillian Rowe <[hidden email]> wrote:
Hi Ben,

We have something similar going on here.

What we do is wrap the the JBrowse pages in a web framework. Here we use catalyst, but that may be overkill for your uses. The conf file becomes a variables, which is easy enough to do with any templating system. You could use the template toolkit even with just a perl cgi script, or I'm sure there's other options as well.

The user logs in and is authenticated, and then we query that user against an indepartment database that has a table for users <-> tracks. The trackdata is stored here, and written out to a file upon login. When the session is ended/expired that file is deleted.

You can specify visible tracks with the url, but if you use a web framework that handles session data the browser is pretty good at 'figuring it out' on its own.

I think supporting multiple config files is a nice idea. Then we could have one with the reference data, and one with user specific tracks.

Best,
Jillian



On 07/11/2014 09:13 PM, Ben Bimber wrote:
Hello,

Earlier I posted a question about dynamically controlling what data is available to the user.  The best option I'm finding is to use the URL to specify which tracks/stores to load.  In addition to tracks/stores, is it possible to use the URL to specify either a supplemental CONF file to load, or use the URL to specify addition paths to look for supplemental config?  Here's why I ask:

Each CONF file could specify the resources we want that user to see.  Creating one is pretty easy, and it could be done programmatically as JSON.  You could think of the supplemental config file as a 'session' or 'dataset', which could be saved for future use or shared.  Accumulating lots of supplemental conf files is much lower cost than actually duplicating source data.  In other words, the user could say 'i want to see this reference, these annotations, and these patient samples'.  This is written into a CONF file that specifies the appropriate paths to load.  On the URL, one could either pass in the relative location to actual supplemental CONF file.  The advantage of this over the documented addStore or addTrack is that a full CONF file can more easily specify any config we might need.

I realize I can specify data=../ on the URL.  If I understand this correctly, I think if I put a CONF file in the data directory it will be merged with the main config.  Assuming the works, this is the best idea I have so far.  It would be slightly more convenient to specify the actual path to the conf file itself (rather than creating a bunch of useless directories), but no the end of the world.  

Thanks for any suggestions.

-Ben







------------------------------------------------------------------------------


_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax


------------------------------------------------------------------------------

_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax



------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck&#174;
Code Sight&#153; - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Gmod-ajax mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gmod-ajax