You are on page 1of 12

Data system 1

Data system

Students Name

Institutional Affiliation

Course Title

Professor’s Name
Data system 2

Data system

Task 1:

Answer the following:

What is the most popular server programming language?

Node.js and PHP are apparently the most widely used server programming languages,

with Node.js coming in second (Shrikant et al., 2018). Even well-known websites like Facebook

and Wikipedia use PHP as their programming language. There are more than 80% of web pages

on the internet that are powered by PHP (Iskandar et al.,2020). As the first server-side

programming language, PHP has been widely adopted and used.

Can you find which web application or online systems are programmed with PHP?

Here are some that are programmed with PHP:

o Facebook

o Wikipedia

o Yahoo

o WordPress

o Tumblr

o Flickr

o iStock Photo
Data system 3

Why do you think that most web pages today require server-side programming?

In the current Web 2.0 environment, if your content is not interactive and visually

appealing, you are out of the running. Virtually every website has to maintain information about

their visitors' browsers and geographic location in order to tailor their content to their audience's

needs (Laaziri et al.,2019). When a user logs in, server-side programming languages like PHP

can obtain data from the server and present it to the user using HTML or JavaScript. Consider

Facebook, a popular social networking platform (Gope et al.,2017). Each user's newsfeed

displays information that is specific to that user. With server-side programming, you can further

alter a website's look and feel while still keeping its overall functionality.

Why must a web developer learn more than just client-side technologies?

Knowledge of client-side technology is not enough to be a web developer. Because of its

ability to meet the needs of a growing number of businesses, server-side programming is

becoming more and more popular (Mohammadi et al.,2019). Server-side programming is a way

for firms to better understand their customers' needs and preferences (Raitahila et al.,2019). They

are able to properly plan out their marketing tactics based on the above information.

Task 2:

Complete the following:

Write a program in PHP using a ‘for’ loop to add all the integers between 0 and 50 and

display the total.

1 * 1 = 1 1 * 2 = 2 1 * 3 = 3 1 * 4 = 4 1 * 5 = 5 2 * 1 = 2 2 * 2 = 4 2 * 3 = 6 2 * 4 = 8 2 * 5 = 10

3 * 1 = 3 3 * 2 = 6 3 * 3 = 9 3 * 4 = 12 3 * 5 = 15 4 * 1 = 4 4 * 2 = 8 4 * 3 = 12 4 * 4 = 16 4 * 5
Data system 4

= 20 5 * 1 = 5 5 * 2 = 10 5 * 3 = 15 5 * 4 = 20 5 * 5 = 25 6 * 1 = 6 6 * 2 = 12 6 * 3 = 18 6 * 4 =

24 6 * 5 = 30

Write a PHP program to check if a person is eligible to vote using control structure.

Output:

You Are Eligible to Vote

Output:
Data system 5

Enter a no: 24

Submit

You are Eligible for Vote

Write a PHP program to check whether a number is prime or not.

<?PHP

// A school method-based PHP program to

// check if a number is prime

// function check whether a number

// is prime or not

function is Prime($n)

// Corner case

if ($n <= 1)

return false;

// Check from 2 to n-1

for ($i = 2; $i < $n; $i++)

if ($n % $1 == 0)

return false;
Data system 6

return true;

// Driver Code

if (is Prime (11))

echo("true");

else

echo("false");

// This code is contributed by Ajit.

?>

Task 3:

Discuss the following:

Simultaneous TCP connection initiations are rare, but simultaneous connection

termination is relatively common. How do two TCP nodes negotiate the simultaneous

sending of FIN packets to one another?

It is necessary for both parties to communicate with each other to terminate the

connection. Every node in the network must be given the all-clear before a connection may be

terminated (Stock et al.,2017). Due to the fact that many connections might be closed

simultaneously, this is the case.


Data system 7

Draw the ladder diagram, and label the states on each side.

The first node will wait for an acknowledgement after transmitting the FIN to the second node.

Node 2 responds to the FIN it received by sending an acknowledgment message, which ends the

communication between the nodes (Zhou et al.,2018). In the other node's perspective, the FIN

has been sent to node 1 and node 2 is now waiting for an acknowledgment. Node 1 responds

upon receiving the FIN by sending an acknowledgment (Stock et al.,2017). Once both parties

have received the ACK, the connection can be terminated.

Which node goes into TIMEWAIT state?

The graphic above shows that the link between nodes 1 and 2 has been destroyed by the

exchange of four messages (Coudron et al.,2017). TIME WAITING is set on both nodes at the

same time.
Data system 8

Task 4:

Answer the following:

Why does the maximum packet lifetime have to be large enough to ensure that not only the

packet but also its acknowledgments have disappeared?

Packets must have a maximum life span long enough to ensure that all

acknowledgements are removed from the system, preventing the transmission of duplicates and

wasting bandwidth. To avoid packet loss, bandwidth usage, and the sending of unnecessary

further packets due to a lack of acknowledgement that the packet had been received, every

connection must be completed (Zhou et al.,2018). After a sufficient amount of time has passed

since the last packet was transmitted, data can be recognized and confirmed as having been

received, meaning the conversation can be ended.

Using Nagle's method on a network that is already substantially overloaded could result

in what? (Coudron et al.,2017) In a crowded network, Nagle's approach may cause data loss and

application delay because smaller packets have a better chance of making it through than bigger

ones.

Give two examples of cases where TCP sends data-less packets on an established

connection (which is not being torn down).

It's possible that this is only an acknowledgment that the data has been received if there

are only a few packets delivered. It is possible to keep the connection alive by using the "Keep-

Alive" option if it is still waiting for any form of activity (Ruiz et al.,2019). As a result of the

reduced window size, they are typically provided with a size of 0. A request for an increase in

window size will be made as a result of sending these documents.


Data system 9

Exercises: 1. Suppose you see multiple TCP connections on your workstation in state

FIN_WAIT_1. What is likely going on? Whose fault, is it?

The connection appears to be waiting for an acknowledgement of the FIN that was

received, according to the request that was placed on the forum (Praseed et al.,2018). One of the

nodes is likely to have an issue if they remain in this state for an extended period.

What might be going on if you see connections languishing in state FIN_WAIT_2?

The FIN WAIT 2 status is reported on the network when a remote client provides an

ACK for a termination request and then waits for the FIN (Prokofyeva et al., 2017).

Conclusion

Maintaining balance requires an equal and opposite response for each movement. In a

nutshell, it's a perfect summary of the current scenario (Odeh et al., 2019). Messages from nodes

are deemed complete when they are received and acknowledged, and following talks may

proceed in a more efficient manner.

Task 5:

Answer the following:

What TCP message will be generated for an incoming SYN request for which there is no

matching LISTENING port?

The SYN flag in the Transmission Control Protocol segment is used to establish a

connection between two hosts, according to the DDoS GUARD website

(https://ddos-guard.net/en/terminology/protocols/syn-flag) (Ruiz et al.,2019). Data is exchanged

between the two hosts through this connection. According to the KEYCDN website
Data system 10

(https://www.keycn.com/support/tcp-flags), a flag known as an ACK is used to notify the

successful reception of a data packet sent out by the sender (Prokofyeva et al., 2017). A "SYN"

flag will be appended to the first data packet sent by the client application. A "SYN-ACK"

packet is sent by the server in response to a request from the client app for a "SYN" packet,

which is sent by the server in response to a "SYN" packet request (Praseed et al.,2018). As soon

as the acknowledgement signal is delivered, the system ends the connection it just established

and awaits the next request to create a new one.

What error will be given to the application that requested the connection?

Client program sends a "SYN" packet to the server, but the server does not respond by

listening on the specified communication port. The connection is broken. As a result, an error

message with the message "Connection refused" appears (Odeh et al., 2019). If a server is offline

or not listening on the correct port, this error message will be thrown in most cases. Verify sure

your server is up and running and listening on the correct port if you're experiencing "refused

connection" problems.
Data system 11

References

Coudron, M., & Secci, S. (2017). An implementation of multipath TCP in ns3. Computer

Networks, 116, 1-11.

Gope, D., Schlais, D. J., & Lipasti, M. H. (2017, June). Architectural support for server-side PHP

processing. In 2017 ACM/IEEE 44th Annual International Symposium on Computer

Architecture (ISCA) (pp. 507-520). IEEE.

Iskandar, T. F., Lubis, M., Kusumasari, T. F., & Lubis, A. R. (2020, May). Comparison between

client-side and server-side rendering in the web development. In IOP Conference Series:

Materials Science and Engineering (Vol. 801, No. 1, p. 012136). IOP Publishing.

Laaziri, M., Benmoussa, K., Khoulji, S., Larbi, K. M., & El Yamami, A. (2019). A comparative

study of laravel and symfony PHP frameworks. International Journal of Electrical and

Computer Engineering, 9(1), 704.

Mohammadi, R., Conti, M., Lal, C., & Kulhari, S. C. (2019). SYN ‐Guard: An effective counter

for SYN flooding attack in software‐defined networking. International Journal of

Communication Systems, 32(17), e4061.

Mohammadi, R., Javidan, R., & Conti, M. (2017). Slicots: An sdn-based lightweight

countermeasure for tcp syn flooding attacks. IEEE Transactions on Network and Service

Management, 14(2), 487-497.

Odeh, A. H. (2019). Analytical and Comparison Study of Main Web Programming Languages‒

ASP and PHP. TEM Journal, 8(4), 1517-1522.


Data system 12

Praseed, A., & Thilagam, P. S. (2018). DDoS attacks at the application layer: Challenges and

research perspectives for safeguarding web applications. IEEE Communications Surveys

& Tutorials, 21(1), 661-685.

Prokofyeva, N., & Boltunova, V. (2017). Analysis and practical application of PHP frameworks

in development of web information systems. Procedia Computer Science, 104, 51-56.

Raitahila, I. (2019). Congestion Control Algorithms for the Constrained Application Protocol

(CoAP).

Ruiz, M., Sidler, D., Sutter, G., Alonso, G., & López-Buedo, S. (2019, September). Limago: An

fpga-based open-source 100 gbe TCP/IP stack. In 2019 29th International Conference on

Field Programmable Logic and Applications (FPL) (pp. 286-292). IEEE.

Shrikant, P., & Harshul, B. (2018). Online electronic laboratory notebook: A secured cloud

storage system scripted in Hypertext Pre-processor (PHP) programming language.

Journal of Engineering and Technology Research, 10(1), 1-6.

Stock, B., Johns, M., Steffens, M., & Backes, M. (2017). How the Web Tangled Itself:

Uncovering the History of {Client-Side} Web ({In) Security}. In 26th USENIX Security

Symposium (USENIX Security 17) (pp. 971-987).

Zhou, M., & Fanti, M. P. (2018). Deadlock-Free TCP Over High-Speed Internet by Rocky KC

Chang, HY Chan and AW Yeung. In Deadlock Resolution in Computer-Integrated

Systems (pp. 553-576). CRC Press.

You might also like