Skip to content

Instantly share code, notes, and snippets.

@millisami
Forked from bikashp/gist:580384
Created September 28, 2010 11:01
Show Gist options
  • Save millisami/600809 to your computer and use it in GitHub Desktop.
Save millisami/600809 to your computer and use it in GitHub Desktop.
## Run document
{
"title": "Find info for these 50 companies",
"line_id": 23453453,
"order": {"amount": 23454, "service_charge": 2342},
}
## Initial Unit document
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"result": {},
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"input_data": [{"blog_name": "Bikas Blog"}],
"task_id": "2342h23423"
}
]
}
# 2nd iteration, Unit document transformed after geting the result back from Mturk worker
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"result": {},
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"input_data": [{"blog_name": "Bikas Blog"}],
"task_id": "234s324sdff"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"results": [{"worker_id": "234dsfsdf3424", "url": "http://bikashblog.com"}],
"task_id": "234s3s4sdfg"
}
]
}
# 3rd iteration
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"result": {},
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"input_data": [{"blog_name": "Bikas Blog"}],
"task_id": "234s324sdff"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"input_data": [{"worker_id": "234dsfsdf3424", "url": "http://bikashblog.com"}],
"task_id": "234s3s4sdfg"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 123,
"input_data": [{"worker_id": "234dsfsdf3424", "bgcolor": "#eeffee"}],
"task_id": "4h3g4jj33"
}
]
}
# 4th iteration
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"result": {"rgba": "244,233,199"},
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"input_data": [{"blog_name": "Bikas Blog"}],
"task_id": "234s324sdff"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"input_data": [{"worker_id": "234dsfsdf3424", "url": "http://bikashblog.com"}],
"task_id": "234s3s4sdfg"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 123,
"input_data": [{"worker_id": "234dsfsdf3424", "bgcolor": "#eeffee"}],
"task_id": "4h3g4jj33"
}
]
}
{
"title": "Find info for these 50 companies",
"line_id": 23453453,
"order": {"amount": 23454, "service_charge": 2342},
"stations": [
{ "station_id": 312,
"units": [
{"results": [{"task_id": "234s324sdff", "ceo": "56Steve Jobs", "email": "info@apple.com"}]},
{"results": [{"task_id": "sdfwewer324324", "ceo": "56Steve Balmer", "email": "info@microsoft.com"}]},
{"results": [{"task_id": "sdf234324", "ceo": "5Larry Page", "email": "info@google.com"}]}
]
},
{ "station_id": 1234,
"units": [
{"results": [{"task_id": "sdfwe234", "ceo": "45Steve Jobs", "email": "info@apple.com"}]},
{"results": [{"task_id": "234sdfsfd", "ceo": "45Steve Balmer", "email": "info@microsoft.com"}]},
{"results": [{"task_id": "sdfsdfsdfwerwer234", "ceo": "45Larry Page", "email": "info@google.com"}]}
]
},
{ "station_id": 123,
"units": [
{"results": [{"task_id": "23423432dsfdsf", "ceo": "12Steve Jobs", "email": "info@apple.com"}]},
{"results": [{"task_id": "234234sdfsdf", "ceo": "12Steve Balmer", "email": "info@microsoft.com"}]},
{"results": [{"task_id": "2342dsafdsf", "ceo": "12Larry Page", "email": "info@google.com"}]}
]
},
{ "station_id": 234,
"units": [
{"results": [{"task_id": "wer234fsadfw324", "ceo": "23Steve Jobs", "email": "info@apple.com"}]},
{"results": [{"task_id": "sdf324234ffff", "ceo": "23Steve Balmer", "email": "info@microsoft.com"}]},
{"results": [{"task_id": "sdfsdf34234342", "ceo": "23Larry Page", "email": "info@google.com"}]}
]
}
]
}
## Run document
{
"title": "Find info for these 50 companies",
"line_id": 23453453,
"order": {"amount": 23454, "service_charge": 2342},
}
## Unit document
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"task_id": "234s324sdff",
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"results": [{"company": "Apple", "website": "http://www.apple.com"}]
}
]
}
## Unit document transformed after geting the result back from Mturk worker
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"station_instances":[
{
"_id": "23451sdkfj23fdsdfff",
"station_id": 121,
"results": [{"company": "Apple", "website": "http://www.apple.com"}],
"task_id": "234s324sdff"
},
{
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"results": [{"worker_id": "234dsfsdf3424", "CEO": "Steve Jobs", "twitter": "apple"}],
"task_id": "234s3s4sdfg"
}
]
}
## Unit document transformed after geting the result back from Mturk worker
{
"_id": "dsk93kddjfj39o3",
"run_id": 234,
"values":[
{ # Production Run Input
"_id": "23451sdkfj23fdsdfff",
"station_id": nil,
"results": [{"company": "Apple", "website": "http://www.apple.com"}]
},
{ # Station 1 Results
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"results": [{"task_id": "234s3s4sdfg", "worker_id": "234dsfsdf3424", "CEO": "Stephanie Jobs", "twitter": "Apple Systems"}]
},
{ # Station 2 Results
"_id": "3i0ekfoepeprrr",
"station_id": 122,
"results": [{"task_id": "2324fsdf43", "worker_id": "435g43345fg", "CEO": "Steve Jobs", "twitter": "Apple"}]
}
]
}
{
"title": "Find info for these 50 companies",
"line_id": 23453453,
"order": {"amount": 23454, "service_charge": 2342},
"units": [
{
"station_instances":[
{
"station_id": 121,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
},
{
"station_id": 122,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
},
{
"station_id": 123,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
}
]
},
"station_instances":[
{
"station_id": 121,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
},
{
"station_id": 122,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
},
{
"station_id": 123,
"data": [{"task_id": "234s324sdff","worker_id": "234dsfsdf3424", "company": "Apple", "website": "http://www.apple.com"}]
}
]
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment