<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Prahalad Deshpande  on Medium]]></title>
        <description><![CDATA[Stories by Prahalad Deshpande  on Medium]]></description>
        <link>https://medium.com/@prahaladd?source=rss-2066e247890f------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Prahalad Deshpande  on Medium</title>
            <link>https://medium.com/@prahaladd?source=rss-2066e247890f------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 16:35:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@prahaladd/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[gograph — a unified Graph Database API framework in Go]]></title>
            <link>https://medium.com/@prahaladd/gograph-a-unified-graph-database-api-framework-in-go-fc1a00467377?source=rss-2066e247890f------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc1a00467377</guid>
            <category><![CDATA[memgraph]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[neo4j]]></category>
            <category><![CDATA[graphdb]]></category>
            <category><![CDATA[golang]]></category>
            <dc:creator><![CDATA[Prahalad Deshpande ]]></dc:creator>
            <pubDate>Wed, 11 Jan 2023 18:49:54 GMT</pubDate>
            <atom:updated>2023-01-11T18:49:54.128Z</atom:updated>
            <content:encoded><![CDATA[<h3>gograph — a unified Graph Database API framework in Go</h3><p>I have been working with Graph databases for quite some time and I can say with absolute certainty that these databases are becoming more mainstream than ever. The present day trend is all about connectivity and how various software services, devices and people interact with each other and the most natural way to model these interactions would be to use a graph database.</p><p>Vendors like <a href="https://neo4j.com/">Neo4J</a> had foreseen this trend very early (back in 2010) and went on to become a name synonymous with Graph database. They capitalized impressively over this early start and went on to build massively scalable Graph Database that gave them a leadership position within this space.</p><p>Over the recent years, there have been multiple other Graph database vendors all specializing in some area or other. A few other notable examples are <a href="https://janusgraph.org/">JanusGraph</a>, <a href="https://github.com/bitnine-oss/agensgraph">AgensGraph</a>, <a href="https://github.com/dgraph-io/dgraph">dgraph</a> etc. Additionally, there also exist multiple mechanisms to query the graph databases (<a href="https://en.wikipedia.org/wiki/Cypher_(query_language)">Cypher</a>, <a href="https://en.wikipedia.org/wiki/Gremlin_(query_language)">Gremlin</a>, <a href="https://en.wikipedia.org/wiki/GraphQL">GraphQL</a> and of course the good old <a href="https://en.wikipedia.org/wiki/SQL">SQL</a> with mind-boggling join queries)</p><h4>The Multiplicity Impact</h4><p>The presence of multiple graph databases implies the presence of multiple API access patterns and querying mechanisms (Cypher versus Gremlin versus GraphQL). For developers who build systems interacting with Graph databases the multiplicity has some unwanted effects</p><ul><li>Vendor or tech lock-in to a single graph database implementation</li><li>Migration to a new graph database requires re- implementation of the same logic and is often a time consuming and error prone process.</li><li>Prevents use of polyglot graph data stores. This complicates the integration of software services and frameworks that are built on top of different types of graph stores. This again circles back to the point above related to duplicate implementation and proliferation of disparate non-standard access patterns</li><li>Prevents the use of optimal graph databases for use cases. For e.g the graph data stored in a database would be cached within a custom implementation of in memory graph using hash maps which would not be able to simulate all the interactions with the graph database which would have been otherwise possible if we were able to plug-in an in-memory graph database without any additional effort .</li></ul><p>So how can we address the above problems? Enter <a href="https://github.com/prahaladd/gograph">gograph</a> a light-weight API framework in Go to interact with graph databases.</p><p><strong>Introduction to gograph</strong></p><p><strong>gograph</strong> was conceived with an aim to become the “swiss army knife” for interacting with any Graph database in Golang thereby addressing the above problems related to vendor or implementation lock-in and enabling use cases based on federation of data from multiple graph databases using a simple consistent and minimalist API surface. The minimalist nature of the API surface comes from the fact that <strong>gograph</strong> APIs would address the most common access patterns across all graph databases.</p><p>The gograph framework consists of the following layers</p><ul><li>Core — The core layer exposes the most fundamental object types required for interacting with graph databases (Vertices and Edges) as well as the interface contract to be implemented by all Graph Database connection providers. By default gograph ships with connectors for <a href="https://neo4j.com/">Neo4J</a> and <a href="https://memgraph.com/">Memgraph</a>.</li><li>Query — The query layer contains the logic necessary for generating the queries to interact with Graph databases. Currently, the framework generates Cypher queries but there is a support planned for generating Gremlin queries in one of the subsequent release.</li><li>Mapper — The mapper layer contains the implementations required for mapping user defined struct instances to underlying core objects such as Vertex or Edge and vice-versa. Currently, reflection based mapping is supported where-in users can annotate struct fields to control the names of the vertex or edge properties.</li><li>Object Modeled Graph (OMG) — Object Modeled Graph (OMG) is synonymous to Neo4J’s Object Graph Mapping (OGM). This layer currently exposes APIs to store the user defined struct instances directly into the graph database as a vertices or edges. This layer relies on the Mapper layer and the Core layer to map the struct to core vertex or edge objects and persist them to the Graph database.</li></ul><h4>Wait but there is already <a href="https://github.com/mindstand/gogm">GoGM</a></h4><p><a href="https://github.com/mindstand/gogm">GoGM</a> is a Go based OGM library with lots of rich features and works primarily with Neo4J. The OMG layer is not sophisticated as <a href="https://github.com/mindstand/gogm">GoGM</a>; however that is by design since it wants to remain vendor agnostic. Within <a href="https://github.com/prahaladd/gograph">gograph</a> the OMG functionality is only a layer and the current OMG layer implementations can be replaced with more sophisticated ones (including possibly GoGM itself) in a later releases.</p><h4>gograph In Action</h4><p>To demonstrate how easy it is to interact with multiple graph databases using the generic API, I implemented a simple test application which creates a few relations in Neo4J and then replicates them back into Memgraph. Developers who have worked with SQL libraries in Go will immediately notice a similarity in the manner of how graph connection instances are obtained.</p><pre>package main<br><br>import (<br> &quot;context&quot;<br> &quot;fmt&quot;<br> &quot;os&quot;<br> &quot;strconv&quot;<br><br> &quot;github.com/prahaladd/gograph/core&quot;<br> _ &quot;github.com/prahaladd/gograph/memgraph&quot;<br> &quot;github.com/prahaladd/gograph/neo&quot;<br> &quot;github.com/prahaladd/gograph/omg&quot;<br>)<br><br>const (<br> NEO4J_PORT = &quot;NEO4J_PORT&quot;<br> MG_PORT    = &quot;MG_PORT&quot;<br>)<br><br>type Person struct {<br> Name string<br> Age  int64<br>}<br><br>// GetLabel returns the label associated with the graph object<br>func (p *Person) GetLabel() string {<br> return &quot;Person&quot;<br>}<br><br>// GraphType() returns the type associated with the Graph object<br>func (p *Person) GetType() omg.GraphObjectType {<br> return omg.Vertex<br>}<br><br>type City struct {<br> Name    string<br> State   string<br> Country string<br>}<br><br>// GetLabel returns the label associated with the graph object<br>func (c *City) GetLabel() string {<br> return &quot;City&quot;<br>}<br><br>// GraphType() returns the type associated with the Graph object<br>func (c *City) GetType() omg.GraphObjectType {<br> return omg.Vertex<br>}<br><br>type Residence struct {<br> Area string<br> Pin  int64<br>}<br><br>// GetLabel returns the label associated with the graph object<br>func (r *Residence) GetLabel() string {<br> return &quot;RESIDES_IN&quot;<br>}<br><br>// GraphType() returns the type associated with the Graph object<br>func (r *Residence) GetType() omg.GraphObjectType {<br> return omg.Edge<br>}<br><br>func main() {<br> neo4jPortFromEnv, ok := os.LookupEnv(NEO4J_PORT)<br> var neo4jPort int32<br> if !ok {<br>  neo4jPort = int32(7687)<br> } else {<br>  neo4jPortParsed, _ := strconv.ParseInt(neo4jPortFromEnv, 10, 32)<br>  neo4jPort = int32(neo4jPortParsed)<br> }<br> neo4jConnection, err := core.GetConnectorFactory(&quot;neo4j&quot;)(&quot;neo4j&quot;, &quot;localhost&quot;, &quot;&quot;, &amp;neo4jPort, map[string]interface{}{neo.NEO4J_USER_KEY: &quot;neo4j&quot;, neo.NEO4J_PWD_KEY: &quot;neo4j&quot;}, nil)<br> if err != nil {<br>  fmt.Println(err)<br>  return<br> }<br><br> memgraphPortFromEnv, ok := os.LookupEnv(MG_PORT)<br> var mgPort int32<br> if !ok {<br>  mgPort = int32(7697)<br> } else {<br>  memgraphPortParsed, _ := strconv.ParseInt(memgraphPortFromEnv, 10, 32)<br>  mgPort = int32(memgraphPortParsed)<br> }<br> memgraphConnection, err := core.GetConnectorFactory(&quot;memgraph&quot;)(&quot;bolt&quot;, &quot;localhost&quot;, &quot;&quot;, &amp;mgPort, map[string]interface{}{neo.NEO4J_USER_KEY: &quot;neo4j&quot;, neo.NEO4J_PWD_KEY: &quot;neo4j&quot;}, nil)<br> if err != nil {<br>  fmt.Println(err)<br>  return<br> }<br> neo4jOmgStore := omg.NewGenericStore(neo4jConnection, omg.NewReflectionMapper())<br> memgraphOmgStore := omg.NewGenericStore(memgraphConnection, omg.NewReflectionMapper())<br><br> p := Person{Name: &quot;Tom&quot;, Age: 10}<br> c := City{Name: &quot;Mumbai&quot;, State: &quot;MH&quot;, Country: &quot;IN&quot;}<br> rel := Residence{Area: &quot;Colaba&quot;, Pin: 400005}<br><br> vr := omg.VertexRelation{SourceVertex: &amp;p, Relationship: &amp;rel, DestinationVertex: &amp;c}<br> err = neo4jOmgStore.PersistEdge(context.Background(), &amp;vr)<br> if err != nil {<br>  fmt.Println(err)<br>  return<br> }<br><br> vrs, err := neo4jOmgStore.ReadEdge(context.Background(), &amp;vr)<br> if err != nil {<br>  fmt.Println(err)<br>  return<br> }<br> for _, vr := range vrs {<br>  err = memgraphOmgStore.PersistEdge(context.Background(), vr)<br>  if err != nil {<br>   fmt.Println(err)<br>   return<br>  }<br> }<br> vrsFromMemgraph, err := memgraphOmgStore.ReadEdge(context.Background(), &amp;vr)<br><br> if err != nil {<br>  fmt.Println(err)<br>  return<br> }<br> for _, vrFromMemgraph := range vrsFromMemgraph {<br>  fmt.Printf(&quot;%v-[%v]-%v&quot;, *(vrFromMemgraph.SourceVertex.(*Person)), *(vrFromMemgraph.Relationship.(*Residence)), *(vrFromMemgraph.DestinationVertex.(*City)))<br> }<br>}</pre><p><strong>Ok! you have caught my interest. What next?</strong></p><p>Visit the <a href="https://github.com/prahaladd/gograph">Github Project </a>to understand more about the source code layout, browse through the code base and run integration tests. This project has just started and there are multiple areas which would need further work or enhancements implemented. Any contributions that help in these areas are welcome and very much appreciated.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc1a00467377" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Gentle introduction to Gitpod.io]]></title>
            <link>https://medium.com/@prahaladd/a-gentle-introduction-to-gitpod-io-9b6abc7933e4?source=rss-2066e247890f------2</link>
            <guid isPermaLink="false">https://medium.com/p/9b6abc7933e4</guid>
            <category><![CDATA[cloud-development]]></category>
            <category><![CDATA[gitpod]]></category>
            <dc:creator><![CDATA[Prahalad Deshpande ]]></dc:creator>
            <pubDate>Wed, 11 Jan 2023 08:09:17 GMT</pubDate>
            <atom:updated>2023-01-11T08:09:17.593Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RPB-FNSM9RWkPYfgwSeLHA.png" /></figure><p>I have long been fascinated by online development environments — the ease of simply firing up a browser, logging in into an environment, cloning my repo and start coding away in my language is something that I have always yearned for. One additional confession — I love learning new programming languages and associated activities like experimenting with a new tech stack.</p><p>My fascination with online development environments took me to experiment with <a href="https://techcrunch.com/2013/04/16/nitrous-io-seed-funding/">Nitrous.io</a> back in 2013. In those days, I worked on jQuery and NodeJS. Nitrous provided me a nice environment to experiment with various libraries and frameworks in these two areas. But Nitrous.io unfortunately <a href="https://techcrunch.com/2016/10/31/cloud-development-platform-nitrous-io-shuts-down/">shutdown it’s service</a> and I was again looking out for a nice online development environment. In the meanwhile, since I was always into experimentation and learning new languages, my laptop bore the brunt of having to host the full blown IDEs, library and SDKs of various programming languages. And did I mention the surrounding plethora of databases , message brokers, CI/CD frameworks, Docker, Kubernetes?</p><p>Eventually, my laptop and me could not keep up with the fast paced releases of the SDKs, IDEs, Databases etc . And so I went back to my fascination — is there an online development environment that can bail me out of the mess I was in? And that is when on a fine Sunday evening in June this year, I discovered g<a href="https://www.gitpod.io/">itpod.io</a>. Their homepage is pretty impressive and it got me hooked. Within a few minutes I was already setting up my first workspace and from then on there has been no turning back.</p><p>While the Gitpod <a href="https://www.gitpod.io/">home page</a> lists many impressive features, the below sections of the article highlight some of the features that I personally found very impressive</p><h4>No-frills repository import</h4><p>One can import any Git based repo into Gitpod with zero effort. Simply prefix any Github/Gitlab/Bitbucket URL with <strong>gitpod.io/# </strong>and Gitpod will automatically launch a workspace with the all the tooling and the source code of the repo replicated into it. The below screenshot depicts how seamless a repository import into Gitpod is from the Gitpod web console.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qBZLStAA3_j1EZYvE3_2-g.png" /></figure><p>All workspaces are visible within the workspace dashboard along with their status</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gJ7xBn3ixIASObvFuMjzlQ.png" /></figure><p>The default workspace provided by Gitpod comes with the most common programming languages and toolchains pre-installed (Go, Python, Java, LLVM, Clang, PHP, Ruby, jq, nano and vim). You are presented with a nice VS Code Web IDE interface along with a terminal prompt where-in you can install any other additional plug-ins or software required for your project. One can even setup a complete VNC based desktop environment within Gitpod that is rendered within the browser! Hence, one can also develop native UI applications within Gitpod and test it out. The below screenshot shows one such example environment. This <a href="https://www.gitpod.io/blog/native-ui-with-vnc">blog</a> provides more context around VNC based Gitpod workspace.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2e7DZPJzPE4PZdGPuOgPiA.png" /></figure><h4>DevEnv As Code</h4><p>Gitpod provides the ability to encapsulate the entire development environment setup as code (DevEnv as Code). The project authors can specify all the required setup and init steps within a <a href="https://www.gitpod.io/docs/references/gitpod-yml?utm_source=googleads&amp;utm_medium=search&amp;utm_campaign=dynamic_search_ads&amp;utm_id=16501579379&amp;utm_content=dsa&amp;gclid=Cj0KCQiAnsqdBhCGARIsAAyjYjTTryf0t2XM6esZtch2Mc7p-6zHsRM2nRK9bNNvwPrMOsFzL7aKVQwaAlkQEALw_wcB">YAML file</a>. The YAML file can also contain specific plug-ins that must be auto-configured when the workspace starts. Gitpod then ensures that all the dependencies specified in the YAML file and the commands mentioned there-in are executed during the workspace creation stage so that when the VS Code Web IDE comes up, you are ready to go and start coding away. This also greatly simplifies the process of on-boarding new members to your project; just have them fork your project repo and create a workspace out of it and all of the setup is automatically taken care of.</p><p>Taking this a step further — changes to the setup steps and dependencies are translated to changes to the YAML file which can then be merged to the master repo after a code review and approval. Lo and behold — the next time the workspace opens up with the updated dependencies and init steps executed!! Another advantage I see to this aspect — if you want to enforce the usage of toolchains with the relevant security patches and bug fixes applied, then just change the YAML file and have the team members re-open their workspace after updating their forked repos.</p><p>The below code snippet shows a customized YAML that I use to set up the Go development environment for a project that I am working on.</p><pre>image:<br>  file: .gitpod.Dockerfile<br>tasks:<br>  - init: echo &quot;Initializing graph database...&quot; &amp;&amp; /usr/local/pgsql/bin/ag_ctl init -D /workspace/graphdb<br>    command: echo &quot;Starting AgensGraph...&quot; &amp;&amp; /usr/local/pgsql/bin/ag_ctl -D /workspace/graphdb -l logfile start &amp;&amp; createdb allgraphdb -h localhost -U gitpod<br>vscode:<br>  extensions:<br>    - &quot;ckolkman.vscode-postgres&quot;</pre><p>Within the above YAML, I have specified the custom Dockerfile to be used for spawning this workspace (more on this in the next section) and the initialization tasks required to start the <a href="https://github.com/bitnine-oss/agensgraph">Agensgraph</a> graph database layer on top of PostgreSQL. Also note that I have configured VS Code to auto-install the <a href="https://marketplace.visualstudio.com/items?itemName=ckolkman.vscode-postgres">PostgreSQL extension</a></p><p>So when my workspace starts, I have everything required to get going with my code development and not worry about running multiple scripts and setup steps to configure my environment and the IDE.</p><h4>Bring our own Docker images</h4><p>The <a href="https://hub.docker.com/r/gitpod/workspace-full">default image</a> provided by Gitpod is great, but what if your project mandates the base image to be Fedora? Or for that matter there are some specific set of tools that form the core substrate of the project and would need to be present within the image for the workspace to initialize correctly?</p><p>This is where Gitpod’s bring your own Docker image comes to rescue (this is also my most favorite feature by the way)!</p><p>We can create a Dockerfile with all the required build steps and then specify the docker file within the the YAML file mentioned above. Refer <a href="https://www.gitpod.io/docs/configure/workspaces/workspace-image">this</a> page for more details. Below is an example of a Docker file that was used to setup the Agensgraph environment above. Visit the <a href="https://github.com/prahaladd/agensgraph">Github link</a> for more cloning this project.</p><pre>FROM gitpod/workspace-full<br>RUN sudo apt-get install -y build-essential libreadline-dev zlib1g-dev flex bison<br>RUN git clone --progress --verbose https://github.com/bitnine-oss/agensgraph.git<br>WORKDIR /home/gitpod/agensgraph<br>RUN echo &quot;Building AgensGraph in $(pwd)&quot;<br>ENV LC_ALL=&quot;en_US.UTF-8&quot;<br>ENV LC_CTYPE=&quot;en_US.UTF-8&quot;<br>RUN sudo mkdir -p /var/graphdb &amp;&amp; sudo chown -R gitpod:gitpod /var/graphdb \<br>        &amp;&amp; ./configure \<br>        &amp;&amp; sudo make install \<br>        &amp;&amp; echo &quot;export AGDATA=/workspace/graphdb&quot; &gt;&gt; ~/.bashrc \<br>        &amp;&amp; echo &quot;export PATH=$PATH:/usr/local/pgsql/bin&quot; &gt;&gt; ~/.bashrc \<br>        &amp;&amp; echo &quot;AgensGraph install complete...&quot;</pre><h4>Workspace connectivity with Tailscale</h4><p>Gitpod allows connecting multiple workspaces together as well to on-prem/home environments <a href="https://www.gitpod.io/docs/integrations/tailscale">using Tailscale</a>. I have not tried this configuration, but going through the documentation on the provided link, it is obvious that the setup is truly simple and fast (and again can be replicated easily).</p><h4>Attractive and Developer Friendly Pricing</h4><p>Gitpod has very lucrative pricing plans. Getting started with Gitpod requires no credit card or upfront payment and the free tier plan supports up to 50 hours (500 credits) of work for individual developers. They also have plans for Teams and Enterprises. More details about Gitpod pricing can be found <a href="https://www.gitpod.io/pricing">here</a></p><p>All the cool features mentioned above are included within the Free Tier plan too! They also have a <a href="https://www.gitpod.io/pricing">complementary plans</a> for developers working on Open Source projects. While the page mentions a pre-determined list of projects, it is easy to sign up for a complementary plan in case one is working on an Open Source project not listed on the page.</p><h4>In Conclusion</h4><p>The rich functionality provided by Gitpod at friendly pricing plans is what has prompted me to move more and more of my personal projects and experiments to Gitpod. For sure, there are quite some unanswered questions or “things to be tried yet” but the facilities provided by Gitpod make remote development an enjoyable experience :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9b6abc7933e4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>