Skip to content

Push tcp #2

Merged
merged 18 commits into from
Dec 7, 2017
Merged

Push tcp #2

merged 18 commits into from
Dec 7, 2017

Commits on Dec 7, 2017

  1. Clean up indentation mix

    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    d632ac4 View commit details
    Browse the repository at this point in the history
  2. Dereference CLP tcp socket after hangup

    We have a small leak here, that clp sockets keep referenced after the
    peer closed. Fix.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    c908546 View commit details
    Browse the repository at this point in the history
  3. Remove mlx ping

    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    0f58943 View commit details
    Browse the repository at this point in the history
  4. Import Donald::Select into script

    The design of Donald::Select makes use of Donald::Callback objects,
    which are objects conainting a sub and call arguments. However,
    because of the pattern
    
        sub do_something_later() {
            my ($cb_or_sub,@args)=@_;
                $store_callback_somehere=new Donald::Callback($cb_or_sub,@args);
            }
    
        do_something_later(\&callback,$arg1,$arg2)
    
    the caller doesn't have a reference to the Donald::Callback object,
    which makes its diffucult to identify it, e.g. to cancel the callback.
    
    We want to change the design to accept only references to subs as
    callbacks. Instead of passing arguments, we exepect the caller to make
    use of closures to pass data to the callback if needed.
    
        sub do_something_later() {
            my ($cb)=@_;
            $store_callback_somewhere=$cb;
        }
    
        do_something_later(sub{callback($arg1,$args)});
    
    Instead of changing the API of Donald::Select, we import the code
    directly into clusterd to make the modifications here.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    26bc5ad View commit details
    Browse the repository at this point in the history
  5. Rename Donald::Select to My::Select

    Use the namespace My:: for packages declared inside the main script.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    35aea6f View commit details
    Browse the repository at this point in the history
  6. Remove declarations no longer needeid after import

    We imported some lines which do no longer have a function now. Remove
    them.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    23ab0c9 View commit details
    Browse the repository at this point in the history
  7. Remove unused sub heartbeat.

    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    20de356 View commit details
    Browse the repository at this point in the history
  8. Remove/fix some comments

    Non-functional change to bring source into sync with another working
    branch.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    7ed96d6 View commit details
    Browse the repository at this point in the history
  9. Remove My::Callback

    Use refenerces to subs as callback arguments. If the caller wants to
    pass additional arguments, he can use closures.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    3901aa7 View commit details
    Browse the repository at this point in the history
  10. Remove/Move imports

    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    fa4a96e View commit details
    Browse the repository at this point in the history
  11. Remove clp_sockets hash

    This hash is not used but it prevents these sockets to be able to
    be closed by running out of scope.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    e61ecda View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    01e9dc4 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    676ca6d View commit details
    Browse the repository at this point in the history
  14. Add command "clusterd push files..."

    The command "clusterd push file..." has a new syntax with a command
    verb. (as opposed to "clusterd --push file")
    
    The push command is distributed via the area routers to the cluster
    daemons on all nodes. It is intended that the cluster daemons call
    back over tcp to the originator to pull the file if needed.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    305be8a View commit details
    Browse the repository at this point in the history
  15. Implement PUSH in daemon

    When a daemon receices a push command, it checks whether it already has
    the offered file or not. If not, it calls back to the daemon where the
    push originated and pulls the file over tcp.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    8195517 View commit details
    Browse the repository at this point in the history
  16. Implement PULL in daemon

    Implement the server side to pull a file over tcp.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    fee25eb View commit details
    Browse the repository at this point in the history
  17. Increase TCP timeout from 5 to 30

    While 5 seconds seems to be enough for normal behaviour, we might need
    more time if the daemon is slowed down .e.g. by strace.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    1b1370d View commit details
    Browse the repository at this point in the history
  18. Increase listen queue size for clp port

    With 234 hosts pulling a file we failed to service a single on with the
    old setting listen=1.
    donald committed Dec 7, 2017
    Configuration menu
    Copy the full SHA
    d1e725e View commit details
    Browse the repository at this point in the history