[OKC JUG] Functional Programming and Apache TinkerPop

Brent Shambaugh brent.shambaugh at gmail.com
Sat Mar 31 22:12:50 PDT 2018


It seems I am getting a wee bit ambitious with this project as I am facing
some difficulty pulling in Gremlin with SQL to pull into Java.

I am wondering how postgresql is pulled into my Java project. Is it
something that I reference separately, or is it something that is pulled in
through maven. If it is pulled in through maven, how do I configure it?

There is also a thing called commons.configuration that exposes the
configuration object for postgres for the program to use.

http://commons.apache.org/proper/commons-configuration/userguide/quick_start.html

I asked around and I could do something like:

BaseConfiguration conf = new BaseConfiguration();
conf.setProperty("jdbc.url", "jdbc:postgresql://localhost:5432/yourdb");
Graph g = http://SqlgGraph.open (conf);

but this only remotely seems to work if I do something like:

Configurations configs = new Configurations();

        try
        {
            PropertiesConfiguration config = configs.properties(new
File("config.properties"));
          //  System.out.println(config.getProperty("jdbc.url"));

        } catch(ConfigurationException cex) {

        }

I will try to get some code up for review. In the meantime I have gremlin
working in Java, but it operates on a loaded file in a graph format, and
not a SQL database. I think SQL would be of more interest here, because I
would hazard to guess most people wouldn't load a turtle file.

Then this meets my goal of achieving a functional way of writing a SQL
query within Java.  Ultimately, I am hoping for this too:
http://sql2gremlin.com/ .

-Brent Shambaugh

GitHub: https://github.com/bshambaugh
Website: http://bshambaugh.org/
LinkedIN: https://www.linkedin.com/in/brent-shambaugh-9b91259
Skype: brent.shambaugh
Twitter: https://twitter.com/Brent_Shambaugh
WebID: http://bshambaugh.org/foaf.rdf#me

On Fri, Mar 30, 2018 at 3:46 PM, Brent Shambaugh <brent.shambaugh at gmail.com>
wrote:

> Jason, here you go:
>
> Topic: Gremlin - Using Graph Database Thinking to Make Database Queries
> Functional
>
> How to use Gremlin, and how to write a Gremlin query within a Java program.
>
> About the Speaker:
>
> Brent grew up in Oklahoma and recently completed a stint in Vienna where
> he encountered the Gremlin.
>
>
>
> Please let me know if you require any additional information.
>
>
> -Brent Shambaugh
>
> GitHub: https://github.com/bshambaugh
> Website: http://bshambaugh.org/
> LinkedIN: https://www.linkedin.com/in/brent-shambaugh-9b91259
> Skype: brent.shambaugh
> Twitter: https://twitter.com/Brent_Shambaugh
> WebID: http://bshambaugh.org/foaf.rdf#me
>
> On Thu, Mar 29, 2018 at 3:10 PM, Jason Lee <jason at steeplesoft.com> wrote:
>
>> Hi, Brent. Would you happen to have an abstract ready? I'd like to get
>> everything scheduled and published pretty soon.
>>
>> Thanks!
>>
>> On 3/20/2018 3:01 PM, Brent Shambaugh wrote:
>>
>> Yes.  It was the goal at the place that I worked to explore the use of
>> Gremlin for graph pattern traversal. Gremlin seeks to do things in a highly
>> functional way, and I found it also has a means to for programmers to write
>> queries in their own native language without having to embed the query
>> syntax in their code (SQL for example).
>>
>> In order to prepare to understand Gremlin, I am finding that I need to
>> understand more about functional programming with Java.
>>
>> I do not have a formal abstract yet, but I am working on notes and I have
>> worked with Gremlin through a REPL.
>>
>> Here is some stuff that I have written down so far:
>>
>> Graph use Cases: Internet of Things, Social Networks, Communication
>> Networks, Genomics, Epidemiology, Web, Semantic Web, Data Integration,
>> Recommendation, Asset Management, Customer 360.
>> [Source: Traversing Graphs with Gremlin (Artem Chebotko, Solutions
>> Architect at DataStax)], http://www.youtube.com/watch?v=mZmVnEzsDnY
>> (mapping from functional programming to Gremlin [19m33s])
>>
>> Graphs are used by Google, Netflix, Facebook...
>>
>> Gremlin is a Path Traversal Language. (http://tinkerpop.apache.org/)
>> SPARQL is for Graph Pattern Matching.
>> Compare with GraphQL...(differences from Gremlin)
>>
>> As an example, Gremlin provides a functional way to write SQL:
>> http://sql2gremlin.com/
>>
>> Gremlin avoids the use of lambda expressions.
>>
>>
>> -Brent Shambaugh
>>
>> GitHub: https://github.com/bshambaugh
>> Website: http://bshambaugh.org/
>> LinkedIN: https://www.linkedin.com/in/brent-shambaugh-9b91259
>> Skype: brent.shambaugh
>> Twitter: https://twitter.com/Brent_Shambaugh
>> WebID: http://bshambaugh.org/foaf.rdf#me
>>
>> On Tue, Mar 20, 2018 at 12:49 PM, Mitch Blevins <mitchblevins at gmail.com>
>> wrote:
>>
>>> Two-phase commit
>>>
>>> On Tue, Mar 20, 2018, 12:48 PM Jason Lee <jason at steeplesoft.com> wrote:
>>>
>>>> Am I right in reading that as "Yes, I would love to present on this
>>>> topic at the April JUG"? :)
>>>>
>>>>
>>>> On 3/20/2018 7:22 AM, Brent Shambaugh wrote:
>>>> > This sounds good to me too. Thanks. :)
>>>>
>>>> --
>>>> Jason Lee
>>>> http://jasondl.ee
>>>> http://jasondl.ee/twitter
>>>> http://jasondl.ee/in
>>>> http://jasondl.ee/+
>>>>
>>>> _______________________________________________
>>>> Jug mailing list
>>>> Jug at lists.okcjug.org
>>>> http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org
>>>>
>>>
>>
>>
>> _______________________________________________
>> Jug mailing listJug at lists.okcjug.orghttp://lists.okcjug.org/listinfo.cgi/jug-okcjug.org
>>
>>
>> --
>> Jason Leehttp://jasondl.eehttp://jasondl.ee/twitterhttp://jasondl.ee/inhttp://jasondl.ee/+
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okcjug.org/pipermail/jug-okcjug.org/attachments/20180401/9e7015ef/attachment.html>


More information about the Jug mailing list