{"action":"created","issue":{"url":"https://api.github.com/repos/comunica/comunica/issues/109","repository_url":"https://api.github.com/repos/comunica/comunica","labels_url":"https://api.github.com/repos/comunica/comunica/issues/109/labels{/name}","comments_url":"https://api.github.com/repos/comunica/comunica/issues/109/comments","events_url":"https://api.github.com/repos/comunica/comunica/issues/109/events","html_url":"https://github.com/comunica/comunica/issues/109","id":304310346,"number":109,"title":"Providing input data to Actors","user":{"login":"joachimvh","id":3447363,"avatar_url":"https://avatars1.githubusercontent.com/u/3447363?v=4","gravatar_id":"","url":"https://api.github.com/users/joachimvh","html_url":"https://github.com/joachimvh","followers_url":"https://api.github.com/users/joachimvh/followers","following_url":"https://api.github.com/users/joachimvh/following{/other_user}","gists_url":"https://api.github.com/users/joachimvh/gists{/gist_id}","starred_url":"https://api.github.com/users/joachimvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachimvh/subscriptions","organizations_url":"https://api.github.com/users/joachimvh/orgs","repos_url":"https://api.github.com/users/joachimvh/repos","events_url":"https://api.github.com/users/joachimvh/events{/privacy}","received_events_url":"https://api.github.com/users/joachimvh/received_events","type":"User","site_admin":false},"labels":[{"id":725383213,"url":"https://api.github.com/repos/comunica/comunica/labels/feature","name":"feature","color":"0052cc","default":false}],"state":"open","locked":false,"assignee":{"login":"rubensworks","id":440384,"avatar_url":"https://avatars1.githubusercontent.com/u/440384?v=4","gravatar_id":"","url":"https://api.github.com/users/rubensworks","html_url":"https://github.com/rubensworks","followers_url":"https://api.github.com/users/rubensworks/followers","following_url":"https://api.github.com/users/rubensworks/following{/other_user}","gists_url":"https://api.github.com/users/rubensworks/gists{/gist_id}","starred_url":"https://api.github.com/users/rubensworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubensworks/subscriptions","organizations_url":"https://api.github.com/users/rubensworks/orgs","repos_url":"https://api.github.com/users/rubensworks/repos","events_url":"https://api.github.com/users/rubensworks/events{/privacy}","received_events_url":"https://api.github.com/users/rubensworks/received_events","type":"User","site_admin":false},"assignees":[{"login":"rubensworks","id":440384,"avatar_url":"https://avatars1.githubusercontent.com/u/440384?v=4","gravatar_id":"","url":"https://api.github.com/users/rubensworks","html_url":"https://github.com/rubensworks","followers_url":"https://api.github.com/users/rubensworks/followers","following_url":"https://api.github.com/users/rubensworks/following{/other_user}","gists_url":"https://api.github.com/users/rubensworks/gists{/gist_id}","starred_url":"https://api.github.com/users/rubensworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubensworks/subscriptions","organizations_url":"https://api.github.com/users/rubensworks/orgs","repos_url":"https://api.github.com/users/rubensworks/repos","events_url":"https://api.github.com/users/rubensworks/events{/privacy}","received_events_url":"https://api.github.com/users/rubensworks/received_events","type":"User","site_admin":false},{"login":"RubenVerborgh","id":675313,"avatar_url":"https://avatars1.githubusercontent.com/u/675313?v=4","gravatar_id":"","url":"https://api.github.com/users/RubenVerborgh","html_url":"https://github.com/RubenVerborgh","followers_url":"https://api.github.com/users/RubenVerborgh/followers","following_url":"https://api.github.com/users/RubenVerborgh/following{/other_user}","gists_url":"https://api.github.com/users/RubenVerborgh/gists{/gist_id}","starred_url":"https://api.github.com/users/RubenVerborgh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RubenVerborgh/subscriptions","organizations_url":"https://api.github.com/users/RubenVerborgh/orgs","repos_url":"https://api.github.com/users/RubenVerborgh/repos","events_url":"https://api.github.com/users/RubenVerborgh/events{/privacy}","received_events_url":"https://api.github.com/users/RubenVerborgh/received_events","type":"User","site_admin":false},{"login":"mielvds","id":1032980,"avatar_url":"https://avatars1.githubusercontent.com/u/1032980?v=4","gravatar_id":"","url":"https://api.github.com/users/mielvds","html_url":"https://github.com/mielvds","followers_url":"https://api.github.com/users/mielvds/followers","following_url":"https://api.github.com/users/mielvds/following{/other_user}","gists_url":"https://api.github.com/users/mielvds/gists{/gist_id}","starred_url":"https://api.github.com/users/mielvds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mielvds/subscriptions","organizations_url":"https://api.github.com/users/mielvds/orgs","repos_url":"https://api.github.com/users/mielvds/repos","events_url":"https://api.github.com/users/mielvds/events{/privacy}","received_events_url":"https://api.github.com/users/mielvds/received_events","type":"User","site_admin":false},{"login":"joachimvh","id":3447363,"avatar_url":"https://avatars1.githubusercontent.com/u/3447363?v=4","gravatar_id":"","url":"https://api.github.com/users/joachimvh","html_url":"https://github.com/joachimvh","followers_url":"https://api.github.com/users/joachimvh/followers","following_url":"https://api.github.com/users/joachimvh/following{/other_user}","gists_url":"https://api.github.com/users/joachimvh/gists{/gist_id}","starred_url":"https://api.github.com/users/joachimvh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joachimvh/subscriptions","organizations_url":"https://api.github.com/users/joachimvh/orgs","repos_url":"https://api.github.com/users/joachimvh/repos","events_url":"https://api.github.com/users/joachimvh/events{/privacy}","received_events_url":"https://api.github.com/users/joachimvh/received_events","type":"User","site_admin":false}],"milestone":null,"comments":12,"created_at":"2018-03-12T10:14:15Z","updated_at":"2018-03-14T23:50:07Z","closed_at":null,"author_association":"COLLABORATOR","body":"Some context: Miel wants to make a Memento actor. All HTTP calls that get executed should be sent to that actor, who then forwards the request to an actual HTTP actor after doing some changes to the request. This itself is actually quite easy in Comunica: there just needs to be a Bus with this Memento actor in between actors that request an HTTP query and those that resolve one.\r\n\r\nThe problem is that this Memento actor needs some metadata (a date) that is provided at the entry level (e.g., through the command line input). The question now is how to best make sure that date arrives at the Memento actor, preferably in such a way that it arrives together with the actual HTTP requests to make sure the date isn't actually used for requests that should not need this.\r\n\r\nSome random ideas:\r\n\r\n1. The one that was discussed the most. Create a general (read-only) \"context\" object that gets passed to all actors in the call chain. The init actor that parses the command line arguments would then fill in this object. This would require a change to the input interface of the actors to also take the context as input (which is easy) and a change to how all actors currently call their mediator to make sure they pass the context object down the chain (which would be more work). A potential problem is that somehow the init actor needs to use the same keys when writing the context object as the memento actor will use to read out the metadata, so these need to be synced somehow.\r\n\r\n2. (The other ideas are things that were less discussed and maybe just mentioned). Have some sort of shared memory that all actors can access. In this case the context object would be stored there instead of being passed to all the actors. One problem here is that the metadata doesn't arrive at the same time as the query. It might also decrease the independency of all actors?\r\n\r\n3. Have some sort of Bus where this context gets sent on separately. That way all actors that are interested can subscribe to this Bus. This also has the disadvantage of not having the metadata arrive at the same time as the query.\r\n\r\n4. ... (I'm sure there are still many potential solutions. Like overloading the run function of the HTTP actors and other weird stuff)."},"comment":{"url":"https://api.github.com/repos/comunica/comunica/issues/comments/373212842","html_url":"https://github.com/comunica/comunica/issues/109#issuecomment-373212842","issue_url":"https://api.github.com/repos/comunica/comunica/issues/109","id":373212842,"user":{"login":"rubensworks","id":440384,"avatar_url":"https://avatars1.githubusercontent.com/u/440384?v=4","gravatar_id":"","url":"https://api.github.com/users/rubensworks","html_url":"https://github.com/rubensworks","followers_url":"https://api.github.com/users/rubensworks/followers","following_url":"https://api.github.com/users/rubensworks/following{/other_user}","gists_url":"https://api.github.com/users/rubensworks/gists{/gist_id}","starred_url":"https://api.github.com/users/rubensworks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubensworks/subscriptions","organizations_url":"https://api.github.com/users/rubensworks/orgs","repos_url":"https://api.github.com/users/rubensworks/repos","events_url":"https://api.github.com/users/rubensworks/events{/privacy}","received_events_url":"https://api.github.com/users/rubensworks/received_events","type":"User","site_admin":false},"created_at":"2018-03-14T23:50:07Z","updated_at":"2018-03-14T23:50:07Z","author_association":"OWNER","body":">  Is this now to solve the problem of getting the input context to the Memento actor, or to do the restraint thingy Ruben V mentioned?\r\n\r\nBoth :-) The Memento use case could be solved using constraints as I see it. But not sufficient for all cases (such as logging), for which a context would still be required. These constraints would be defined by the engine caller (as the root call will also be a constrainable context).\r\n\r\nFor the Memento use case, this could look like this:\r\n```javascript\r\nactorInitSparql.run(new ConstrainableAction({ query: 'SELECT ...' }, [ { type: 'memento:datetime', value: '...' } ]));\r\n```\r\n\r\nThe Memento actor would then be subscribed to the HTTP bus, where it accepts action with the `memento:datetime` constraint, and transform it to an action on the bus where this datetime has been transformed to an additional HTTP header."}}
{"actor":{"display_login":"rubensworks"}}