Thursday, June 14, 2018

Databases: UUID as an ID

Output UUID in Go as a short string - Stack Overflow

example:
hex encoded, 36 chars: 123e4567-e89b-12d3-a456-426655440000

base64 encoded, 22 chars: Ej5FZ-ibEtOkVkJmVUQAAA

GoLang:
import "github.com/satori/go.uuid"
import "encoding/base64"
...
uid, err := uuid.NewV4()
base64.RawURLEncoding.EncodeToString(uid[:])
"base64.RawURLEncoding produces a base64 string (without padding) which is safe for URL inclusion, because the 2 extra chars in the symbol table (beyond [0-9a-zA-Z]) are - and _, both which are safe to be included in URLs"

Store UUID in an optimized way

UUID performance in MySQL? - Stack Overflow

MySQL GUID/UUID Performance Breakthrough

MySQL InnoDB Primary Key Choice: GUID/UUID vs Integer Insert Performance :: KCCoder

IoT: Voice controlled Alexa enabled USB charger

A bit strange combination, why would USB changer in car need voice control and internet connection? A random mutation in the IoT evolution, for natural selection...
No GUI may be good in car, if it works...

VIVA - Roav

Amazon.com: Roav VIVA, by Anker, Alexa-Enabled 2-Port USB Car Charger for In-Car Navigation, Hands-Free Calling and Music Streaming (Spotify Available Soon). For Cars with Bluetooth/CarPlay/Android Auto/Aux In: Cell Phones & Accessories