Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign up[feedback wanted] api for pipe/parallel/serial mode #7
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
jacquestardie
Aug 21, 2014
Given what gasket is intended to do, I think the first option seems best.
jacquestardie
commented
Aug 21, 2014
|
Given what gasket is intended to do, I think the first option seems best. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
maxogden
Dec 29, 2014
Member
I think the goal of gasket should be to be as explicit and low level as possible... (im channeling my inner @mafintosh here)
Reading the three options above I kind of dont like any of them now. i'd prefer something like this:
{
"gasket": {
"main": [
{
"command": "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml",
"type": "serial"
},
{
"command": "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml",
"type": "serial"
}
]
}
}
}e.g. where everything is explicit. that way the gasket.json becomes lower level, and we can worry about user-friendliness in areas like this
we would have to define all of the different types, e.g. https://github.com/datproject/datscript/blob/master/example-bionode.ds#L7-L11
|
I think the goal of gasket should be to be as explicit and low level as possible... (im channeling my inner @mafintosh here) Reading the three options above I kind of dont like any of them now. i'd prefer something like this: {
"gasket": {
"main": [
{
"command": "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml",
"type": "serial"
},
{
"command": "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml",
"type": "serial"
}
]
}
}
}e.g. where everything is explicit. that way the we would have to define all of the different types, e.g. https://github.com/datproject/datscript/blob/master/example-bionode.ds#L7-L11 |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
melaniecebula
Dec 29, 2014
Contributor
I actually really prefer this to the previously mentioned approaches.
So would the different types correspond to run, then, pipe, fork? For example, if a user uses "then", the type would be "serial"? If a user uses "run", the type would be "parallel"?
|
I actually really prefer this to the previously mentioned approaches. So would the different types correspond to run, then, pipe, fork? For example, if a user uses "then", the type would be "serial"? If a user uses "run", the type would be "parallel"? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
mafintosh
Dec 30, 2014
Member
@maxogden i like this. so all gasket commands are just simple non nested arrays right (no commands in commands)? and in case you need to nest them you would split them into separate gasket pipelines?
|
@maxogden i like this. so all gasket commands are just simple non nested arrays right (no commands in commands)? and in case you need to nest them you would split them into separate gasket pipelines? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
karissa
commented
Dec 30, 2014
|
is it more common for people to run parallel or serial jobs? |
referenced
this issue
in melaniecebula/gasket
Dec 31, 2014
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
gtramontina
Dec 31, 2014
Would it be too weird if we inspected the commands looking for '|' or '&&' at the end to decide whether it pipes or serializes?
gtramontina
commented
Dec 31, 2014
|
Would it be too weird if we inspected the commands looking for '|' or '&&' at the end to decide whether it pipes or serializes? |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
karissa
Jan 1, 2015
hey @gtramontina ! that could work fine. we aren't exactly sure who is going to use gasket yet. we are trying to build it as an easier abstraction than bash, and so leaving those characters out was the first idea. one complication I see is that | or && could mean "or"/"and" respectively depending on the user's background
karissa
commented
Jan 1, 2015
|
hey @gtramontina ! that could work fine. we aren't exactly sure who is going to use gasket yet. we are trying to build it as an easier abstraction than bash, and so leaving those characters out was the first idea. one complication I see is that | or && could mean "or"/"and" respectively depending on the user's background |
maxogden commentedAug 6, 2014
consider this use case:
https://gist.github.com/maxogden/80de2ba6a6f52ff382e3
the
nulls are currently the only way to tell gasket to run the pipeline one at a time (serially). if thenulls are removed then all of thegasket run import --lines would be spawned at once, which technically works but causes my computer to almost dieso what would be a better api for disabling the auto pipe mode?
ideas:
1: make the
mainpipeline an object instead of an array and add an option to change behavior, e.g.:{ "gasket": { "main": { "commands": [ "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml", "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-2.xml" ], "serial": true } } }instead of
"serial": trueit could be"parallel": falseor"pipe": false2: make
"pipe": falseby default. then you could just do this:{ "gasket": { "main": [ "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml", "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-2.xml" ] } }and they would spawned/run one at a time and not get piped to each other. to get them to pipe together you would have to use the syntax from option 1
3: have 2 top level default keys for 'parallel' and 'serial' commands
{ "gasket": { "pipes": [ "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml", "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-2.xml" ], "serial": [ "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-1.xml", "gasket run import -- http://www.fcc.gov/files/ecfs/14-28/14-28-RAW-Solr-2.xml" ] } }e.g. in the above doing
gasket run pipewould act differently fromgasket run serial(this one might be too magic). also i don't like the namesserialandpipesthat muchthoughts?