wormhole-foundation / wormhole-explorer

We could have named this super-parakeet. Tweet tweet.
Other
30 stars 26 forks source link

[API] split api/v1 and v1 in diferent services #79

Open walker-16 opened 1 year ago

gabzim commented 1 year ago

Add motivation & value added from working on this.

walker-16 commented 1 year ago

Hi gaby, I add a little context about this task.

This task was created in order not to lose the idea and discuss it further, to be defined later if it makes sense to implement it.

Currently the api component contains 2 api: guardian and wormscan.

The doubt I have is from the wormscan api, from one side has generic wormhole endpoints and on the other side endpoints very focused to support the wormscan UI, they are different endpoints.

So, for a matter of separation of responsibilities of what each api should return and give clarity of the scope of the api. One api focuses on generic wormhole concepts (vaa/observations/governor) and the other api focuses on the endpoints needed to support the wormcan explorer UI.

Additionally, I understand that the endpoints are going to have different traffic, some endpoints directly by a clients of the api to know the status of vaa, observations.... and on the other hand the endpoints that the wormscan UI going to use, which would not be good that the traffic of one affects the traffic of the other.

Maybe an alternative is to have the same code base and have different deploy, to separate in a wormscan public api and have an api for wormscan UI backend.

But as I said initially, this is mostly for later discussion and has no priority for what is v1.