This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Python2/Python3 compatible method to get local interfaces with sockets. """ | |
import socket | |
import array | |
import struct | |
import fcntl | |
def get_local_interfaces(): | |
""" Returns a dictionary of name:ip key value pairs. """ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
import requests | |
import asyncio | |
import re | |
import os | |
import aiohttp | |
import aiofiles | |
import time | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Reasonable | |
First, before you even start building software, make sure it's reasonable. | |
Does it use well established design patterns like https://learn.microsoft.com/en-us/azure/architecture/patterns/? | |
Does it make sense for the workload you're trying to service with it? | |
Can it operate on it's own? | |
Does it have pathways for expected failure points, like database connection failures, unhandled exceptions, etc. | |
Can it scale up in the way you've designed it if you have automated scaling? | |
Can you iterate on it without impacting your existing production instance and still have it tested in a valid scenario? |