Apps - Snowflake Applications Overview - Part II
1. Apps - Snowflake Applications Overview - Part II
Earlier, we introduced the notion of an application. We talked about app architecture concepts, especially front-end and back-end. We talked about Snowflake’s drivers and connectors. We talked briefly about the Snowflake Python API. And we Introduced Hybrid Tables, which support transactional workloads. In this video, we’ll talk through some stylized app stacks that incorporate Snowflake to greater or lesser degrees. So here’s what I’m trying to convey through this chart – If you wake up one morning, and you’re like: “You know what? I want to have Snowflake as part of my app infrastructure,” the first big decision you need to make is whether you want to host the front-end of the app outside of Snowflake’s infrastructure and you want to use Snowflake as the backend (roughly speaking) – that’s this first set of two sample architectures on the left. OR do you want to host the entire thing in Snowflake – including the front-end – to bring your code closer to the data. And again, for the non-apps folks, you can think of the front-end as the user-facing part of the app – the UI, etc. – and the backend as the part that controls the logic and the data flows. Let’s talk more about the first option – hosting your front-end outside of Snowflake, but using Snowflake as the backend. Here’s one example – If you have a Javascript front-end, like React, you could say: “You know what? This is a data-intensive app, and I really like Snowflake for its near-unlimited scalability, so when users interact with my app and their interaction data gets stored, I want that to be sent to Snowflake using a Driver.” (In this case you’d probably use Node.js because you’re already working in Javascript.) In the next example, let’s say you’re a Python developer, and you really like Django or open-source Streamlit. You could create your front-end using one of those, and then you could, say, connect to Snowflake using the Snowflake Connector for Python, execute some SQL using the connector, write to a Hybrid Table, and also use the Python API to manage Snowpark Container Services and maybe tasks associated with that service. All in Python. Okay, so we’ve talked about how you could create an app built on Snowflake if you wanted to treat Snowflake as the back-end. But you also have the option, shown on the right, of actually using Snowflake for everything. Maybe you want to lower latency, and having everything hosted in Snowflake is just faster for your use case. Maybe you have security or regulatory concerns. Maybe you have less experience with traditional web development, and you’d really like to shorten your time to market. Maybe you care about scalability, high availability, or the reduced operational burden of working with Snowflake. Lots of possibilities. Scenarios like these are where Snowflake really shines. Instead of being part of a broader application stack, it, in fact, becomes the entire stack for the application. Let’s first talk about what this would mean if you used Streamlit in Snowflake as your front-end. Streamlit is a popular, open-source framework for building powerful applications with beautiful user interfaces, all in Python. It’s available directly within Snowflake as Streamlit in Snowflake, which we’ll test out in a future video. This means you can use it *within* your Snowflake account. No need to move data or integrate your code with external technologies. An entire application, built and deployed in Snowflake! With Streamlit in Snowflake: One, your application front end will built using Streamlit (i.e., Python) Two, our application logic can be powered by Snowflake SQL or Snowpark for data transformations, by UDFs, by stored procedures, by tasks, and more Three, there’s no headache around where to deploy and host, since Snowflake is the application hosting infrastructure, and this means your app is easy to roll out and share And four, you can share your application easily And finally, you could decide that you didn’t want to use Streamlit as your front-end – you really like React, say – and instead you could host that front-end inside Snowpark Container Services. That way, everything still lives inside your Snowflake account, with all the benefits that come from that. The last thing I wanted to cover here is one great way you can share your app with the world once you’ve built it. Snowflake has something called the Snowflake Native App Framework, which lets you bundle up your application logic into an application package, list it on the Snowflake Marketplace, and allow consumers to try with Snowflake’s trial, purchase and install it in their Snowflake account and power it using their own compute. So if this sounds exciting to you, definitely look into Snowflake Native Apps. Okay, to recap, here’s what we covered in Parts I and II of our Snowflake Applications Overview. We introduced the notion of an application. We introduced app architecture concepts, especially front-end and back-end We introduced Snowflake’s drivers and connectors, like the Snowflake JDBC Driver, the Snowflake Connector for Python, the Go Snowflake Driver We introduced the Python API, which lets you manipulate Snowflake objects (like databases, schemas, tables, warehouses, and tasks), all from Python We introduced Hybrid Tables, which can support transactional workloads, but are still useful for analytics We introduced the idea that you can make an app with a front-end outside Snowflake that uses Snowflake as the backend through drivers and connectors We introduced Streamlit in Snowflake, and the idea that you could host your front-end in Snowpark Container Services and thus have your entire application’s architecture inside Snowflake And we introduced the Snowflake Native App Framework that allows you to build, distribute, and monetize your apps on the Snowflake Marketplace. We went through this at whirlwind speed, but I’m hoping it was still helpful no matter your background. If this is the first time you’ve ever heard the word “app,” I’m hoping you have a slightly better sense of what that might mean and how Snowflake could be a part of your app architecture. And if you’re an experienced app developer, I’m hoping you have a better sense of what’s possible with Snowflake. I’d like to finish with two very tactical piece of advices: One, if you’re integrating Snowflake into a larger stack, and not looking to do a major redesign of your app or build from scratch, go learn more about Snowflake’s drivers, connectors, and Python API. Two, if you’re starting fresh, and you’d prefer to build your whole app in Snowflake, Streamlit in Snowflake is a great place to start, and also a great jumping off point into Snowflake Native Applications. And on that note, let’s go through a quick example of Streamlit in Snowflake!2. Let's practice!
Create Your Free Account
or
By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.