<?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 Sandeep Pal on Medium]]></title>
        <description><![CDATA[Stories by Sandeep Pal on Medium]]></description>
        <link>https://medium.com/@sandeep-pal?source=rss-41d2c3182867------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*7V3Qs4zIfXPmDCFd2VkDaw.jpeg</url>
            <title>Stories by Sandeep Pal on Medium</title>
            <link>https://medium.com/@sandeep-pal?source=rss-41d2c3182867------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 21:46:50 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sandeep-pal/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[ MultiCloudJ: Cloud-Agnostic Java SDK for Multi-Cloud Development]]></title>
            <link>https://medium.com/@sandeep-pal/multicloudj-cloud-agnostic-java-sdk-for-multi-cloud-development-33f94d4211eb?source=rss-41d2c3182867------2</link>
            <guid isPermaLink="false">https://medium.com/p/33f94d4211eb</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[hybrid-cloud]]></category>
            <category><![CDATA[google-cloud-platform]]></category>
            <category><![CDATA[salesforce]]></category>
            <dc:creator><![CDATA[Sandeep Pal]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 21:25:18 GMT</pubDate>
            <atom:updated>2025-08-19T16:49:43.550Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cORso1FV1nf0jDo7q4mGAg.png" /></figure><blockquote>This article was co-authored by <a href="https://medium.com/@sandeep-pal">Sandeep Pal</a> (Principal Engineer at Salesforce) and <a href="https://medium.com/@junaid.bhatra">Junaid Bhatra</a> (Director, Software Engineering at Salesforce)</blockquote><h3>🚀 The Multi-Cloud Challenge</h3><p>Today’s enterprises increasingly operate in <strong>multi-cloud environment -</strong>deploying applications across AWS, Google Cloud, Azure and Alibaba Cloud to improve resilience, avoid vendor lock-in, and meet regional compliance. But for developers, this comes at a significant cost: inconsistent SDKs semantics, redundant implementations for each cloud, and growing complexity in maintaining cloud-specific business logic.</p><p>As engineers at Salesforce working across diverse cloud platforms, we felt that pain firsthand.</p><p>That’s why we created <a href="https://github.com/salesforce/multicloudj"><strong>MultiCloudJ</strong></a> a.k.a. Substrate SDK — an open-source Java SDK that <strong>unifies access to core cloud services</strong> via substrate-agnostic interfaces. With MultiCloudJ, you can <strong>write once, deploy and run across clouds</strong>, from S3 and DynamoDB to GCS and Firestore to Alibaba OSS and Tablestore — without rewriting business logic.</p><h3>💡 What is MultiCloudJ?</h3><p>MultiCloudJ is a modular Java SDK that abstracts interactions with common cloud services using consistent, cloud neutral interfaces providing uniform semantics.</p><p>Supported resources include:</p><ul><li><strong>Blob storage</strong> (Amazon S3, Google Cloud Storage, Alibaba OSS)</li><li><strong>Document stores</strong> (DynamoDB, Firestore, Tablestore)</li><li><strong>Security token services (STS)</strong> for credential management</li><li><strong>Pubsub</strong> (aka Message Queues — coming soon in Sep’25)</li></ul><p>Internally, MultiCloudJ leverages native cloud SDKs, encapsulating them within a unified interface. It introduces a middle layer that handles the common logic, complexity of differing semantics and cloud-specific behaviors — making otherwise incompatible services interchangeable at the application level seamlessly.</p><h3>🔧 Why MultiCloudJ?</h3><p>For <strong>developers</strong>, MultiCloudJ:</p><ul><li>Eliminates boilerplate across cloud provider SDKs</li><li>Eliminates the need to learn and write code for each cloud provider SDK</li><li>Enables cloud-agnostic application logic</li></ul><p>For <strong>businesses</strong>, MultiCloudJ:</p><ul><li><strong>Leverage: </strong>Reduces cloud vendor lock-in and provides negotiation leverage</li><li><strong>Compliance</strong>: Respect data sovereignty by choosing cloud location/providers</li><li><strong>Cost optimization</strong>: Deploy to the most cost-effective cloud</li><li><strong>Resilience</strong>: Failover and DR across cloud providers</li><li><strong>Time-to-market</strong>: Faster rollouts by avoiding cloud-specific rewrites</li></ul><h3>🧬 What’s Under the Hood?</h3><p>MultiCloudJ is built on a <strong>layered architecture</strong> that cleanly separates the public API, core abstractions, and cloud-specific implementations. This structure brings consistency, extensibility, and maintainability — whether you’re using AWS today or migrating to GCP tomorrow.</p><p>The architecture is composed of <strong>three main layers</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YgWb89Ne2gPt5MqO" /></figure><h3>🟦 1. Portable Layer (Public API)</h3><p>This is the layer that <strong>developers interact with directly</strong>. It provides substrate-agnostic APIs like upload(), download(), or delete()—abstracting all provider-specific logic.</p><p><strong>Characteristics:</strong></p><ul><li>Exposes only functions common across all cloud providers</li><li>Accepts substrate-neutral parameters like region, bucket name, and credentials</li><li>Keeps provider-specific details completely hidden</li><li>Minimizes required input, maximizing usability</li></ul><p><strong>Example usage:</strong></p><pre>BucketClient client = BucketClient.builder(&quot;aws&quot;)<br>    .withBucket(&quot;someBucketName&quot;)<br>    .withRegion(&quot;us-east-1&quot;);</pre><pre>UploadRequest request = new UploadRequest.Builder().withKey(&quot;foo/bar.jpg&quot;).build();<br>UploadResponse response = client.upload(request, &quot;sample-content&quot;);</pre><p>In this example, switching to GCP or Alibaba Cloud is as simple as changing the substrate value—no code changes needed. In this example, the credentials are resolved using the default way for each cloud such as GOOGLE_APPLICATION_CREDENTIALSfor GCP and AWS_SECRET_KEY_ID, AWS_SECRET_ACCESS_KEYand AWS_SESSION_TOKEN. You can override the credentials using the credentials overrider with custom session tokens or custom roles/service accounts.</p><h3>🟨 2. Driver Layer (Abstraction &amp; Coordination)</h3><p>This internal layer sits <strong>between the public API and provider logic</strong>, defining the abstract methods and shared logic that providers must implement.</p><p><strong>Responsibilities:</strong></p><ul><li>Defines core abstract operations (doUpload, doDownload, etc.)</li><li>Implements shared validation and preprocessing logic</li><li>Shields the Portable Layer from leaking provider internals</li><li>Keeps substrate-agnostic interfaces stable</li></ul><p><strong>Example abstraction:</strong></p><pre>public abstract class AbstractBlobStore {<br>    protected abstract UploadResponse doUpload(UploadRequest request);<br>    protected abstract void doDelete(String key);<br>}</pre><p>This layer enables clear <strong>separation of concerns</strong>: the public-facing layer remains clean and consistent, while internal implementations handle nuanced behaviors behind the scenes.</p><h3>🟥 3. Provider Layer (Substrate Implementation)</h3><p>The Provider Layer implements the driver interfaces for each cloud. For example, AWSBlobStore implements upload/download methods using the AWS SDK, while GCSBlobStore uses GCP clients.</p><p><strong>Responsibilities:</strong></p><ul><li>Executes actual API calls to the cloud provider</li><li>Translates abstract requests into provider-specific formats</li><li>Implements custom behavior or optimizations per substrate</li></ul><p><strong>Example implementation:</strong></p><pre>public class AWSBlobStore extends AbstractBlobStore {<br>    @Override<br>    protected UploadResponse doUpload(UploadRequest request) {<br>        PutObjectRequest putReq = PutObjectRequest.builder()<br>            .bucket(bucket)<br>            .key(request.getKey())<br>            .build();<br>        s3Client.putObject(putReq, RequestBody.fromString(request.getContent()));<br>        return new UploadResponse(...);<br>    }<br>}</pre><p>By isolating cloud-specific logic, MultiCloudJ ensures that the rest of the stack stays stable — even as new providers are added or existing APIs evolve.</p><h3>✅ Design Benefits</h3><ul><li><strong>Portability</strong>: Switch cloud backends without rewriting logic</li><li><strong>Maintainability</strong>: Isolate changes to specific layers</li><li><strong>Testability</strong>: Mock substrate-agnostic APIs without deep SDK knowledge</li><li><strong>Extensibility</strong>: Add support for new clouds by only implementing the provider layer</li></ul><h3>☁️ Real-World Use Cases</h3><ul><li><strong>Global SaaS Platform</strong>: A global SaaS company has customers in different regions, each with data residency or performance needs tied to specific cloud providers (eg, AWS in North America, Alibaba Cloud in Asia)</li><li><strong>Hybrid Cloud Deployments</strong>: Route traffic to different providers by region or business unit.</li><li><strong>Testing and Disaster Recovery across Clouds</strong>: A company uses AWS primarily, but wants a fallback plan in case of a regional failure</li><li><strong>Multi-Cloud Data Replication</strong>: Sync blobs or documents across providers without cloud specific code.</li><li><strong>Cloud Migration</strong>: Shift from S3 to GCS (or vice versa) without code rewrites.</li></ul><h3>🛠️ Getting Started</h3><h3>Add to your Maven project:</h3><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;com.salesforce.multicloudj&lt;/groupId&gt;<br>  &lt;artifactId&gt;docstore-client&lt;/artifactId&gt;<br>  &lt;version&gt;0.2.2&lt;/version&gt;<br>&lt;/dependency&gt;</pre><p>Replace docstore with blobstore, sts, or provider-specific modules as needed.</p><h3>Runtime Configuration</h3><p>MultiCloudJ is runtime-pluggable:<br>Create a maven profile for each cloud provider you support and include the provider specific modules in there.</p><pre>&lt;dependency&gt;<br>  &lt;groupId&gt;com.salesforce.multicloudj&lt;/groupId&gt;<br>  &lt;artifactId&gt;docstore-gcp&lt;/artifactId&gt;<br>  &lt;version&gt;0.2.2&lt;/version&gt;<br>&lt;/dependency&gt;</pre><h3>🧪 Example: Writing to a Document Store (DynamoDB)</h3><pre>CollectionOptions options = new CollectionOptions.CollectionOptionsBuilder()<br>    .withTableName(&quot;books&quot;)<br>    .withPartitionKey(&quot;title&quot;)<br>    .withSortKey(&quot;author&quot;)<br>    .build();</pre><pre>DocStoreClient client = DocStoreClient.builder(&quot;aws&quot;)<br>    .withRegion(&quot;us-west-2&quot;)<br>    .withCollectionOptions(options)<br>    .build();</pre><pre>static class Book {<br>        private String title;<br>        private Person author;<br>        private String publisher;<br>        private float price;<br>        private Map&lt;String, Integer&gt; tableOfContents;<br>        private Object docRevision;<br>    }<br>Book book = new Book(&quot;YellowBook&quot;, &quot;Zoe&quot;, &quot;Seattle&quot;, 3.99f, Map.of(&quot;Ch1&quot;, 5, &quot;Ch2&quot;, 10), null);<br>client.create(new Document(book));</pre><p>[github <a href="https://github.com/salesforce/multicloudj/blob/main/examples/src/main/java/com/salesforce/multicloudj/docstore/Main.java">ref</a> for the complete example]</p><p>To switch to Google Firestore or Alibaba Tablesore, simply change the provider, the resources such as table name in this case — <strong>no changes to your business logic</strong>.</p><h3>🧱 Built With Production in Mind</h3><p>MultiCloudJ isn’t an experiment — it powers internal services at Salesforce that need to</p><ul><li>Run seamlessly in AWS, GCP, and Alibaba Cloud</li><li>Serve global enterprise traffic</li></ul><h3>🔗 Explore &amp; Contribute</h3><ul><li><strong>GitHub</strong>: <a href="https://github.com/salesforce/multicloudj">github.com/salesforce/multicloudj</a></li><li><strong>Documentation</strong>: <a href="https://opensource.salesforce.com/multicloudj/">opensource.salesforce.com/multicloudj</a></li><li><strong>Examples</strong>: Real usage samples in the <a href="https://github.com/salesforce/multicloudj/tree/main/examples">examples</a> module</li></ul><p>We welcome contributions, feedback, and ideas — from cloud SDK enthusiasts to enterprise architects.</p><h3>✅ Conclusion</h3><p>MultiCloudJ brings <strong>clarity, consistency, and control</strong> to an increasingly multi-cloud world. Whether you’re building a cross-cloud pipeline, prepping for a cloud migration, or avoiding lock-in altogether, MultiCloudJ offers a powerful abstraction to build upon.</p><p>If you’re writing cloud-native Java, <strong>you shouldn’t have to pick sides</strong> — and now, you don’t have to.</p><p>Want help getting started or embedding MultiCloudJ into your platform?<br> We’re happy to collaborate — open an issue on GitHub or fork the project today.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33f94d4211eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>