Commits on Feb 19, 2014
  1. Add a global Ping/Pong protocol response

    Easier for quick connection testing.
    All tests pass.
    committed Feb 19, 2014
Commits on Feb 18, 2014
  1. Add Redis/RESP input parsing

    With this change, we should be able to let redis-cli connect to
    a oneshot_protocol server to issue commands and receive responses.
    Also, I remembered Erlang has a packet type of `line`, so I simplified
    the protocol parsing (removed manual newline detection, derp).
    Test added for inbound Redis protocol parsing.
    Also add some connection_close notifications so we can die immediately
    without lingering.
    All tests pass.
    committed Feb 18, 2014
Commits on Feb 14, 2014
  1. Convert protocol response to Redis format

    Protocol as defined at:
     - Erlang integers get returned as Redis integers.
     - Erlang binaries get returned as Redis bulk strings.
     - Erlang atoms null and undefined get returned as Redis Null.
     - Other Erlang atoms get returned as upper-cased Redis simple strings.
     - Erlang lists get convereted to Redis Arrays. (nested lists work too)
     - Responses of {error, Type, ErrorText} get returned as a Redis error.
       (Type is an atom that gets up-cased and ErrorText is a binary string)
    Tests added for basic protocol generation.
    All tests pass.
    committed Feb 14, 2014
Commits on Feb 13, 2014
  1. Add support for state pass-through to protocols

    The Bundler is an option you can pass to your protocol creation.
    The output of Bundler (a list) is prepended to the output list of
    any of your protocol parameters before being applied to your protocol
    action function.
    This change also requires protocol functions now be specified as
    {Module, FunctionAtom} instead of a direct fun function/arity as
    Each element in the return list of your Bundler increases
    the arity required of your handler functions.  Because we can't
    know the arity up front, we have to switch to apply/3 and away
    from calling Fun() directly.
    All tests pass.
    committed Feb 13, 2014
Commits on Feb 12, 2014
  1. Bump to version 1.8.0

    All 1514 tests pass.
    committed Feb 12, 2014
  2. Update README for github markdown

    Also update gitignore so tags don't slide in to the repo.
    committed Feb 12, 2014
  3. Update supervisor for capability added in R14B03

    It's been a few years.  We can assume people are on R14B03+ by now.
    All tests pass.
    committed Feb 12, 2014
  4. Add oneshot protocol parser with event runner

    Now you can create your own text-with-new-line-terminator
    protocols and have a function run when the command is entered.
    Your command can have position arguments (e.g. SERVICE LAUNCH 3 SERVERS)
    or no arguments (SERVICE STATUS) and you can have trees of arguments
    See the oneshot_protocol.erl and oneshot_protocol_tests.erl for
    It works like other parts of oneshot.  You just need to give it an IP,
    port number, and the name (or table id) of an ETS table to lookup
    the intial service switcher.  (The service switcher is the first
    argument given in the command, so command REDIS LAUNCH SERVER has
    swervice switcher of "redis" — see the tests for how it all ties
    committed Feb 12, 2014
Commits on Feb 5, 2014
  1. Lower eunit concurrency to 100 from 1500

    OS X 10.9 has annoyingly low open file limits. The
    old eunit tests were running 1500 connections in parallel,
    which new OS X doesn't like.
    Now we limit the tests to running 100 in parallel (instead of
    the old running all 1500 at once).  Limiting to 100 seems to work
    fine with default OS X 10.9 ulimits.
    committed Feb 5, 2014
  2. Fix README for proper markdown parsing

    Matt from three years ago really sucks at markdown
    (or, the markdown spec is pretty horrible in that it
    requires a new line between regular text and indented
    code blocks)
    committed Feb 5, 2014
Commits on Aug 5, 2011
  1. Bump oneshot version to 1.7.0

    Major new features include:
      - More async accepting (the client init functions
        aren't blocking listening anymore)
      - Custom launching M, F, A instead of forcing a zero-argument start_link
      - Better code organization
      - More standardized naming
      - No more linking to child processes
      - Also disabling trap_exit in oneshot_server altogether
    committed Aug 5, 2011
  2. Expand API and add supervisor for launching listeners

    The supervisor (and oneshot_server:start_link/{3,4,5}) can
    launch oneshot_servers with the client processing function
    being either a fun() or full M, F, A layout.
    Previously you could specify only a fun() or a module name that
    would get automatically start_link'd.  We aren't linking client
    processes to the oneshot_server anymore, so a default function
    of start_link is unnecessary.
    Also, now you can provide a set of arguments to pass to each new
    client processing module when using M, F, A start options.
    committed Aug 5, 2011
Commits on Aug 3, 2011
  1. Make async accepting even more async

    Previously, if we were spawning a new gen_server on each
    new connection, then gen_server init/1 call would block
    new connections from being accepted until it returns.
    Now, we immediately spawn a helper process when we accept a
    new connection, spawn the actual client process,
    and finally we notify the spawned process after it has control
    of the client socket.
    Client sockets are only "owned" by one process at a time,
    so ownership passes from oneshot_server to the temporary
    spawned process, then the temporary spawned process passes
    ownership to the spawned process of the client.
    committed Aug 3, 2011
Commits on Feb 13, 2011
Commits on Feb 8, 2011
Commits on Feb 7, 2011
  1. Initial oneshot commit

    committed Feb 7, 2011