Category Archives: Week 7

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

APIs and REST APIs

Hello everyone and welcome back to my blog. Last week we talked about APIs in Activity 12 and I want to go more in depth about APIs and what a REST API is since I don’t really know what they are. API stands for Application Programming Interface and it is a set of definitions that allows two applications to talk to each other. Almost every application uses an API to communicate data from your device to a server. The server has its own APIs to receive that data and interpret it, and then send it back to your device. Then the application translates that data into a readable format for you. You do not have to know how they are implemented into your application, which can simplify the application development and save a lot of time. 

APIs can also give security by only allowing certain data through and not all the data. For example, when you buy an item on an online store, you tell the store what items you want to buy and the store tells you what you need to pay. No other information from either your device or the website’s databases is transferred over. What I find interesting about APIs is how they work in video games. There can be multiple APIs in a game that each do something different, such as managing a game’s sound, rendering, and graphics, while others manage AI tasks such as path-finding. Pokemon is one of the most popular video game series out there and there is an API called “Poke API” that has every single Pokemon listing with moves, types, and weaknesses as well as every item in the games. A Pokemon website can use that API to easily get the latest updated information about Pokemon and the games.

REST API or RESTful API stands for Representational State Transfer API. It usually takes advantage of HTTP when used for Web APIs. This means that developers do not need to install libraries or additional software in order to take advantage of a REST API design. However, not all APIs can be REST APIs. In order for an API to be RESTful, it has to follow certain criteria. The client and the server should be separate from each other and allowed to evolve individually and independently, meaning making changes to the database won’t affect the clients. Stateless client-server communication, meaning no client information is stored between get requests and each request is separate and unconnected. Cacheable data that streamlines client-server interactions. A uniform interface which lets the client talk to the server in a single language, standardized means of communicating between the client and the server. A layered system that organizes each type of server. And lastly, Code-on-demand, which is the ability to send executable code from the server to the client when requested. All of these define what REST APIs do.

https://www.redhat.com/en/topics/api/what-is-a-rest-api

From the blog Comfy Blog by Angus Cheng and used with permission of the author. All other rights reserved by the author.

Docker in a nutshell

The blog post starts by identifying what are the different teams in software development and what each team does or is responsible for. It also talks about how what the development team does might be counterintuitive to what the DevOps team does and create problems for the two teams. An example of such a case would be when the development team adds a new feature because the new feature might affect the stability of the code by breaking the code which leads to problems for the DevOps team. The blog post also talks about what is Docker and containerization. It defines both terms and lists the benefits and features of both. It also talks about how Docker and containerization can solve problems that arose when we use virtual machines. For example, Docker can have faster build and testing times. Then, the blog identifies and talks about the different parts of the Docker architecture. In the post, it identified that Docker is composed of four components: images, containers, registries, and the Docker engine. The post defines each term and what each one does. The rest of the post talks about the components of the Docker Engine (such as the daemon, how to submit requests to said daemon…etc.) and why we should use docker, what are its benefits and what are its alternatives.

I personally really like this blog post made by the BNC Software company because the article is not too long or difficult to read. Personally, I have always had a terrible memory and been the kind of person where if I read something I can form some sort of an understanding about something, but I won’t completely understand or remember the topic until I get a formal definition. So, I chose this blog post to look at because I think this post does just that for me. The post explains the terminology in almost layman terms which makes it easier for me to remember and understand the material. Another reason why I chose this particular post is because I think this blog post explains the basics of Docker very well and is a great resource for us to have as we start moving on to more advanced topics in Docker. While reading this post, I think it brought up an interesting point about how the development team can interfere with the work of the people on the DevOps team. This was a question that I had before but never really thought about or put in the time to research this topic. It reminds me of what we learned in Software Process Management and LeBlanc’s Law. Starting up a Docker container takes a lot of initial effort and time commitment, but it would save us time in the long run because we would run into fewer problems of incompatible code and run less of a risk disrupting the stability of the code.

From the blog CS@Worcester – Just a Guy Passing By by Eric Nguyen and used with permission of the author. All other rights reserved by the author.

CS-343 Post #3

I wanted to read more about micro-services and monolith architecture after working on the recent activity with them and comparing and contrasting the two. They both have their benefits and have similarities, but there are important differences that make people question which is the better choice for designs that they are working on.

Monolith architecture has one database and is more contained, but is more risky to change and update because of how reliant it is on database. Microservices has two databases and has less risk because there is less reliance on each database and one that is getting changed will only affect up to half the system, while monolith risks the whole system being affected. Monolith is faster because it uses one database instead of two and less overall components, but micro-services is safer and better for larger or more complex systems. Microservices seems the better choice out of the two, but monolith has its benefits that should be kept in mind.

I wanted to look more into the two architectures and found an article “Microservices vs Monolith: which architecture is the best choice?” from N-iX, that went over the two and did more comparisons. Monolith was described as the default model for a while, but microservices was getting more traction and monolith is less used. The purpose of the article was to go over the two and decide if monolith is still useful and what it could still be used for.

More comparisons between the two were talked about as the article went over the strengths and weaknesses of both. The pros and cons that were already talked were mentioned, such as the risk of changing components in monolith and how microservices is better for more complex systems, but there were some that were either not mentioned or briefly talked about in the activity that show up in the article that makes the debate between the two architectures more even.

While monolith is more risky, it is more simple to work with and has less overall components to work with, which can make it effective for less complicated systems. It was also said that it is easier to debug and test monolith because it works as a single unit while microservices is multiple. Microservices is better with complex systems and can be easier to understand because of the division of the architecture with the multiple databases, and there is less risk with changes. Flaws of microservices are that it can get too complex, testing is more difficult, and has more cross-cutting issues.

In conclusion, monolith does still have its benefits and is better than microservices for simple and smaller systems, while microservices is better for complex and larger systems but would need more experience to use it efficiently.

https://www.n-ix.com/microservices-vs-monolith-which-architecture-best-choice-your-business/

From the blog Jeffery Neal's Blog by jneal44 and used with permission of the author. All other rights reserved by the author.

Docker compose

For the homework#3 of this week, I had a chance to practice on the docker compose. However, excepting for the little knowledge that I learned from the activity 10 in class, I had no clue what docker compose was. Therefore, I wanted to learn more about docker compose to get a better understanding and also learn how to write a docker compose file.

Docker Compose Tutorial: advanced Docker made simple is one of the resources that I find useful to help me get an overview about the docker compose, how to write an .yml file, and how to run the .yml file with docker-compose commands. Through the website, I know that docker compose is used to define and run multi-container Docker applications; and I also get an idea of what components should be included in a .yml file to create a docker container. Specifically, to create a container service, we need some entries like build, link, image, ports, volumes, command, environment, etc.; and the function of each entry is also described in detail on the website. For example, back to the activity 10 in class, now I am able to convert the docker command given in the below picture to an equivalent .yml file.

As shown in the above docker command, my .yml file will create a container named cache using the image named redis with the tag of 6.0.8. This container has internal port 6379 connecting to the external port 11000, and it also mounts two directories of ./redis.conf and /etc/redis.conf. So, the components that should be included in my .yml file are version, services, web, image, ports, and volumes.

First, version is to define which version of docker compose that I am using. Services is used to define all different containers that I want to create. Web is use to present the container name, in this case, I will replace web with cache. Image will represent which image is used to create the container (redis:6.0.8). Ports is used to map the external port with the internal port (11000:6379). Volume is used to mount the source directory, ./redis.conf, with the destination directory, /etc/redis.conf.

In short, in my opinion, I believe the website that I found is a good resource, because from it, I can find really useful information about docker compose, such as definition of docker compose, how to write .yml file, and docker-compose commands. Thanks to this resource, I am more familiar with .yml file and docker-compose commands. Especially, I used what I learned from this website to do my homework 3.

From the blog CS@Worcester – T's CSblog by tyahhhh and used with permission of the author. All other rights reserved by the author.

Design Patterns

  • Creational
  • Structural
  • Behavioral

In what is called software engineering, a design model describes a solution that is determined by the problems found in the design of the software. It makes it possible to represent practices that are best and which evolve over a longer period of time through gaming but also testing that is done by software experienced developers.

1)Creational Design Patterns are patterns that explain how an object can be created. These models make it possible to reduce the complexity but also the instability that they have by making the creation of objects in a more controlled way.

In most cases, the new operator is often considered harmful as it distributes objects throughout the application. This can become even more challenging over time, in order to change the implementation, for the sole reason that the classes have a very close relationship with each other.

Creative design models address this issue here by making the client disconnect from the initialization process that is currently underway.

1. Singleton – Makes it possible to provide a single instance of an object that exists during an application.

2. Factory Method – It is possible to create different objects of different classes that are related, but without making specifications in the exact object that can be created.

3. Abstract Factory – Makes possible the creation of families that are dependent but also connected together.

4. Builder – Has the ability to build complex objects using one approach after another, or in other words step by step.

2) Structural design patterns– These are models that have to do with what is called the organization of objects and classes that are different, but also that change the formation of structures from the largest, but at the same time to make it possible to provide the functionality of ri.

Explain how the structural design model is used-

At the moment when we have two interfaces that have an incompatibility with each other but also that want to have a relationship between them by having adaptation with each other, it is also called as the adapter design model. This model, also known as the adapter model, converts an interface of a class to an interface or another class that the client expects. In other words, what is called adaptability somehow allows the classes to work together, which at another point due to incompatibility could not have happened otherwise.

3)Behavioral design patterns represent the responsibility but also the interaction of different objects.

By generalizing these design models, the interaction that takes place through objects should be in such a way that they too can talk smoothly to each other.

Translated into simpler words, in order to avoid dependencies but also difficult coding, the application and the client at the same time should be connected as loosely as possible.

Behavioral design models have 12 types usable for this model:

1. Enterprise chain model

2.Command model

3.Performer model

4.Iterator Models

5.Broker model

6.The model of memories

7.Observer model

8.The state model

9.Strategy Model

10.Template model

11.Visitor model

12.Object Null

References:

https://www.gofpatterns.com/design-patterns/module2/three-types-design-patterns.php

https://howtodoinjava.com/design-patterns/creational/

https://howtodoinjava.com/design-patterns/structural/

https://www.ifourtechnolab.com/blog/a-complete-guide-on-behavioral-design-pattern-and-chain-of-responsibility-pattern-in-java

From the blog CS@worcester – Xhulja's Blogs by xmurati and used with permission of the author. All other rights reserved by the author.