- Data Pressure: Ability to process data within reasonable time and cost
- Whenever one of the dimensions of Data Pressure is broken, we'd invent new technology.
- RDBMs optimize for storage which makes sense as storage was expensive in 70s. But this happens at the cost of CPU, where CPU is going insane pulling data from all over the disk and stitch it together. Nowadays storage is cheap and CPU isn't. So why use a system that depends on an expensive resource.
- RDBMs/SQL gives structure with power to create ad hoc queries while noSQL gives instantiated views for given queries. In this way noSQL forces more product driven development where one has to discover access patterns.
- noSQL != non-relation. All data in universe is relational.
- Do not compare RDBMS with noSQL and specially MySQL and DynamoDb.
- No, Table is not the same, and no Document is not same as records
- For writes, DynamoDb uses 3 replica and returns when 2 confirm the write
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 React, { useState } from "react"; | |
import DOMPurify from 'dompurify'; | |
function Xss(){ | |
const [text, setText] = useState(""); | |
const [script, setScript] =useState(""); | |
const [imgg, setimgg] = useState(""); |
When talking about creating a lot of microservices for one workflow:
Again, this is something that looks good on paper, but immediately leads to several questions:
Do you feel the need to deploy six applications to process 1 xml file?
Are these microservices really independent from each other? They can be deployed independently from each other? With different
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
-agentlib:yjpagent=probe_disable=*,disablealloc,disabletracing,onlylocal,disableexceptiontelemetry,delay=10000,sessionname=PhpStorm2016.3 | |
-Dide.no.platform.update=true | |
-Dsun.io.useCanonCaches=false | |
-ea | |
-server | |
-Xms2048m | |
-Xmx4096m | |
-XX:+AggressiveOpts | |
-XX:+CMSClassUnloadingEnabled | |
-XX:+CMSIncrementalMode |
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
#!/bin/bash | |
urlencode() { | |
# urlencode <string> | |
local length="${#1}" | |
for (( i = 0; i < length; i++ )); do | |
local c="${1:i:1}" | |
case $c in | |
[a-zA-Z0-9.~_-]) printf "$c" ;; | |
*) printf '%s' "$c" | xxd -p -c1 | | |
while read c; do printf '%%%s' "$c"; done ;; |
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
find . -depth -name '* *' \ | |
-execdir bash -c 'mv "$1" "${1// /_}"' _ {} \; |
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
#!/bin/bash | |
# Without $1, it'd use your Public IP | |
curl -s http://ip-api.com/json/$1 | python -m json.tool |
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
#!/bin/bash | |
# Kill all running containers | |
docker kill $(docker ps -q) |
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
#!/bin/bash | |
perl -pe 's/(^|_)./uc($&)/ge;s/_//g' |
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
echo "Restoring $1" | |
queries=" | |
-- Set network buffer length to a large byte number\n | |
set global net_buffer_length=1000000;\n | |
-- Set maximum allowed packet size to a large byte number\n | |
set global max_allowed_packet=1000000000;\n | |
-- Disable foreign key cheking to avoid delays,errors and unwanted behaviour\n | |
SET foreign_key_checks = 0;\n | |
source $2;\n |
NewerOlder