<?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 Andorig on Medium]]></title>
        <description><![CDATA[Stories by Andorig on Medium]]></description>
        <link>https://medium.com/@andorig68?source=rss-e432841e4f93------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*rUHtOX1pli4j0ffa</url>
            <title>Stories by Andorig on Medium</title>
            <link>https://medium.com/@andorig68?source=rss-e432841e4f93------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 05:36:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andorig68/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[My Google Summer of Code Journey: From Dentist to Drupal Developer]]></title>
            <link>https://medium.com/@andorig68/my-google-summer-of-code-journey-from-dentist-to-drupal-developer-bf61d98a5d9e?source=rss-e432841e4f93------2</link>
            <guid isPermaLink="false">https://medium.com/p/bf61d98a5d9e</guid>
            <category><![CDATA[drupal]]></category>
            <category><![CDATA[google-summer-of-code]]></category>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[careers]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Andorig]]></dc:creator>
            <pubDate>Fri, 11 Jul 2025 03:27:58 GMT</pubDate>
            <atom:updated>2025-09-04T22:31:37.415Z</atom:updated>
            <content:encoded><![CDATA[<p>FAISS Module: <a href="https://github.com/Dr-ri123/ai_vdb_provider_faiss">https://github.com/Dr-ri123/ai_vdb_provider_faiss</a></p><p><em>Reflections on building a vector search provider for Drupal using FAISS</em></p><p>🚀 From Root Canals to Root Directories</p><p>If someone had told me a few years ago that I’d go from inspecting molars to debugging PHP, I probably would’ve laughed. But here we are — midway through Google Summer of Code 2024, working on a cutting-edge AI module for Drupal. Life’s funny like that.</p><p>I graduated as a dentist, but after practicing, I realized it wasn’t the career path I wanted to pursue. Something about software engineering fascinated me — the problem-solving, the creativity, the endless possibilities of building something from code. So I made the leap. No bootcamp. No CS degree. Just sheer curiosity, determination, and the incredible support of the open source community.</p><h3>🌐 Enter the Drupalverse</h3><p>In November 2023, I joined Drupal.org as a complete newcomer to both the platform and open source development. Coming from a non-technical background, everything felt overwhelming at first. Composer, modules, hooks, YAML files, services, dependency injection — it was like learning a new language entirely.</p><p>But the Drupal community gave me something I hadn’t expected — a sense of belonging, a place I could call home. I spent months learning slowly, sinking into the community culture, understanding the codebase, and getting to know the incredible people who make Drupal what it is.</p><p>As a dentist, I was trained to pay keen attention to detail — so I <strong>DRILLED DOWN THE BASICS</strong> until I felt ready for the GSoC contribution period. When the FAISS integration module opportunity came up, I was literally jumping on my toes with excitement!</p><h3>🔍 The Mission: Why FAISS Matters for Drupal</h3><p>My project focuses on expanding Drupal’s AI capabilities by creating a new vector database provider using FAISS (Facebook AI Similarity Search). But let me explain why this matters.</p><p>Vector databases are the backbone of modern AI search. Instead of just matching keywords, they understand the <em>meaning</em>of content — like how ChatGPT “gets” your question even if you don’t phrase it perfectly. They store high-dimensional data that represents the semantic meaning of content.</p><p>Drupal already has an AI ecosystem with vector database support through providers like OpenSearch. But OpenSearch requires remote hosting, server setup, and API keys. FAISS, on the other hand, runs locally as files on your machine. No external dependencies. No cloud costs. Just plug and play.</p><p>My task: Create a FAISS provider by adapting the existing OpenSearch provider, making vector search more accessible to Drupal users who want local, file-based solutions.</p><h3>🧩 Building My Drupal Foundation: From RSVP to AI</h3><p>My journey to GSoC didn’t start with AI modules — it started with the fundamentals. Like many Drupal newcomers, I began with Acquia’s online development course and their classic RSVP module tutorial.</p><h3>Week 1–3: The RSVP Module: My First Real Drupal Code</h3><p>Building the RSVP module was incredibly exciting! It taught me the core Drupal concepts:</p><pre>// Creating my first custom form<br>class RSVPForm extends FormBase {<br>  public function buildForm(array $form, FormStateInterface $form_state) {<br>    $form[&#39;email&#39;] = [<br>      &#39;#type&#39; =&gt; &#39;email&#39;,<br>      &#39;#title&#39; =&gt; $this-&gt;t(&#39;Email Address&#39;),<br>      &#39;#required&#39; =&gt; TRUE,<br>    ];<br>    <br>    $form[&#39;submit&#39;] = [<br>      &#39;#type&#39; =&gt; &#39;submit&#39;,<br>      &#39;#value&#39; =&gt; $this-&gt;t(&#39;RSVP&#39;),<br>    ];<br>    <br>    return $form;<br>  }<br>}</pre><p>But I didn’t stop there. I got curious and started extending it:</p><h3>Going Beyond the Tutorial</h3><pre>// Added email validation and duplicate checking<br>public function validateForm(array &amp;$form, FormStateInterface $form_state) {<br>  $email = $form_state-&gt;getValue(&#39;email&#39;);<br>  <br>  // Check if email already exists for this event<br>  $existing = \Drupal::database()-&gt;select(&#39;rsvp_list&#39;, &#39;r&#39;)<br>    -&gt;fields(&#39;r&#39;)<br>    -&gt;condition(&#39;email&#39;, $email)<br>    -&gt;condition(&#39;nid&#39;, $this-&gt;nid)<br>    -&gt;execute()<br>    -&gt;fetchAssoc();<br>    <br>  if ($existing) {<br>    $form_state-&gt;setErrorByName(&#39;email&#39;, $this-&gt;t(&#39;You have already RSVP\&#39;d for this event.&#39;));<br>  }<br>}</pre><pre>// Added event capacity limits<br>private function checkCapacity($nid) {<br>  $node = Node::load($nid);<br>  $max_capacity = $node-&gt;field_max_capacity-&gt;value;<br>  $current_rsvps = $this-&gt;getRSVPCount($nid);<br>  <br>  return $current_rsvps &lt; $max_capacity;<br>}</pre><h3>From Simple Forms to Advanced Features</h3><p>I kept stacking features onto my RSVP module:</p><ul><li><strong>Email notifications</strong> using Drupal’s mail system</li><li><strong>Admin dashboard</strong> with Views integration</li><li><strong>Capacity management</strong> with custom field types</li><li><strong>Export functionality</strong> for event organizers</li><li><strong>Block integration</strong> for displaying RSVP forms anywhere</li></ul><p>Each feature taught me something new about Drupal’s architecture. The mail system showed me how services work. The admin dashboard introduced me to configuration management. The export feature taught me about batch processing.Second Challenge: OpenSearch Provider Method Signature.</p><h3>🛠️ Weeks 4–6: Building the FAISS Module</h3><p>With a better grasp of the system, I tackled the main challenge: creating an entirely new module by adapting the OpenSearch provider.</p><h3>The Systematic Approach</h3><p>Rather than trying to build everything from scratch, I took a methodical approach:</p><ol><li><strong>Analyze the OpenSearch module structure</strong> — 15+ files including plugins, services, forms, configurations</li><li><strong>Create the new module foundation</strong> — proper Drupal module structure</li><li><strong>Systematic renaming</strong> — Every reference from “opensearch” to “faiss”</li><li><strong>Adapt configurations</strong> — Replace HTTP-based settings with file-based ones</li><li><strong>Create stub implementations</strong> — Prepare for actual FAISS integration</li></ol><h3>Technical Architecture Differences</h3><p>One of the most interesting challenges was understanding how OpenSearch and FAISS differ fundamentally:</p><p><strong>OpenSearch (HTTP-based, remote):</strong></p><ul><li>Server URL and port</li><li>API keys for authentication</li><li>HTTP requests for all operations</li></ul><p><strong>FAISS (File-based, local):</strong></p><ul><li>Local file storage paths</li><li>Index types (Flat, IVF, HNSW)</li><li>Distance metrics (L2, Inner Product, Cosine)</li><li>No network dependencies</li></ul><p>This required completely rethinking the configuration forms and service architecture.</p><h3>The Complete Module Architecture</h3><p>Creating the ai_vdb_provider_faiss module meant building 15+ interconnected files:</p><p><strong>Core Module Files:</strong></p><pre># ai_vdb_provider_faiss.info.yml<br>name: &#39;AI VDB Provider: FAISS&#39;<br>type: module<br>description: &#39;Vector database provider using FAISS for local vector storage&#39;<br>core_version_requirement: ^10 || ^11<br>dependencies:<br>  - ai:ai<br>  - ai:ai_provider<br>  - ai:ai_vdb_provider</pre><p><strong>Service Architecture:</strong></p><pre>// src/Faiss.php - Core FAISS integration class<br>class Faiss {<br>  public function createCollection(string $collection_name, int $dimension): bool<br>  public function insert(string $collection_name, array $vectors, array $ids = []): bool  <br>  public function search(string $collection_name, array $query_vector, int $limit = 10): array<br>  public function query(string $collection_name, array $filter_conditions): array<br>  public function delete(string $collection_name, array $ids): bool<br>}</pre><p><strong>Plugin Integration:</strong></p><pre>// src/Plugin/VdbProvider/FaissProvider.php<br>/**<br> * @VdbProvider(<br> *   id = &quot;faiss&quot;,<br> *   label = @Translation(&quot;FAISS&quot;),<br> * )<br> */<br>class FaissProvider extends VdbProviderBase implements VdbProviderInterface {<br>  public function vectorSearch(QueryInterface $query, EmbeddingsInterface $embedding): array {<br>    $faiss_service = \Drupal::service(&#39;ai_vdb_provider_faiss.faiss_api&#39;);<br>    $query_vector = $embedding-&gt;getNormalized();<br>    return $faiss_service-&gt;search($this-&gt;configuration[&#39;collection_name&#39;], $query_vector, $query-&gt;getLimit());<br>  }<br>}</pre><p><strong>Configuration Management:</strong></p><pre>// src/Form/FaissConfigForm.php - Administrative interface<br>$form[&#39;index_storage_path&#39;] = [<br>  &#39;#type&#39; =&gt; &#39;textfield&#39;,<br>  &#39;#title&#39; =&gt; $this-&gt;t(&#39;Index Storage Path&#39;),<br>  &#39;#default_value&#39; =&gt; $config-&gt;get(&#39;index_storage_path&#39;) ?? &#39;/tmp/faiss_indexes&#39;,<br>  &#39;#required&#39; =&gt; TRUE,<br>];</pre><pre>$form[&#39;index_type&#39;] = [<br>  &#39;#type&#39; =&gt; &#39;select&#39;,<br>  &#39;#title&#39; =&gt; $this-&gt;t(&#39;Index Type&#39;),<br>  &#39;#options&#39; =&gt; [<br>    &#39;Flat&#39; =&gt; $this-&gt;t(&#39;Flat (Exact search)&#39;),<br>    &#39;IVFFlat&#39; =&gt; $this-&gt;t(&#39;IVF Flat (Faster approximate search)&#39;),<br>    &#39;HNSW&#39; =&gt; $this-&gt;t(&#39;HNSW (Hierarchical navigable small world)&#39;),<br>  ],<br>];</pre><h3>💡 Tackling FAISS Configuration Complexity</h3><p>One of the most surprising challenges was designing a flexible configuration system for FAISS, which supports multiple index types (Flat, IVF, HNSW) and distance metrics (L2, Inner Product, Cosine). Unlike OpenSearch’s straightforward HTTP-based settings, FAISS required a dynamic configuration form that could adapt to different use cases while remaining user-friendly for Drupal administrators.</p><h3>The Challenge: Balancing Flexibility and Usability</h3><p>FAISS’s index types have unique parameters:</p><ul><li><strong>Flat</strong>: Simple but memory-intensive, ideal for small datasets</li><li><strong>IVF</strong>: Inverted file indexing for faster searches on large datasets</li><li><strong>HNSW</strong>: Hierarchical Navigable Small World graphs for high-speed, approximate searches</li></ul><p>Each index type requires specific settings, like the number of clusters for IVF or the graph connectivity for HNSW. My initial configuration form was too rigid, forcing users to manually input complex parameters without guidance.</p><h3>My Solution: A Dynamic Configuration Form</h3><p>To address this, I created a dynamic form that adjusts based on the selected index type:</p><pre>// In src/Form/FaissConfigForm.php<br>public function buildForm(array $form, FormStateInterface $form_state) {<br>  $form[&#39;index_type&#39;] = [<br>    &#39;#type&#39; =&gt; &#39;select&#39;,<br>    &#39;#title&#39; =&gt; $this-&gt;t(&#39;Index Type&#39;),<br>    &#39;#options&#39; =&gt; [<br>      &#39;flat&#39; =&gt; $this-&gt;t(&#39;Flat&#39;),<br>      &#39;ivf&#39; =&gt; $this-&gt;t(&#39;IVF&#39;),<br>      &#39;hnsw&#39; =&gt; $this-&gt;t(&#39;HNSW&#39;),<br>    ],<br>    &#39;#ajax&#39; =&gt; [<br>      &#39;callback&#39; =&gt; [$this, &#39;updateForm&#39;],<br>      &#39;wrapper&#39; =&gt; &#39;faiss-settings-wrapper&#39;,<br>    ],<br>  ];</pre><pre>  $form[&#39;settings&#39;] = [<br>    &#39;#type&#39; =&gt; &#39;container&#39;,<br>    &#39;#id&#39; =&gt; &#39;faiss-settings-wrapper&#39;,<br>  ];</pre><pre>  $index_type = $form_state-&gt;getValue(&#39;index_type&#39;, &#39;flat&#39;);<br>  if ($index_type === &#39;ivf&#39;) {<br>    $form[&#39;settings&#39;][&#39;nlist&#39;] = [<br>      &#39;#type&#39; =&gt; &#39;number&#39;,<br>      &#39;#title&#39; =&gt; $this-&gt;t(&#39;Number of Clusters&#39;),<br>      &#39;#default_value&#39; =&gt; 100,<br>      &#39;#min&#39; =&gt; 1,<br>    ];<br>  } elseif ($index_type === &#39;hnsw&#39;) {<br>    $form[&#39;settings&#39;][&#39;m&#39;] = [<br>      &#39;#type&#39; =&gt; &#39;number&#39;,<br>      &#39;#title&#39; =&gt; $this-&gt;t(&#39;Graph Connectivity (M)&#39;),<br>      &#39;#default_value&#39; =&gt; 32,<br>      &#39;#min&#39; =&gt; 4,<br>    ];<br>  }</pre><pre>  return $form;<br>}</pre><p>This AJAX-driven form dynamically updates to show only the relevant fields for the selected index type, reducing complexity for users. I also added tooltips and validation to guide administrators:</p><pre>public function validateForm(array &amp;$form, FormStateInterface $form_state) {<br>  $index_type = $form_state-&gt;getValue(&#39;index_type&#39;);<br>  if ($index_type === &#39;ivf&#39;) {<br>    $nlist = $form_state-&gt;getValue(&#39;nlist&#39;);<br>    if ($nlist &lt; 1) {<br>      $form_state-&gt;setErrorByName(&#39;nlist&#39;, $this-&gt;t(&#39;Number of clusters must be positive.&#39;));<br>    }<br>  }<br>}</pre><h3>The Learning Curve</h3><p>This wasn’t just about coding a form — it required understanding FAISS’s underlying algorithms and balancing technical precision with Drupal’s user-centric design principles. I dove into FAISS documentation to grasp the trade-offs between index types and consulted with my mentor to ensure the form adhered to Drupal’s Form API standards. This experience taught me how to bridge complex AI concepts with practical, user-friendly interfaces — an essential skill for open-source contributions.</p><h3>Technical Challenges and Solutions</h3><h3>1. Drupal’s Plugin System</h3><p><strong>Challenge:</strong> Understanding plugin registration and integration.<br><strong>Solution:</strong> Studied OpenSearch’s annotations, interfaces, and dependency injection.</p><h3>2. Configuration Schemas</h3><p><strong>Challenge:</strong> Designing YAML schemas for Drupal’s forms.<br><strong>Solution:</strong> Analyzed existing schemas to map form elements to storage.</p><h3>3. Service Integration</h3><p><strong>Challenge:</strong> Connecting services in Drupal’s ecosystem.<br><strong>Solution:</strong> Leveraged dependency injection and Drupal’s service container.</p><h3>✅ Current Status: Exceeding First Evaluation Goals</h3><p>As I write this, the module is:</p><ul><li>✅ <strong>Fully installable</strong> — All Drupal integration complete</li><li>✅ <strong>Properly structured</strong> — Follows Drupal coding standards</li><li>✅ <strong>Configuration ready</strong> — Admin forms work perfectly</li><li>✅ <strong>Plugin registered</strong> — Appears in VDB provider selection</li><li>✅ <strong>Service integrated</strong> — Dependency injection working</li><li>✅ <strong>GitHub ready</strong> — Clean repository with proper documentation</li><li>🎯 <strong>Ready for Phase 2</strong> — FAISS library integration :)</li></ul><h3>Technical Skills</h3><ul><li><strong>Drupal Architecture:</strong> Plugin systems, services, configuration management, dependency injection</li><li><strong>PHP Development:</strong> Object-oriented patterns, interfaces, namespacing</li><li><strong>Git Workflows:</strong> Rebasing, conflict resolution, collaborative development</li><li><strong>API Design:</strong> Understanding how different systems integrate</li><li><strong>YAML Configuration:</strong> Schema design and validation</li></ul><h3>Soft Skills</h3><ul><li><strong>Problem-solving:</strong> Breaking down complex tasks into manageable pieces</li><li><strong>Documentation:</strong> Writing clear, maintainable code and comments</li><li><strong>Communication:</strong> Working effectively with mentors and community</li><li><strong>Systems Thinking:</strong> Understanding how modules fit into larger ecosystems</li></ul><h3>🔮 Looking Ahead: Phase 2 and Beyond</h3><p>The next phase involves the most exciting part — actual FAISS integration. This will likely involve:</p><ol><li><strong>Python Integration:</strong> FAISS is primarily a Python library</li><li><strong>IPC Communication:</strong> Bridging PHP and Python services</li><li><strong>Performance Optimization:</strong> Making vector operations fast and efficient</li><li><strong>Testing:</strong> Ensuring reliability with real-world data</li></ol><h3>🙏 Acknowledgments</h3><p>Huge thanks to my mentor and the Drupal AI community for their guidance. The patience shown while I debugged my first issues, the detailed code reviews, and the encouragement to push boundaries have made this an incredible learning experience.</p><h3>🌟 Final Thoughts: From Medical Practice to Open Source Impact</h3><p>Google Summer of Code isn’t just about the code you write — it’s about joining a community, learning to collaborate, and contributing to something bigger than yourself. Creating the FAISS provider has taught me more about software architecture, open source development, and problem-solving than any classroom could.</p><p>Looking back at my journey from dentist to developer, I’m amazed at how far I’ve come in less than a year. The attention to detail that served me in medical practice has proven invaluable in debugging code and architecting software solutions. The patience required to master dental procedures translates perfectly to the persistence needed for complex technical challenges.</p><p>The best part? We’re building something that will help developers create smarter, more intuitive search experiences. That’s the kind of impact that makes all the debugging sessions and git conflicts worth it. For someone who switched careers to make a difference through technology, there’s no better feeling than seeing your code solve real-world problems.</p><p>To anyone considering a career switch into tech — it’s never too late. Find a community like Drupal that welcomes newcomers, drill down into the fundamentals, and don’t be afraid to dream big. Sometimes the most unexpected journeys lead to the most rewarding destinations.</p><p><em>Next up: Diving deep into FAISS integration and making vector search blazing fast!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bf61d98a5d9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>