Skip to main content

Application Development

info

This guide assumes you've followed the steps and read the two previous pages, quickstart and capability driven development.

Now that you've gone through two tutorials and launched your first Cosmonic application, you may have a few questions as you look to move beyond the quickstart. During the tutorials we take care of a few things for you so you can get started quickly, and at this point you can dive deeper into more core concepts.

What's Next?

Depending on your idea, or your business requirements, you'll make use of even more capabilities to create your application. Check out the capabilities section to see what capabilities you can use today. Generally, application development with Cosmonic follows a few key steps:

  1. Come up with an idea for an application
  2. Generate a starter project with cosmo new actor hello
  3. Consider the capabilities that your project needs.
  4. Write, edit, and test code using language tools
  5. Deploy and validate your application with cosmo launch
Considering Capabilities

Step 3 above is likely going to be a significant shift from how you develop applications today, but the benefits of greater security and looser coupling to non-functional requirements make it well worth the thought exercise. Though you can select specific vendors at this stage (e.g. PostgreSQL to satisfy a SQL database capability), the capabilities that your project needs are generally tied to requirements, not implementation details. To illustrate this process, consider some examples:

RequirementsCapabilitiesImplementations
An application that serves a RESTful HTTP API, persists data in a SQL store, and writes occasional debug logsHTTP Server, SQL Database, LoggingHTTP Server, PostgreSQL, and the built-in wasmCloud logging
An application that subscribes to an event stream of messages, storing insights in a lightweight cache for quick lookupsPubSub Messaging, KeyValue DatabaseNATS Messaging, Cosmonic Built-In Keyvalue or Redis

A huge advantage of building on wasmCloud means that if you're looking for a capability that isn't listed, you can write your own capability provider and our team would love to hear about your use case and help out however we can. Drop by our Discord and tell us about it!

More Terms

During the cosmo tutorials we take care of some additional steps to fully create your application and give you the publicly accessible endpoint for testing. The items below outline the steps that the tutorials take and should serve as a list of considerations for developing outside of the tutorials.

  1. Downloading and installing the necessary networking server NATS and the WebAssembly runtime wasmCloud to run your actor
  2. Creating a new actor project using cosmo new
  3. Building and deploying your actor to a local wasmCloud host using cosmo launch
  4. Launching capability providers and linking them to your actor to fulfill capability requirements at runtime
  5. Creating a wormhole, a secure HTTP endpoint that allows you to send requests to your locally running actor

As you work through some of the terms above, if you have any questions, please reach out to us on Discord. The next section in the documentation is the user guide, which walks through the different sections of the Cosmonic user interface and how you can run and manage applications from the canvas.