Docs GODI Archive
Projects Blog Link DB

Search GODI:


More options
File lib/ocaml/pkg-lib/hydro/hydro_netplex.mli GODI Package godi-hydro
Library hydro
 
   Hydro_netplex.html    hydro_netplex.cmi_pretty    hydro_netplex.mli    Sources  
(* $Id: hydro_netplex.mli 15689 2007-12-13 22:28:57Z gerd $ *)

(** Netplex support for Hydro servers (TCP only) *)

open Netplex_types

val hydro_factory :
      configure:(config_file -> address -> 'a) ->
      ?hooks:('a -> processor_hooks) ->
      ?supported_ptypes:parallelization_type list ->
      name:string ->
      sys:Hydro_types.system ->
      setup:(Netplex_types.container -> Hydro_endpoint.Server.t -> 'a -> unit) ->
      unit ->
         processor_factory
  (** A factory for TCP-based Hydro servers. In [name] the name of the processor
    * is defined. This name can be referenced from the config file like:
    *
    * {[
    *    processor {
    *        type = "the passed [name]";
    *        ...
    *    }
    * ]}
    *
    * Currently, there are no parameters in the config file.
    *
    * Parameters and subsections can be defined by the user, however. These
    * parameters should be parsed and checked for correctness by the
    * [configure] callback. The result of [configure] is also passed 
    * to [setup] and other optional functions. The [configure] function is
    * called just before the service is
    * added to Netplex (i.e. from the controller context).
    *
    * The return value of [configure] can be of any type. This value
    * exists once for every time the processor is instantiated (used) by a
    * service. It is not only useful for passing configuration values
    * down, but also for storing intermediate results while establishing
    * the service.
    *
    * The [Hydro_endpoint.Server.t] structure is created every time a new connection
    * is accepted. Of course, this is done from the context of the container.
    * This structure is created without any binding; the user must
    * bind procedures in the [setup] function. This can be done by calling
    * [Hydro_endpoint.Server.bind_adapter].
    *
    * @param hooks An optional function returning the hooks to call.
    * See [Netplex_types.processor_hooks] for documentation.
    *
    * @param supported_ptypes Which parallelization types are supported
    * by the service. By default, only multi-processing 
    * is included in this list (Hydro still lacks multi-threading support).
   *)
This web site is published by Informatikbüro Gerd Stolpmann
Powered by Caml