W
Wasp2mo ago
ayo

microservice

Is wasp built to be used in a microservice architecture or is it not encouraged?
6 Replies
kapa.ai
kapa.ai2mo ago
Hi @ayo. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
MEE6
MEE62mo ago
Wohooo @ayo, you just became a Waspeteer level 1!
kapa.ai
kapa.ai2mo ago
---------------------- Wasp is not specifically built for microservice architecture, but it can be integrated into such a setup. Here's what we know based on the provided information: 1. Wasp is primarily designed as a full-stack web application framework, focusing on connecting the client, server, and database components Introduction (https://wasp-lang.dev/docs). 2. However, Wasp can be used alongside other services in a microservice-like architecture. A community member described a scenario where Wasp can act as a main/proxy server, communicating with other specialized servers or services Discord support thread: Running alongside separate authed API? (https://discord.com/channels/686873244791210014/1214656571787710474): "This is really a quite typical micro-service concept -> you have one main/proxy server (Wasp server), and then one or multiple servers(services) that are specialized for specific tasks and are not directly exposed to the user's, but are instead communicating with the main/proxy server, and are 'hidden' in that way." 3. In this setup, the Wasp server can handle user authentication and authorization, then communicate with other services as needed. This allows you to leverage Wasp's built-in features while still maintaining a distributed architecture. 4. Wasp also provides the ability to create custom API endpoints, which can be used to interact with external services or microservices Discord support thread: Running alongside separate authed API? (https://discord.com/channels/686873244791210014/1214656571787710474). While Wasp isn't explicitly designed for microservices, it can be adapted to work within such an architecture. The decision to use Wasp in a microservice setup would depend on your specific requirements and how well Wasp's features align with your needs. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ---------------------- Sorry @ayo, I seem to be having a bit of trouble. Don't worry though, I've pinged my support and they will try to fix me up! :technologist: Perhaps try again in 15mins?
martinsos
martinsos2mo ago
Wasp is for now more of a monolith. That said, you can call other microservices from it, why not, and you can also use its api from anothe rmicroservice, so yeah, that works, but if you need just an API, then you don't really need Wasp, expressJS will be enough on its own.
ayo
ayoOP2mo ago
@martinsos so from a service pov, it make sense for the other microservices to serve exlressJS endpoints? Solely from a consistency perspective
martinsos
martinsos2mo ago
If they are used from Wasp? If they are exposing REST API, then it doesn't matter what they are running on, be it node with express, or go, python, whatever. So normally it doesn't matter. It can helpful if the same person / team is maintainng them to use the same tech though, so you don't have to know multiple languages / libraries.
Want results from more Discord servers?
Add your server