[sheepdog] [RFC] REST gateway design choice

Liu Yuan namei.unix at gmail.com
Sun Jun 30 11:57:38 CEST 2013


Hello list,

      I am writing REST gateway to support HTTP request via fastcgi. There is
one fundamental choice regarding where we put the code and both has pros and
cons:

 1. bulit-in the code inside the sheep binary
    pros:
     - share lots of infrastructure code, such as work queue, logger
     - simpler interface, just start 'sheep' as usual we gain REST gateway
       function, no extra parameter needed.
     - most efficient data transfer between sheep and REST code, no data
       transfer at all since they both reside in the same address space.

    cons:
     - if REST code panic, sheep panic. (We might need many code that emulate
       swift API that aren't necessarily included in the sheep binary)

 2. put REST gateway code in a standalone binary, switch the pros and cons of
    choice 1.

If we choose one method over another, we enjoy its pros and have to bear its
cons. Any comments?

Thanks
Yuan



More information about the sheepdog mailing list