My understanding of ArcNet protocol

What is ArcNet?

Attached Resource Computer Network is a communication protocol widely used in build automation. This protocol is very efficient in Local Area Network, wherein multiple devices want to share information at faster phase. Core functionality of this protocol relies on token passing between nodes. Better analogy could be, consider network as a shared object and token as the key to the object.

What are other features?

Data speeds up to 10Mpbs, Variable packet lengths, Supports Bus or star topology, Uni-cast and broadcast messages.


Let’s dive into each message types in the protocol.

RECON – Reconfiguration

This is another important message or feature to keep track of the network changes. This message can be triggered in following cases:

  1. When a node joins the network
  2. When a node leaves the network
  3. For high performance, it can be triggered every 20 – 30ms

image007

ITT: Invitation to Transmit

Token is the identifier for the node or the device in the network. When node enters the network it sends a RECON message. This message will inform the network about change in configuration of the network and re-start the token passing.

Let’s take a simple example of a network.
picture1

Now node 1 starts the token passing, it will send out ITT message to destination nodes starting from next address of its current address. In our case it would be 0x0B. It keeps on sending ITT until it receives the response from any node in the network.

image003

Now as you can see, 0x02 node has responded to the request from 0x0a. Now the token is with 0x02 node, so it starts it token parsing to find out another node in the network.

When ITT message reached the destination as 0x05, node three responds takes on the task of token parsing. Then it identifies the another node that is i.e 0x0a. So token passing happens until all nodes in the network are identified. For our setup the intial token passing is completed we have a network 0x0A <-> 0x02 <-> 0x05 <-> 0x0a.

After accomplishing the network and identifying the nodes in the network. The token passing keeps on continuing as shown below for efficient data transfer.

image005

How? say for example 0x0a wants to send some data to 0x05. It can send the data only when it has the token. As I said earlier, token is kind of key to the network infrastructure and resources.

FBE – Free Buffer Enquiry

Before a nodes a sends packet to another node, it needs to know if the receiver can accept incoming packets.

When the node has the token, it would send a FBE request to receiving node. The receiver can chose to send ACK or NAK.

FBE with NAK/ACK is shown below

image009

PAC: Packet

This is the message protocol to send data frames to the receiving node. The data could be anything.

The frame contains Source address node, destination node, length and the actual data. The receiver can ACK or NAK the transmission.

PAC sequence is shown below:

image012

ACK: Acknowledgement

Sent by receiving node to the sender about accepting the information sent

NAK: Negative Acknowledgement

Sent by receiving node to the sender about rejecting the information sent

 

Advertisements

My Interview experience with Amazon

After making sure that my resumes are updated and well according to the standards. I scanned through the job portal for amazon jobs, after carefully reading the job description; i decided to apply during mid last year. I almost forgot about the application, out of the blue i got call from the recruiter asking whether you’re still available in market. I replied positively to the recruiter. They sent my profile to the hiring manager and asked me time slots for the interview. Got the response for the interview slots.

I prepared myself for the interview for about a week, brushed programming skills on data structures/algorithms, I took courses with MIT open course ware. Finally i am at peace before the interview, all the topics i covered was running in my mind like a dream. ok enough of story, let’s go through the interview questions.

The interviewer was very kind enough to explain about his role in the company and its business values. He asked me about my roles and responsibility in the team, following are the questions in order.

a. Tell me about your responsibilities and teams

b. Tell me about the challenging situation with the team and how do you handle it.

c. What proactive ideas you gave to the client and what is the response from them. And to follow-up this he asked me questions about the solutions.

d. Tell me about the situation where you took hard decision and its impacts. Specifically he was asking about breaching the dead line.

e. How did you handle changes in requirement and how did it impact the team.

f. How did you manage the conflicts in the team.

I answered the questions with utmost diligence. I complimented the team all along, it was the truth. Hey No cribbing about the management. After that he asked to open  http://collabedit.com for programming. He started to write the problem statement. Following is the problem statement. Create alogrithm for the dependency list of the package installer.

Amazon_interview_q

I looked at the diagram and got a bright idea to use undirected graph. He asked me why undirected graph, I though for a while and decided to use directed. Since there is no reverse dependency i.e core is not dependent on Apache so it is always one direction. He asked me to write the program and i started to create a graph class. Following is the solution i provided, i will just write in sudo code.

a. Created a class called “graph” which has a list of int, strings, and variable to store the max number of the vertices. Integer list has the index for the string in the string list, example string “Root Package” has index “0”.

b. A function to iterate through the graph and update if it is visited in boolean list. I chose Depth First algorithm for iteration.

c. In Public specifier; I added constructor, Add edge function, Get list function.

I was not silent in the call but kept on telling him what i was thinking, just to engage him in conversation. You may think why list of vertices, I will give you a pictorial representation of the list.

Amazon_interview_list

This list has the path to trace back to the parent, because he asked me to check for cycle. Anyways the coding went well and he said it is good. May be you have a better idea for this problem, but this is what I can come up during the interview session.

Code is available in my git hub page