On Tue, May 09, 2017 at 02:07:30AM -0700, Samuel Lampa wrote:
> It seems to me that query languages (SQL, datalog, LINQ, OCL etc etc) have
> a strong connection to FBP in that query syntax is often transformed into a
> kind of flow-based program behind the scenes.
I agree, I use a lot of SQL at work, and often wish I could specify more
exactly the process components that would implement a query, rather than hoping
the DBMS will do it correctly. I would love to use FBP structures for queries
rather than SQL, or some sort of "declarative FBP" where I could specify the
details or choose to leave them vague.
> 1. How strong is the query lang <-> FBP connection. Are there certain
> characteristics making the flow-based programs generated by query systems
> very different from other FBP systems?
There's a very strong connection in my opinion. A query like this:
select id, name from customer
join order on order.customer_id =
customer.id
where order.total > 1000
Can convert nicely to a FBP network:
order -> [where total > 1000] -> [join customer ...] -> [select id, name]
> 2. Based on my limited understanding, it seems the processes in
> query-generated FBP programs are often more generic (generic join, filter
> processes etc).
> BUT, could it be that more specialized FBP components could also be fit
> into a query language?
I think so. In some cases it's good to leave the details of how the query is
implemented to the query engine. So I think a declarative language which can
implement FBP would be more powerful than normal FBP.
> 3. Could it be that some query language would be the optimal high-level
> language for quickly designing FBP systems?
I think declarative graph programming would be more powerful and expressive
than both FBP or query languages.
> 4. Is there some even more generic language than queries, that one would
> aim for, as the utopian, high level declarative language for computation?
Yes, in theory; I don't think we have a good implementation for such a language
yet though. It should be able to specify everything from math equations
through to FBP processes and networks in a uniform graph language, and it
should support some sort of macro processing to rewrite specified networks to
(nearly) optimal executable networks for the specific problem. It should also
support a fairly concise and textual notation for the language, many people
prefer to use a textual notation, but the langauge should be naturally
graphical.
Sam