Api idés
jan <[email protected]>
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi All, To keep current code light, i think a api interface is one possibly way to go for development of different management tools. A example for run length encoded minimal api would be: ! Common API framework for Keepalived front daemon's ! ! Purpose to simplify development of different tools and ! front engines for example to a cli interface. ! ! Ide is to have both cmd, message length in int ! and converted to one or more bytes via encoder ! ! It's based on a socket style and minimize bytes to/from clients ! ! All keywords are int from yacc/bison then converted to encoded bytes ! ! +----------len------+ every packet have [len][cmd]=[arg1]=[arg..N] specal byte f1 = delimiter symbol = f2 = query symbol ? f3 = respond symbol : f4 = request_id symbol $ len = encoded byte length cmd = encoded byte by int of login,quit,global_defs,virtual_server,etc.... arg = id -> int from parser separator = delimiter space or / query ? respond : respond codes ok,fail,close = 1,2,3 (int) to f3, so we have a word in answer. request_id user generated. message can be asynchronous and answer in different orders. encoded length -> 0 - 7f 1 byte 80 - 3fff 2 byte 4000 - 1fffff 3 byte 200000 - fffffff 4 byte 10000000 - fffffffff 5 byte request_id is time stamp value for match answer in a reply. example for a cmd: [len]?global_defs=smtp_server<!request_id> ( <10 bytes in this example) response from keepalived: [len]:ok ( 3 bytes in accept answer ) and some usec later [len]:reply=<some_data>!<request_id> another example login: [len]login ( 2 byte ) answer: [len]:ok ( 3 byte ) [len]:reply=<salt value> ( 4 byte + salt length ) Use salt + combine password + name [len]login=name=<username>=password=<password><$reqid> answer: [len]:ok ( 2 byte ) regs /Jan Holmberg ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Keepalived-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/keepalived-devel