This blog moved to medium->https://medium.com/@cocoamaemae

Thursday, December 6, 2018

Front End Development Tools

TaskRunner

Tool executing multiple tasks by only one execution. Tasks are like CSS preprocessor, Transpire, Module Bundler, etc...

e.g.
webpack
grunt
gulp

Module Bundler 

Tool stitching together a group of modules and their dependencies.

e.g.
webpack
browserify


Transpiler

The tool that read source code and written in one programming language.

e.g.
Babel
AltJS







Thursday, November 8, 2018

Kubernetes words

Kubernetes words


Node
Virtual machine or physical server.

Cluster
It means at least one master node and one node server.

Pod
It means a group of containers more than one. Minimum unit which is enable to deploy

Service
It means aggregation of multiple pods.


Monday, October 22, 2018

Regarding URL encode

What's URL encode?

URL can be sent only ASCII characters over internet. When doing http request with query parameters, query parameters are needed to be encoded.  It is called as percent encoding. It is defined in RFC3986.

How to do URL encode

Basically encode only values in query parameters to avoid collision of keys and =.
e.g.
http://example.com/?key1=value1&key2=value2....

reference

https://www.w3schools.com/tags/ref_urlencode.asp
https://en.wikipedia.org/wiki/Percent-encoding#Types_of_URI_characters

Monday, October 8, 2018

MySQL, MariaDB partitioning

What is partitioning?

The structure which divides one table data to multiple data.
When not using partitioning, one table data is aggregated to one file. On the other hand, when using partitioning, one table data is divided to multiple files. Especially table which is referenced can focus on and select performance can be improved. Also, deleting unnecessary data is easier.

There are vertical partitioning and horizontal partitioning, but explains regarding horizontal partitioning in this section.

Regarding MySQL, partition functionality is attached from 5.1
Regarding MariaDB, partition functionality can be used from initial version, 5.1

Assumption of using partition

The used column needs to have primary key.

Kind of partitioning

Range

Specify range of column value.
e.g.
CREATE TABLE sample_table (
    id int NOT NULL,
    day DateTime NOT NULL
    ) ENGINE=InnoDB
    PARTITION BY RANGE (id) (
    PARTITION p0 VALUES LESS THAN (3),
    PARTITION p0 VALUES LESS THAN (4)
)

List

Specify data list of column value.
e.g.

CREATE TABLE sample_table ( id int(2), day DateTime Not NULL ) ENGINE=InnoDB PARTITION BY LIST(id)( PARTITION p1 VALUES IN (1,2), PARTITION p2 VALUES IN (3,4,5));


Hash

RDBMS engine calculates hash and divides automatically.
e.g.
CREATE TABLE sample_table (
   id int(2),
   day DateTime NotNULL
 ) ENGINE=InnoDB
    PARTITION BY HASH(id)
    PARTITIONS 10;
;

Key

Specify more than one keys(primary or unique), and RDBMS engine create hash and divides automatically.
e.g.
CREATE TABLE t4 (
   id int(2) PRIMARY KEY,
   day DateTime NOT NULL
 ) ENGINE=InnoDB
    PARTITION BY KEY()
    PARTITIONS 10;
;





Monday, September 17, 2018

The reason why DB clustering need 3 nodes

Brief

Consider regarding database clustering consists of 3 nodes basically.

Database clustering which needs 3 nodes at least

  • Redis
  • MariaDB Galera Cluster
  • etcd
  • Consul
  • influxdb

Regarding distributed system, there is CAP theory.
  • Consistency
  • Availability
  • Partition Tolerance
In these features, Partition Tolerance is the biggest factor which defines the default number of database clustering.

If there were 3 nodes and split them, selected majority and continues to work.


If there were 4 nodes and split them, can not select majority and continue to work.
In the view of Partition Tolerance, database clustering needs 3 nodes at least. If increased nodes, the number of nodes would be odd number naturally.

Remark

There are database clustering which do not need.
  • Apache cassandra
  • Basho riak
  • Aerospike



Sunday, August 19, 2018

Comparison of Daas, Iaas, Paas, Saas, Faas, Baas, Caas


Brief

Recap regarding *aas
  • Daas
The abbreviation of Desktop as a service or Data as a service.
    • Desktop as a service
The service provides PC's desktop functionalities through internet.
    • Data as a service
It provides data management system via internet.

  • Iaas
The abbreviation of Infrastructure as a service.
The service provides physical infra like server body, unit, room or etc. Users have to configure layer above OS.

e.g.
AWS EC2
GCP CE
MS Azure

  • Paas
The abbreviation of Pratform as a service.
The service provides what is same as Iaas, and also provides OS. Users have to configure layer above FW.  *FW in paas is often limited by vendors.

e.g.
Google App Engine
Herok
Cloud Foundry

  • Saas
The abbreviation of Software as a service. Basically accessed by users a thin client via a web browser.

e.g.
Gmail
SAP
Saleceforce

  • Faas
The abbreviation of Function as a service.
The service provides small functionalities via webAPI. Mainly for application developers.

e.g.
AWS Lamda
Google Cloud Function

  • Baas/MBaas
The abbreviation of Backend as a service/Mobile backend as a service. It provides
functionalities for mobile application development.

e.g.
Fii
Firebase
  • Caas
The abbreviation of container as a service

e.g.
GKE
ECS
PKS


Wednesday, August 15, 2018

Proxy and Reverse Proxy


  • Proxy
- Server installed between intranet and internet.
- Client PCs access to internet through proxy.
- Web servers could see only proxy IP address as request originated.
- It is called as forward proxy as well.


  • Reverse Proxy
- Server installed in front of multiple web servers.
- Receives http requests instead of web servers.
- It has L7 load balancer functionality and distributes http requests.
- It has cache server functionality as well. Cache web contents like html, css, javascript, xml or etc and return them instead of web servers only if they were not changed after cached.

Front End Development Tools

TaskRunner Tool executing multiple tasks by only one execution. Tasks are like CSS preprocessor, Transpire, Module Bundler, etc... e.g. ...