System design: design a rpc framework
Check eureka for design details
Service provider registers itself on the config center on start
Service consumer fetchs(and caches) endpoint info
Message format
- interface
- method
- paramType
- paramVal
- requestId - identify + request id so that multiple threads can issue same method concurrently
Registry:
- Class
- hostName
- ip
- port
Use ZK
- For each interface’s each method to register a emphor node, use key as the id for the method, data is the service list