I'm in the process of implementing an algorithm that requires connectivity between somewhere around 10 Raspberry Pi's over a LAN and could use some help in figuring out a means to get them to talk between each other.  
For some background on what I'll be using this for, I'll be connecting individual RaspPi's to SEL relays to gather metered data for a scale model microgrid of my school's actual power grid. With that metered data, I'd like to be able to send sampled data from each relay to other random relays in the testbed as part of a consensus algorithm (like hashgraph) to try and reduce an ICS-focused attack on our power grid like what happened to Ukraine a few years ago. The idea is that a byzantine fault tolerance system would work well for a power system spanned over a large geographical area.
As this is only a test to determine whether or not such an implementation would be beneficial for use in power substations, I've only been using python scripts for gathering the aforementioned data from the relays.  As such, I'm looking for a python-based means of communication between these computers.  I've looked into sockets, but I'm not sure whether or not that's an effective means for 10 computers trying to communicate with one another.
The ideal end-goal would be to simulate a man-in-the-middle attack on this testbed to see if the system would be able to correct and detect the threat in a timely manner.
Thanks in advance!
Any single system (Raspberry PI) can listen for incoming connections and use them in some specific way. 
Things to consider which might be of use:

Do you absolutely need all data?
It data sent often or rarely?
Will connections be randomly sending data?
Are the systems required to speak to one another?

High volume data with occasional loss might be a good solution using UDP.
If you really need all the data, use TCP and random connections to ensure data capture.
Would you need to send them to eachother or just to one or two sources? This might make your issue easier.
Regardless, systems are capable of handling much more than 10 connections so you should be ok. 
Not sure how else to help.
What's the best way to implement full communication between many RaspPis over a network?