Go with Workflows
Video size:
Abstract
Today’s business needs change rapidly and require great flexibility to adapt quickly and efficiently with zero impact on the current process.
Go is a very reliable technology that has an amazing performance that allows these solutions to scale in volume, but still needs continuous customisation to include each new requirement.
Workflows with Go allow you to have all core functionality in Go and delegate the orchestration of business logic to a task flow that can be easily maintained and customisable for any business need.
Summary
-
Andela has matched thousands of technologists across the globe to their next career adventure. Now the future of work is yours to create. Anytime, anywhere. The world is at your fingertips.
-
Today's business requirements are changing and need a great flexibility to adapt quickly with zero impact in the working ecosystems. But constantly new integrations along with the rapid updates making hard to maintain in the long period. Andela will explain today how can prevent these or at least mitigate this using workflows.
-
Using a workflows tool we can create a flow of the business process using existing microservices. It is possible to define each step of the process, have full visibility of what is happening and change it at any moment. Some workflows also allow the direct integration with other types of objects.
-
I hope this talk makes it more clear what a workflow is, why we are using this technology, and what is the potential of having in your solutions. If you have any questions here, my contact information. Thank you for joining and have a nice day.
Transcript
This transcript was autogenerated. To make changes, submit a PR.
What if you could work with some of the world's most innovative companies,
all from the comfort of a remote workplace? Andela has
matched thousands of technologists across the globe to their next
career adventure. We're empowering new talent worldwide,
from Sao Paulo to Egypt and Lagos to Warsaw.
Now the future of work is yours to create.
Anytime, anywhere. The world is at your fingertips.
This is Andela.
Okay, I would like to share the agenda of this talk.
First I will make an introduction using some examples and comment
about the difficulties that it presents. Then I
will explain what is a workflow and how can we apply
this in our solutions. Then at the end,
I will make a quick demo to show how easy it can be implemented.
Let's start with the introduction. Go is an incredible
technology that has amazing performance, allowing solutions
to be available faster than ever with incremental daily
updates and with a great community continuously
improving the core base functionalities. Today's business
requirements are changing and need a great flexibility
to adapt quickly with zero impact in the working ecosystems.
Every company is going through this process and its own speed
and it has a different agenda. So they need to be prepared for
everything in order to maintain the integration between them.
Let's have an example of a driver application. We have a passenger
that can request a trip, make a payment, a driver
that gets a notification of these, trip accepts it and then bill
for each trip. It looks simple. Now until we see all
the integrations. Here you can see all the subsystems
and these integrations with all the microservices including the
external systems. So let's think now just a single
task with a client that has a need to know the status of an order.
Some of them will integrate with our public endpoint to get information,
other will request us to use the webhook to inform them any
updates. Another will request a file transfer using SFTP.
As you can see, the main requirement is clear, but implementation of
each will change depending on the needs of the business. We can create this integration
to include all the business needs and add conditionals for each situation,
making a big custom solution for everyone. But actually all
these change are constantly new integrations along with the rapid
updates making hard to maintain in the long period. So it
will create the need of a reward to make it smaller and stable again.
So I will explain today how can prevent
these or at least mitigate this using workflows.
So why workflows? Any system is different from
each other and there are multiple ways to organize teams around it. But let
me share my experience on how we have been working and the
things we learn. First we need to have can idea of the business logic,
know the areas and try to focus our teams around them.
This way we can have a clear scope of the requirements in order
to solve them. Now assume that we know where exactly a
new requirement will have an impact and focus the correct teams
to make those changes in their particular areas. We will allow
them to measure the effort, define what microservices
will be affected or if we really need one.
However, decoupling the logic into teams and raise
the question of how are we going to integrate everything. Any process
have a trigger action that could be generated by different events like
a time schedule, a data change or a user interactions.
Those triggers will start a workflow of staff to complete all
the needs of the process. We can create custom integrations using
a message broker or APIC calls, but it will be
hard to maintain without the appropriate documentation and it
will take time to find who is responsible for each integration.
Using a workflows tool we can create a flow of the business process
using existing microservices started by an event
trigger or a batch schedule. It is possible to define each step
of the process, have full visibility of what is happening and
change it at any moment according to the needs of each
particular case. Workflows with go allow to have all the core functionality
of Ingo and delegate these orchestration of the business logic
into a new layer that controls the flow of a task
and that can be easily maintained and adapted to
any new change. A specific team is
in charge of these workflows. They need to be sure all the requirements are
fulfilled and that the integration between microservices are
resolved in the same way. It also gives more detail
of the process to the business for any new functionality
and it makes a better understanding of how the entire system is
working. Some workflows also allow the direct integration
with other types of objects like databases, third party applications
that reduce the development time of certain types.
So now I will make a demo of a workflow in a cloud
environment in order to make it more clear.
Each cloud system has different tools,
but in this case I will be using the one from GDP.
I will start by creating a new workflow. As you can see here,
I need to put the name, a description, a region
where it will be deployed, a security account,
and then I can define a trigger in order to run this
workflow. So let's go next. Here I
will need to define the main process logic.
This example is just calling a dummy
URL that has an endpoint that will result
in a value. And here you can see as I can
set new values manually and then return
that message in the process. This is very
customizable and very easy to use.
And this is in Yaml file. But you can also use this same
thing in JSoN. As you can see, this is just the same logic with
a different format. So let's try something different.
These is the code for a diagram
that will define the day today and return a message
according to it. As you can see, if it's Friday,
I will see this message. If it's a weekend, I will see this one,
and if not, I will see that it's a work week.
Let's deploy this and see how it runs.
Now I will execute this for the first time.
As you can see here, I can have multiple inputs, but in this case
I will not use it and then I will not activate the logs.
But it's very simple to activate that and have the
detail of what happens of each step and try to
solve any issues. I will execute it now, as you can
see, because today is Tuesday, it's a time week,
it's a working week. So I will get in that.
And at these bottom I will have the detail of the process on how
it went. Let's go back and change this
core.
I will edit this workflow with something different.
In this case, I'm using something that will connect
to Wikipedia. It will use the current day
with the world Tuesday and searching Wikipedia
things related to that. As you can see in the code,
it's very easy to have a diagram at the right that will
follow up all these possible steps that it could go and the actions
that it need to take. So doesn't matter the
size of these, it's very easy to follow what is going on.
So let's deploy this and see how it works.
Now I will execute these as a new version.
Again, I don't need any input because I am connecting to all
public systems, but we will see the result after that.
Okay, here you can see that our output
is a list of things that are related to Tuesday in Wikipedia.
So it integrates two different systems that are external.
One is internal and the other one is external and giving me a result for
this. Then we can use this information to do whatever we
need.
I hope these makes us more clear of what is a workflow,
how are we able to create new ones, and how easy
is to maintain, change and make anything
that we need in order to make it more clear of
the process that we need. Thank you for watching.
I hope this talk makes it more clear what a workflow is,
why we are using this technology, and what is the potential of having
in your solutions. If you have any questions here,
my contact information, please don't hesitate to ask any
doubts that you may have. Thank you for joining and have a nice day.
Bye.