What problems solace solves when I use an Async API

Options

What problems solace solves when I use an Async API where I clearly define the spec that has the channels , payloads , whats the role of Solace when you use an Async API.

Answers

  • himanshu
    himanshu Member, Employee Posts: 67 Solace Employee
    Options

    Hi @rramakrishnan ,

    AsyncAPI is an open standard for defining the specs for your event-driven architecture (EDA). It's not tied down to a specific event broker that is used during the runtime. You can use Solace or any other broker that supports AsyncAPI.

    In many large organizations, there are more than one brokers being used so AsyncAPI is a handy tool to standardize the specs across different brokers. You can use a design-time tool like Solace's Event Portal to define, govern, architect and catalog your applications, events and schemas and then generate AsyncAPI specs for your applications from Event Portal. You can then take that spec and generate code using any of the supports code-generation tools.

    Here is a blog post you will find handy:


    Hope that helps!

  • rramakrishnan
    rramakrishnan Member Posts: 4
    Options

    Thanks , there is confusion on the problems solved by Async API , one critical verbage you used is “ Async API is a spec used to describe event driven applications” , can it be used to define a spec for an event driven micro services which has Apis and events , example a simple order service that has Apis to create orders at the same time publishing key domain events , can there Async api used to describe an event driven micro service

  • himanshu
    himanshu Member, Employee Posts: 67 Solace Employee
    Options

    Hi @rramakrishnan - Sure, it doesn't matter whether the application is a monolith or a microservice...whether it is using Java or Python. What's important here is how it is publishing/consuming events and those specs are captured via AsyncAPI.

  • Tamimi
    Tamimi Member, Administrator, Employee Posts: 522 admin
    Options

    @rramakrishnan if you are referring to APIs as REST APIs then you will need to use OpenAPI spec to define your REST based APIs. Basically think of AsyncAPI to event APIs what OpenAPI is to REST APIs. So if your microservice publishes key domain events you can use AsyncAPI to define those events. As what Himanshu mentioned, the key concept with AsyncAPI is to capture how application is publishing/consuming events.

  • rramakrishnan
    rramakrishnan Member Posts: 4
    Options

    @Tamimi there are cases where a micro service can expose commands in the form of rest APIs and also produce events , in this case should one have to define a rest api using open api spec and another using Async api for events ?