<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: dtnf45</title>
    <description>The latest articles on DEV Community by dtnf45 (@dtnf45).</description>
    <link>https://dev.to/dtnf45</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F776384%2F518167e6-1941-4e42-8f1a-b5d4d147cdb2.png</url>
      <title>DEV Community: dtnf45</title>
      <link>https://dev.to/dtnf45</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/dtnf45"/>
    <language>en</language>
    <item>
      <title>Task Workers in Netflix Conductor - Orkes</title>
      <dc:creator>dtnf45</dc:creator>
      <pubDate>Tue, 01 Feb 2022 19:36:18 +0000</pubDate>
      <link>https://dev.to/orkes/task-workers-in-netflix-conductor-orkes-1p3i</link>
      <guid>https://dev.to/orkes/task-workers-in-netflix-conductor-orkes-1p3i</guid>
      <description>&lt;p&gt;A worker is responsible for executing a task. Operator and System tasks are handled by the Conductor server, while user defined tasks needs to have a worker created that awaits the work to be scheduled by the server for it to be executed. Workers can be implemented in any language, and Conductor provides support for Java, Golang and Python worker framework that provides features such as polling threads, metrics and server communication that makes creating workers each.&lt;/p&gt;

&lt;p&gt;Each worker embodies Microservice design pattern and follows certain basic principles:&lt;/p&gt;

&lt;p&gt;Workers are stateless and do not implement a workflow specific logic.&lt;/p&gt;

&lt;p&gt;Each worker executes a very specific task and produces well defined output given specific inputs.&lt;/p&gt;

&lt;p&gt;Workers are meant to be idempotent (or should handle cases where the task that partially executed gets rescheduled due to timeouts etc.)&lt;/p&gt;

&lt;p&gt;Workers do not implement the logic to handle retries etc, that is taken care by the Conductor server.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementing a Task Worker
&lt;/h2&gt;

&lt;p&gt;To create a worker, implement the Worker interface.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;public class SampleWorker implements Worker {

    private final String taskDefName;

    public SampleWorker(String taskDefName) {
        this.taskDefName = taskDefName;
    }

    @Override
    public String getTaskDefName() {
        return taskDefName;
    }

    @Override
    public TaskResult execute(Task task) {
        TaskResult result = new TaskResult(task);
        result.setStatus(Status.COMPLETED);

        //Register the output of the task
        result.getOutputData().put("outputKey1", "value");
        result.getOutputData().put("oddEven", 1);
        result.getOutputData().put("mod", 4);

        return result;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  More Details
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://orkes.io/content/docs/how-tos/task-configurations"&gt;https://orkes.io/content/docs/how-tos/task-configurations&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Follow and star us on GitHub for updates&lt;br&gt;
&lt;a href="https://github.com/Netflix/conductor/"&gt;https://github.com/Netflix/conductor/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Join the Slack Community Channel at &lt;br&gt;
&lt;a href="https://join.slack.com/t/orkes-conductor/shared_invite/zt-xyxqyseb-YZ3hwwAgHJH97bsrYRnSZg"&gt;https://join.slack.com/t/orkes-conductor/shared_invite/zt-xyxqyseb-YZ3hwwAgHJH97bsrYRnSZg&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>git fork vs git clone on a command line</title>
      <dc:creator>dtnf45</dc:creator>
      <pubDate>Fri, 17 Dec 2021 22:26:53 +0000</pubDate>
      <link>https://dev.to/dtnf45/git-fork-vs-git-clone-on-a-command-line-562</link>
      <guid>https://dev.to/dtnf45/git-fork-vs-git-clone-on-a-command-line-562</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Whats the difference between a fork and a clone?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;fork&lt;/strong&gt;: you are creating a copy of the repository using your github id (if you are using github). If you create changes it the forked repository, you have to create a pull request to the original repository&lt;/p&gt;

&lt;p&gt;technically fork is not a git command. So you will have to use something that is available on Github, GitLab etc..&lt;/p&gt;

&lt;p&gt;If you are using Github. First install &lt;code&gt;gh&lt;/code&gt;. Eg. on a mac&lt;/p&gt;

&lt;p&gt;&lt;code&gt;brew install gh&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To login:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gh auth login --web&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To fork a repo: E.g to fork Netflix Conductor repo&lt;/p&gt;

&lt;p&gt;&lt;code&gt;gh repo fork https://github.com/Netflix/conductor.git --clone&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;clone&lt;/strong&gt; Cloning a repo will create a local copy on our computer so that it can sync between both the local and remote locations of the repo. Cloning is good when you want to get your own copy of a repository where you may not be contributing to the original project.&lt;/p&gt;

&lt;p&gt;To clone:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;git clone https://github.com/Netflix/conductor.git&lt;/code&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
