ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: Stanislav Ievlev <stanislav.ievlev@gmail.com>
To: devel@lists.altlinux.org
Subject: [devel] Q: future of alterator backends
Date: Wed, 28 Oct 2009 21:35:36 +0300
Message-ID: <c5318fd90910281135y1ea7a4a4w25a5cf3467f0cacb@mail.gmail.com> (raw)

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.


             reply	other threads:[~2009-10-28 18:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-28 18:35 Stanislav Ievlev [this message]
2009-10-28 20:11 ` Anton Farygin
2009-10-28 21:33   ` Mikhail Efremov
2009-10-29  6:16     ` Anton Farygin
2009-10-29 12:29       ` Mikhail Efremov
2009-10-29 14:56         ` Anton Farygin
2009-10-30  7:21           ` Stanislav Ievlev
2009-10-30  7:19     ` Stanislav Ievlev
2009-10-30  7:18   ` Stanislav Ievlev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c5318fd90910281135y1ea7a4a4w25a5cf3467f0cacb@mail.gmail.com \
    --to=stanislav.ievlev@gmail.com \
    --cc=devel@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git