liammoch
05/05/2022, 12:20 AMprudhvid
05/05/2022, 12:24 AMWe might want to allow certain actions only for paying users. In order to know if the user is a paying user, the authorization layer needs to fetch billing data from a 3rd party service
what's the suggested approach in cases like this?Joey
05/05/2022, 12:25 AMJoey
05/05/2022, 12:26 AMliammoch
05/05/2022, 12:27 AMJoey
05/05/2022, 12:28 AMJoey
05/05/2022, 12:28 AMliammoch
05/05/2022, 12:30 AMJoey
05/05/2022, 12:30 AMJoey
05/05/2022, 12:31 AMJoey
05/05/2022, 12:31 AMliammoch
05/05/2022, 12:33 AMJoey
05/05/2022, 12:33 AMliammoch
05/05/2022, 12:33 AMliammoch
05/05/2022, 12:34 AMJoey
05/05/2022, 12:34 AMJoey
05/05/2022, 12:34 AMGOMAXPROCS=24
, although that may not provide benefitJoey
05/05/2022, 12:34 AMJoey
05/05/2022, 12:35 AMJoey
05/05/2022, 12:35 AMliammoch
05/05/2022, 12:35 AMroot@887bcf1be58c:~/spicedb# lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 43 bits physical, 48 bits virtual
CPU(s): 48
On-line CPU(s) list: 0-47
Thread(s) per core: 2
Core(s) per socket: 24
Socket(s): 1
liammoch
05/05/2022, 12:36 AMliammoch
05/05/2022, 12:38 AMliammoch
05/05/2022, 12:39 AMstart := time.Now()
for k := 0; k < reps; k++ {
for i := 0; i < len(devices); i++ {
for j := 0; j < len(apps); j++ {
if parallel {
go checkPerms(i, j)
} else {
checkPerms(i, j)
}
}
}
}
fmt.Println("Time for sending requests", time.Since(start))
wg.Wait()
fmt.Println("Time for", reps*len(devices)*len(apps), "checks is", time.Since(start))
liammoch
05/05/2022, 12:40 AMJoey
05/05/2022, 12:41 AMliammoch
05/05/2022, 12:42 AMliammoch
05/05/2022, 12:43 AMecordell
05/05/2022, 12:45 AMliammoch
05/05/2022, 12:46 AM