Skip to main content
added 312 characters in body
Source Link

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

So based upon my understanding the microservices architecture is not a good candidate for state machines, if we are looking for real time performance.

I don't understand the fixation on state machines. Why do you need one. In a cloud environment, a state machine is a way of sharing global state between instances. The way the question reads now I don't think you need one.

resources which can be used by those services i.e. allocating more resources to service which needs them more and then we can auto scale the whole server based upon load.

So you're essentially redoing Google Cloud's work for them. Google Cloud offers something called a pipeline, which sounds like exactly what you need. The point of both Google Cloud and AWS is to move away from "I bought the box" to "I bought computing power". Google Cloud will auto-scale the pipeline, bringing more instances of each microservice online as it's needed, and deleting it when load tapers off. Don't redo this - you're probably not as good at this as Google or Amazon. Let them handle it - that's what you're paying for!

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

So based upon my understanding the microservices architecture is not a good candidate for state machines, if we are looking for real time performance.

I don't understand the fixation on state machines. Why do you need one. In a cloud environment, a state machine is a way of sharing global state between instances. The way the question reads now I don't think you need one.

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

So based upon my understanding the microservices architecture is not a good candidate for state machines, if we are looking for real time performance.

I don't understand the fixation on state machines. Why do you need one. In a cloud environment, a state machine is a way of sharing global state between instances. The way the question reads now I don't think you need one.

resources which can be used by those services i.e. allocating more resources to service which needs them more and then we can auto scale the whole server based upon load.

So you're essentially redoing Google Cloud's work for them. Google Cloud offers something called a pipeline, which sounds like exactly what you need. The point of both Google Cloud and AWS is to move away from "I bought the box" to "I bought computing power". Google Cloud will auto-scale the pipeline, bringing more instances of each microservice online as it's needed, and deleting it when load tapers off. Don't redo this - you're probably not as good at this as Google or Amazon. Let them handle it - that's what you're paying for!

added 312 characters in body
Source Link

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

So based upon my understanding the microservices architecture is not a good candidate for state machines, if we are looking for real time performance.

I don't understand the fixation on state machines. Why do you need one. In a cloud environment, a state machine is a way of sharing global state between instances. The way the question reads now I don't think you need one.

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

So based upon my understanding the microservices architecture is not a good candidate for state machines, if we are looking for real time performance.

I don't understand the fixation on state machines. Why do you need one. In a cloud environment, a state machine is a way of sharing global state between instances. The way the question reads now I don't think you need one.

added 312 characters in body
Source Link

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

I have a monolithic application which can be divided into multiple steps and different steps have variable scaling requirement

This has nothing to do with a state machine. This is a pipeline.

You probably should break it into microservices so you can scale per logical component. Why do you need a state machine? Do calls affect subsequent calls? Generally back-end calls are designed to NOT change state of other backend calls. If there is only a little state per call, then just pass it along the microservice pipeline as parameters.

If you really need a truly global state, a microservice is probably the wrong answer.

EDIT in response to comments

In the comments, you say step 2 acts on step 1 (and step 3 acts on step 2). This is a pipeline. If package A goes into step 1 -> Spits out Package A1, package A1 is fed into step 2, becomes package A2. If this is the flow, then I don't see why you need a state machine. You need to dynamically scale "step containers".

The only concern which I feel is that if Service1 container instance and service2 container instances are in different servers/hosts, then there would be some network latency which would be multiplied by the no. of requests.

If you're using Google Cloud all the physical machines will likely be in one very well connected data center. In my experience, latency inside the data center has never been an issue with either Google Cloud or AWS.

Source Link
Loading