Go back to Read free chapters

Connecting Pattern

What are verified connections and how to build and manage them.

Our world is built with connections and they are everywhere. Our economy, ecosystem, values and standards use connections to structure the world around us, you are a result of your connections. In real world you can look at your phone and you will find connections, you can look for connections in friend's list, email box and social applications. You can also look at your education, workplace and social circles to find connections. These connections bring value to the table, you can reach them and ask them questions or state your opinions. This is a social network that is built around your connections. You also have other different kind of connections, to the things that you own, subjects that you are interested in and know about.

This network is information that represents your personal connections. These connections come to life only when you act with the actual person or object through this information.

Networking has different structures for connection building. Two of the mostly used ways to build new connections are verified connections and connections to follow.

As we see in many today's services in 2017 the verified connections means that the connection is built only when the both connection parties have confirmed the connection.

The connections to follow means that the connection endpoint allows other parties to follow his/hers/it's actions. This means that connections you follow are not same as your verified connections.

In a computer network the verified connection also means a connection that has gone through a handshake so that the client and the host have both verified the connection as established. In networking this requires that the communication protocol is identified and accepted in both ways. The verification itself does not guarantee that the both parties can rely on the information that flows between them. It verifies that the parties have accepted the connection and have a relation between each other.

Now we get to an interesting point in the book. We examine connections and how to build and manage them. Connections are relations between entities that enable communication or state changes between two or more entities.

As we discussed earlier in the introduction there are input connections and output connections for a single entity and these are the base for the connecting pattern. We focus in the structure of a single connection entity. With the entity word we mean any programmable object that has an unique identifiable key. The entity is used in many contexts, we have taken it from the Hibernate database terminology.

Entity means an abstract object in this context, a person for example named Mary. Every entity has a list of input connections and output connections. In the following example there is a list that is Mary's phonebook that she updates. Whenever she sees a friend and thinks that he/she/it might be worthwhile to connect with she updates the phonebook and adds the friend's name to it. When she approaches the friend with a question about the phone number and the friend gives it Mary adds the phone number to the phonebook. If she is fed up with the friendship she crosses the name over. Here are the four states for the connection: not existing, pending, accepted and discarded.

  • The first state means that the connection is not yet existing
  • Pending means that the connection is waiting for a verification form the other party that we call endpoint
  • Accepted means that the connection is accepted from both parties
  • Discarded means that either one of the parties have cancelled the connection

Note that Mary keeps her own phonebook updated that lists her output connections. The input connections in this case are Mary's friends that can communicate with her and they have their own personal phonebook.

What Mary does is that she keeps her notebook up to date with events that surround her. Every output connection has a state and every input connection has a state.

Connecting pattern consists of following elements:

  • Entity meaning the object that is connectable to another object
  • Output connections meaning the list that the connection owner is holding
  • States of the output connections meaning a state for every output connection of the entity

Here's a slide that shows how verified connections are built between Mary and her friends.

Here's a slide that shows how verified connections are discarded by Mary.

The following chapter will focus on how to model the connecting pattern and how to implement connections.

What new ideas or thoughts this chapter gave you?