Tag Archives: cloud

Revisiting Docker – How to use docker container in ECS

In post How to build docker image for your application, we saw how to create a docker container image for your application and then run that image. In this post, I want to revisit some of the docker commands and how to use this docker container in ECS (Elastic Container Service) which is offered by Amazon.

  1. Publishing your docker container image in ECR (Elastic Container Repository) – Amazon offers a repository where you can push your docker image to store. Once you have the image in the repository, it can be used in ECS.
docker tag source_image:[tag] target_image:[tag]

docker push image:[tag] repository:image

2. You can pull this image from repository to run on your local as below

docker pull image:[tag]

3. Once you have docker image published in the repository, it is a straightforward. Create a cluster in ECS.

4. Cluster is nothing but collection of multiple services running on their own EC2 instances, provided you create a service of type EC2. Once you create a cluster, you can create a service. Another type of service you can create is that of Fargate. But we will not talk about it in this post.

5. When you create a service, it will ask you to enter the value for task, that means you have to create a task first. Enter the name and type of task (EC2).

6. Provide the docker container image and any environment variables you need to run this docker container. Provide necessary details of how much memory you need and if you are using storage.

7. Once you create a task, you can use it creating a service from Step 5. Choose an application load balancer in your service. If you haven’t already created load balancer and target group, you will need to create those. Use the newly created load balancer and target group for your service.

8. Now once everything is created, you can start the task to run. So this service will be available in the cloud. Amazon offers a healthcheck for your service, that you can configure while configuring service.

Conclusion –

In this post, I showed how to use Amazon ECS service for creating a service and running that service in Amazon cloud. If you want to learn about docker containers, learn here.

 

Building a Saas application

This is a brainstorming post where I will jot down the ideas to build a saas application. Before we start, we have to go to basics.

What is Saas?

Software as a service (Saas) is a software delivery model. In this model, the software is served through subscription service. Saas has been popular for more than a decade now. In fact, the sales of such software have skyrocketed that building simple software has become easier. From project management to ordering healthy food, we can get any of these services through software with a subscription.

Now what do we want to build and how do we start?

Of course, this is not an easy question to answer in a single post. You have to go through trial and errors to build a viable product that people will use it. But also what and who are we targeting as an audience. There are a lot of broader areas to think about to build a product. That would make the entire process to build a software way too complex. So where do we start? The eternal question still remains.

Human psychology over the years has progressed and helped technology to build a lot of cool products. With AI has been knocking on our doors, what we build today, will be obsolete in the next ten years. Based on your own experience, what I have found, is that you look into your own daily life. When you go for grocery shopping when you talk to your friends, coworkers. The moment, you feel frustrated anything that is not in your control, that’s where you have something to build on.

I know it sounds ridiculously easy to write here in the post, but not easy when you are living life. What I am trying to point is, look at problems you or other human faces and if that problem can be solved through software, you have got a viable product idea.  At every pain point, the problem is an idea to build a product. Simple example – Elon Musk was driving on LA roads, he was caught in traffic which didn’t move for a long time. How do we improve our traffic? With increasing cars and population, this is almost going to be a nightmare in the future. He realized the problem and started a company called The Boring Company that would build underground tunnels for handling traffic.

If you are like me who works in a software company, it is easy to see through this dilemma to build a solution that can help you and other developers equally. But in a larger context, you can always go through different Saas services and hear the feedback from those services’ users. Any negative feedback is your path to build a product. Assuming we got the idea to build a Saas application, so how do we proceed further?

Post-idea discussion

Once we have a solid idea, we can think about building a minimum viable product which gives customers a chance to explore the product with minimum fuss. Less complex the product for customers to use intuitively, better will be their experiences and happier they will be to recommend your product to others.

You should work to create a minimum viable design. This will be an alpha version of the product. Getting alpha version out of the door in minimum time will give you a better idea of where to focus on scaling the product in the future. This will also save time and money.

Technology and Frameworks

Once we have the initial design of the minimum product, we can think of what technology and framework to use. What kind of infrastructure to use? Considering the less expensive options, the cloud is very popular to use to build a Saas product. This reduces the management of infrastructure while giving high availability and scalability. Amazon, Google, and Microsoft all these companies offer cloud solutions to build your application. Also if you want to scale your application in the future for data-intensive, the cloud is the best option to handle all kinds of load.

For backend, there are different frameworks available based on C#, Python, or Java. Since I have worked on Java, I vouch for Spring which offers a lot of flexibility and ease to add a lot of code easily. Of course, there is a learning curve if you have never used spring before. For the database, we have two major options, one is SQL based database or NoSQL. If it is data-intensive application, NoSQL makes more sense.

On the frontend side, angularjs offers a lot of ease to build a modern user interface to interact with backend.

Conclusion

There are a lot of other factors we have not considered in this discussion especially related to the performance and health of the application. Also, we didn’t discuss any major approaches to build the application. I hope this brainstorming post will give readers an idea of a saas application that they can build.

If you have an idea of saas application and you intend to build it, let me know how it goes for you. You can subscribe to my blog.