Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 983 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 983 Bytes

XSVC

1. Dependencies :

Nothing

2. Protocol

{start:'', request : type_of_request , params : {...}, end:''}

  • req = {start:'' , request : 'addNumbers' , params : {numbers : [1,2,3,4]} , end:''}

if request is sent to router, router pass it to the corresponding server and get the response.

  • res = {start:'' , request : 'response' , result : {value:10} , end:''}

3. Service Registration (request from Service server to Router)

  • request : 'register', params : {handlers : ['addNumbers','subNumbers',...]}

4. Service Provider specification

Get request and return response as request

  1. Register to server router
  2. Get request from router and return to router with {request : 'response'}, returning message must have {request:'response'}, otherwise service will fall into infinite loop.

Dons and Todo

Done :

  • xsvc.js router, server and client
  • xsvj.php : server and client

Todo :

  • xsvc.cpp
  • xsvc.py
  • xsvc.go ...