Hacker News new | ask | show | jobs
Show HN: OPEN SOURCE scalable BACKEND services generator + util \m/ (github.com)
3 points by travolque 3232 days ago
1 comments

Setting it up, looks great. I have a question though.. what's the difference between server api and client(s) api(s) JSON config?
I'll answer using an example. Let's say you are building the hacker news backend. You decided to divide it into two services:

+ [main] service: handles posting, comments, votes, ...

+ [auth] service: handles authentication users' requests (e.g.: using oauth 2)

Every time [main] receives a requests, it forwards the auth creds to the [auth] service for authentication.

When you generate the [main]:

+ server api config: will contain the api for the requests [main] receives (e.g.: post, upvote, ...)

+ client api config: will contain the api for the [auth] service since the [main] will be a client for the [auth] server

Another example would be a backend service that needs to pull data from third-party services (e.g.: instagram api, twitter api, ...). In that case the client api config will contain the api for those third-party services.

This tutorial explains in depth the config file's structure: https://github.com/vangav/vos_backend/blob/master/README/04_...

Instagram test example [https://github.com/vangav/vos_instagram_test] utilizes client api by including the client apis for the main and dash board services to test them. Check the service's generator config @ https://github.com/vangav/vos_instagram_test/tree/master/gen...

Please let me know if you have any more questions or need help using it :))