Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-416

Samza Configuration DSL

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      The user-facing language for Samza configurations is currently Java Properties. While this works for the time being and simple to implement, it is verbose and cumbersome for the end user.

      Since SAMZA-40 is opened to refactor the way Samza configuration is wired and SAMZA-348 is opened to allow Samza jobs to be configured through a stream, it is thus natural to consider a scripting model for configuring Samza jobs.

      One approach would be to implement a DSL in a scripting language like Python. Implementing a Python DSL is actually very easy to do, and there are many examples of Python DSLs in non-trivial use cases, most notably, Google's build system, Blaze. I found a GitHub Gist containing a more detailed example of a Blaze BUILD file. Blaze also inspired a number of open source clones, most notably Twitter Pants.

      Another idea, by jonbringhurst from SAMZA-348:

      Regarding the client commands to create and modify Samza jobs (such as configure-job and run-job), it may be useful to review existing commands that perform a similar role:
      My personal favorite is Slurm's set of client commands, of which sbatch is probably the most relevant (http://www.schedmd.com/slurmdocs/sbatch.html).
      To go back a bit further in history, it might be a good idea to take a look at the POSIX qsub style command from PBS/Torque (http://docs.adaptivecomputing.com/torque/4-1-4/Content/topics/commands/qsub.htm). Moab's msub also follows this design.
      Regarding a possible DSL for building configuration, it may be useful to look at Slurm's lua callback for job configuration (warning, GPLv2 code) https://github.com/SchedMD/slurm/blob/master/contribs/lua/job_submit.lua

      We could, of course, have both a command line tool and a DSL, and I am sure once Samza takes off, there will be people implementing DSLs for other language clients as well. The key would be to implement a standard interface for these different implementations to talk to.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              davidzchen David Chen
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: