Software Development and Technology Dis-n-Dat

Kuroun Seung
3 min readJan 29, 2018

--

Heroku Dyno

The Heroku Platform uses the container model to run and scale all Heroku apps. The containers used at Heroku are called “dynos.” Dynos are isolated, virtualized Linux containers that are designed to execute code based on a user-specified command. Source: https://www.heroku.com/dynos

Stack Vs Heap

  • Stack is very fast to access. Space is auto managed by CPU. Mostly local variable storing. Variable cannot be resized
  • Heap no limit on memory size. Variable can be access globally. Relatively slow compared to stack. Memory has to be manually managed. Variable can be resized.

Known so far, Ruby use heap!

CDN vs DNS

  • CDN is content delivery network which is a distributed server to improve speed of retrieve contain from the main server. When user request server to access some content, with user ip address server will redirect to content at the closest server network (usually cache content).
  • DNS is domain name server which maps the human readable thing name to actually ip address. Period.

Business Logic Storing

It is a good practice to have single source of truth of business logic in the code base. Change one place and work everywhere.

Technical Debt

when we sacrifice quality for quantity

Database query planner and optimizer

  • Be aware that each database system has their own planner and optimizer strategy, so if you want to master in optimizing the query, you should also look into individual database system that you are using.

Compiler (c/c++, objective-c) vs Interpreter (php, javascript, ruby)

  1. Compiler has two stages: compile and run but interpreter does type and error checking during interpreting code
  2. Compiler language run faster than interpreter because error and type checking are in separate compiled process
  3. Compiler has more performance and security advantages than interpreter because source code is transform into executable file which machine can only has in order to run the program. Machine does not have the source code while interpreter language, machine has to have the source code and interpreter in order to run the program.
  4. Compiler is inflexible (non cross platform) than interpreter language. Generally, it has static type while interpreter has dynamic type.
  5. THUS, the solution is hybrid both features such as java, python, and c#

Load Balancing Architecture

Json Web Token (JWT)

A token contains three tokens separated by dot (.). They are:

  1. header: encode not encrypt
  2. payload: encode not encrypt
  3. signature: sign on (encoded header + encoded payload)

Introduction to GraphQL

  • Graphql api and early access with github
  • Graphiql is an in browser ide for Graphql
  • Graphql schema: provides the object types used in your data. Each query or mutation generates documentation on graphiql.
  • Query __schema and __type is used to query the architecture of the query values
  • Use connection with edge keyword
  • Variable with exclamation mark (!) at the end is required
  • Two main operation in Graphql are query and mutation.

Mutation example:

  • Graphiql:
mutation EditExercise($input: EditExerciseInput!){mutation EditExercise($input: EditExerciseInput!){ editExercise(input: $input){ exercise { name } }}
  • Query variable:
{
“input”: {
“id”: “59419c41a5d85c6e24000007”,
“name”: “test 2”
}
}

Micro services Concept

Monolith (tightly coupled) -> Traditional SOA (looser coupled, distributed monolith) -> Microservices (loosely coupled, more independent service)

Microservices is a variant of SOA as a collection of loosely coupled applications. For example, each application can have independent technology.

5 Constraints:

  1. Elastic: independent scale up and down
  2. Resilient: quickly to recover without affect other application
  3. Composable: an interface that is uniform supporting composition
  4. Minimal: contain only highly cohesive entities
  5. Complete: must function completely

Resilient? Flexibility and ability to recover quickly

Stateless vs Stateful microsevices (Microsoft Asure fabric)

  • Stateless: queue and cache mechanism, partitioned storage, maintain state consistency
  • Stateful: no queue and cache mechanism, stateful tier, low latency. Example, storing session, and shopping cart

Latency and Bandwidth:

  • Latency: amount of time to get response
  • Bandwidth: amount of data flow per time unit

--

--