From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on sa.int.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,SPF_PASS autolearn=ham version=3.2.5 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=MJWCITguRhQaIyp9inM82n1LFys/cRXq7O8zErDJ60Q=; b=wxMdaOm7kAjsBP63GqWJGD72Jg9hNh8H4Ueip7b3Zsz0vn+lQVlmUzS4zihVY2f3Pu GzwhkMpijxYJ6aOqAPhvXbhaK2vkEZUQHAi+IvNzjayFX22Lr9QP+I0MVZ5enH38xu1e whylU2F9zhizttbMxNtntwBqBdk1NHq/Vpb0U= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=CXBeBwf/v2J14qr0szbudl3+Hv2p4e2074GB3PL+mEYtoCihPwJsDp95X3RK8pfXrO x7k+5CGbU7818+VIO8NV01eTCcr4wZ82ktE2DFb5YWVIZHpzYoT2iE/J6qWOT/ExWj/f My0daFZxGcgJLYPZI5PgWRpYPloU1KHqlkTgA= MIME-Version: 1.0 Date: Wed, 28 Oct 2009 21:35:36 +0300 Message-ID: From: Stanislav Ievlev To: devel@lists.altlinux.org Content-Type: text/plain; charset=ISO-8859-1 Subject: [devel] Q: future of alterator backends X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Oct 2009 18:35:53 -0000 Archived-At: List-Archive: List-Post: Greetings! This is a proposal of a new alterator features. Your comments are welcome ;) alteratord service is going towards a RPC model. At the first stage, I'm planning to replace a single message handler with a several "export" instructions. Current backend: -- alterator_api_version=1 . alterator-sh-functions ... message_handler() { case "$in_action" in type) write_type_item a ipv4-address write_type_item b hostname ;;; foo) foo ;; bar) bar ;; ... esac } message_loop -- New style backend will look like: -- alterator_api_version=1 . alterator-sh-functions .... alterator_export_var a ipv4-address alterator_export_var b hostname alterator_export_proc foo alterator_export_proc bar message_loop -- Current backend call from client's code: -- (woo-read "/backend" action "foo" a "value1" b "value2") ... (woo-read "/backend" action "bar" a "value1" b "value2") -- New style backend call from client's code: -- (woo-call "/backend/foo" arg1 "value1" arg2 "value2") (woo-call "/baclend/var" arg1 "value1" arg2 "value2") -- All other processing (global "in_" variables and functions to send answer from backend) and underlying protocol remains without changes at this stage. This allow us to prepare all existing code for the subsequent transformations. At the next stage I will replace a global incoming variables "in_" with a usual function arguments. -- With best regards Stanislav Ievlev.