You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a suggestion for improving the design of Pengines. It concerns the notion of a pengine *application". As things now stand we pass the name of an application to (say) pengine_rpc/3 as an option, for example:
The advantage will be mostly one of elegance, because now the URL in the first argument of pengine_rpc/3 refers to a Prolog program (or module). This isn't the case in the current design where it serves as the host name of a Pengines server.
The text was updated successfully, but these errors were encountered:
This note mostly concerns the demo platform, but could perhaps serve as an argument for implementing the proposal. If we can find a way to make URLs in the code editor clickable (shouldn't be hard, see e.g. http://jsbin.com/jehopaja/4/edit) we could decide to show a nice overview of the corresponding application module, including (a link to) an editor that those that are authorised can use in order to edit the module. For unauthorised users, this editor will (subject to a setting) be set to read only.
I'd discourage enforced placing of the application name in the URI path segment. There are often other considerations with the path name. For example, sometimes one is serving on 80 sharing a domain with other non prolog services, and apache is fronting, only redirecting a portion of the URI path space (see http:prefix/1 for example). better is to just associate an URI (domain + path) with an application arbitrarily by some setting.
Adopting the pervasive 'abstract location' mechanism might be good.
An URL is indeed different from an URI. An URL is a location, an URI is a name. But that's fine - http://swi-prolog.org/ is both the URL for the SWI-Prolog site and the URI for the home page.
The server should know the application based on the endpoint.
I have a suggestion for improving the design of Pengines. It concerns the notion of a pengine *application". As things now stand we pass the name of an application to (say) pengine_rpc/3 as an option, for example:
?- pengine_rpc('http://pengines.swi-prolog.org', foo(X), [application(bar)]).
I propose that we pass the name of the application in the URL instead. If we did, the above example would be written as:
?- pengine_rpc('http://pengines.swi-prolog.org/bar', foo(X)).
It may seem that we would lose the flexibily of being able to do
?- App=bar, pengine_rpc('http://pengines.swi-prolog.org', foo(X), [application(App)]).
but that can be fixed by instead allowing
?- App=bar, pengine_rpc('http://pengines.swi-prolog.org/'+App, foo(X)).
The advantage will be mostly one of elegance, because now the URL in the first argument of pengine_rpc/3 refers to a Prolog program (or module). This isn't the case in the current design where it serves as the host name of a Pengines server.
The text was updated successfully, but these errors were encountered: