Another Architectural Profession

Janitra Ariena Sekarputri
Inside PPL B7
Published in
6 min readMay 9, 2020

From the word “architecture”, maybe a blueprint was crossed your mind. In the construction industry, it is closely linked with the architectural profession. But, there is another profession that also uses blueprints in building something, such a software. That’s Software Architect! Well, to be honest, this is one of the few things that I have limited knowledge but I’ll try to explain what I know about it as best as I can.

So, what is Software Architecture?

“Software architecture is the set of design decisions which, if made incorrectly, may cause your project to be canceled” -Eoin Woods

Software architecture is a process to define the structure of an application that can meet all the technical and operational criteria, to optimize the quality of an application. Software architecture is the key to long-term success. Software architecture functions as a bridge between business needs and technical needs. Good software architecture must be able to adapt to changes that will occur over time in hardware and software technology.

Software architecture designs and specifies the overall system structure emerges as a new kind of problem. Structural issues include gross organization and global control structure; protocols for communication, synchronization, and data access; assignment of functionality to design elements; physical distribution; composition of design elements; scaling and performance; and selection among design alternatives (Garlan and Shaw, 1994)

According to Kruchten (1999), software architecture deals with the design and implementation of the high-level structure of software while architecture deals with abstraction, decomposition, composition, style, and aesthetics.

source: Oreilly

From the picture above, the attributes of the architectural concept are:

  • Component, embodied unit of programming comprising of at least 1 module that has a chosen job and duty inside the framework.
  • Connector, design building blocks used to model interactions among components and decide that govern those connections.
  • Architectural Configuration / Topology, an associated graph of components and connectors that depict the architectural structure.

It is crucial to have great software architecture if you want to create an expendable and continuous software. That’s because your software will be more and more complicated as time goes by. You will easily get confused about what should be in where, where this component should be, or what you did back then if you don’t have a great foundation of software architecture and documentation.

Software Architecture on Mobile App Project

Unfortunately, my project only focuses on the front-end. We use native Android Application Development, Kotlin. It is requested by our client. For the back-end and DBMS server, it is all provided by the client. So, this time I’ll tell you about software architecture for another mobile application using another architecture. There is a four main component of software architecture, front-end, back-end, DBMS server, and image server.

  • Front-end

If you want to build an application for both Android and iOS, you can use Flutter for the front-end. It’s an open-source framework by Google to develop a User Interface for both Android and iOS applications.

  • Back-end

For the back-end, you can use Golang, a programming language developed by Google also. Golang has speed and ability to work concurrently, so it’s very convenient to work in a project team.

  • DBMS Server

Database Management System is a system built to create and manage a database and carry out the operation of requested data from many users. You can use Postgres, PostgreSQL is a powerful database which an open-source object-relational database system that extends the SQL language combined with many features that safely and scale the most complicated data workloads.

  • Image Server

You also need an image server to store an image came from the application. You can use Firebase, Backend as a Service (BaaS) by Google, which is offered to simplify the work of mobile app developers on file storage.

How about Docker?

Docker is an open platform that helps universal application distribution. Docker is one of the platforms built based on container technology. Docker is an open-source project that provides an open platform for developers and sysadmins to be able to build, package, and run applications anywhere as a lightweight container. Docker has become the standard for several types of container virtualization systems and has been adopted by various companies as a software container strategy.

The philosophy behind Docker is to help provide universal execution, using inherent properties of the Linux kernel that offer support for easier application handling. For example, instead of using a method that allows library interdependency, Docker provides a smooth separation, where the given library is installed several times in different containers so that each individual library instance does not depend on each other.

Virtual Machine vs Docker

Docker and Virtual Machine are quite similar. Unlike Virtual Machine, Docker permits applications to utilize a similar Linux portion as the framework that they’re running on and only requires applications to be sent with things not previously running on the host PC, rather than creating a whole virtual operating system. This gives a significant performance boost and reduces the size of the application.

These are an illustration between Virtual Machine and Docker

source: Nakivo

What’re the Differences?

  • Docker only runs the process that is needed by the container itself.
  • Docker doesn’t need its own operating system to run, it requires fewer resources compared to a VM.
  • Docker usually only contain application code.

And, the similarities?

  • Both can be customized according to requirements specifications.
  • Both require a host system to run.
  • Both saved as an image.
  • Both have isolation from processes, networks, users, etc.

Docker Orchestration

In general, Docker Orchestration is about managing the lifecycles of containers, especially in large, dynamic environments. Docker orchestration configures the lifespan of a container and minimizes the risks of application failures. Software teams use container orchestration to control and automate many tasks, some of them are:

  • The process of starting and stopping containers.
  • Exposing functionalities from containers to end-users or other containers (service discovery).
  • Health monitoring and responding to containers’ behaviors.
  • Deploying a new version of a container without any downtime
  • Scaling of containers to equally balance application workloads across infrastructure.

Docker Compose

Docker Compose is a simple tool from Docker which facilitates us to arrange multi-holder applications. The structure and properties are defined in a YAML file, usually named docker-compose.yml. The container name opened ports, networks, and environments are placed here. Compose makes it really easy to orchestrate multiple containers, such as spinning them up, down, restart, and pull them together, rather than managing them manually like single containers.

So, how to compose a Docker?

Please make sure, you’ve already prepared this:

  1. Install docker in computer
  2. Connect docker hub to computer
  3. Have a good connection.

Move to the steps,

1. Create a Dockerfile

Inside the Dockerfile, we need to put some commands that will fill our machine

2. Compile Dockerfile
Run this command from our directory of Dockerfile,

$ docker build -t yourusername/repository-name

This will give an output of a new docker image named yourusername/repository-name.

$ docker images

3. Push Docker

$ docker push yourusername/repository-name:versionNumber

Other examples of docker orchestration tools are Docker Swarm and Kubernetes.

Docker Swarm is a native clustering tool for Docker that can transform a pool of Docker has into a single virtual host. Docker Swarm is completely integrated with the Docker Engine and permits you to utilize standard APIs and systems administration forms; it is expected to convey, manage, and scale Docker holders.

Kubernetes is an open-source container orchestration that is utilized for managing containerized programming and services with a high level of computerization. Kubernetes is a Google venture planned to automate deployment, scaling, and accessibility of utilizations running in compartments.

Conclusions

Docker is a dynamic containerization stage appreciated by developers and utilized for delivering software, especially uses of the microservice-based architecture. Utilizing Docker as an independent application is convenient for software development and testing. Establishment, setup, and use of Docker is very simple. If you need to deploy an application in the production environment, it is better to use a cluster for running containers. There is a quite simple orchestration solution for run containers in clusters, Docker Compose.

Unfortunately, there is no example from our project implementation. My software development project is a mobile application, so there is no containerization needed, we use a personal machine like a smartphone.

References

https://opensource.com/resources/what-docker

https://searchitoperations.techtarget.com/definition/Docker-image

https://www.nakivo.com/blog/docker-vs-kubernetes/

--

--