ALT Linux Team development discussions
 help / color / mirror / Atom feed
* [devel] Q: future of alterator backends
@ 2009-10-28 18:35 Stanislav Ievlev
  2009-10-28 20:11 ` Anton Farygin
  0 siblings, 1 reply; 9+ messages in thread
From: Stanislav Ievlev @ 2009-10-28 18:35 UTC (permalink / raw)
  To: devel

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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-10-30  7:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-28 18:35 [devel] Q: future of alterator backends Stanislav Ievlev
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

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