Deno 서버기술

Deno

node의 창시자가 node가 쓰레기(좋게말하면 장난감)이라는 것을 알리기 위해 native TypeScript로 돌아가는 언어를 만들었다.

  • https://github.com/denoland/deno

웹프레임웤

  • https://github.com/oakserver/oak
  • https://github.com/keroxp/servest
  • https://github.com/drashland/deno-drash
  • https://github.com/zhmushan/abc
  • https://github.com/sholladay/pogo

참고

  • https://dev.to/craigmorten/what-is-the-best-deno-web-framework-2k69

파이썬 서버기술

파이썬으로 제대로된 서버개발을 한 적은 없어서 몇 가지 조사하다가 발견한것들

WebFramework

  • Django
  • Flask
  • Bottle https://bottlepy.org/docs/dev/
  • Pylons
  • Pyramit https://trypyramid.com/
  • Falcon
  • Eve https://github.com/pyeve/eve
  • CherryPy
  • FastAPI https://github.com/tiangolo/fastapi
    https://towardsdatascience.com/why-we-switched-from-flask-to-fastapi-for-production-machine-learning-765aab9b3679
  • https://github.com/juancarlospaco/faster-than-requests

엄청많다

ORM

  • SqlAlchemy
  • https://github.com/python-gino/gino
  • PonyORM
    https://ponyorm.org/
  • DjangoORM

SQL

  • PyPika
    https://pypika.readthedocs.io/en/latest/
  • https://github.com/tmuzzin/PythonSQLGenerator
  • https://github.com/hhyo/mybatis-mapper2sql
  • PyDAL
    https://github.com/web2py/pydal

비동기 기술

  • celery
  • faust
  • async
  • PyKafka
    https://pykafka.readthedocs.io/en/latest/
  • kafka-python
    https://github.com/dpkp/kafka-python
  • Winton Kafka Streams
    https://github.com/wintoncode/winton-kafka-streams

개발환경

  • anaconda
  • miniconda
  • virtualenv
    https://virtualenv.pypa.io/en/latest/
  • virtualenv wrapper
    https://virtualenvwrapper.readthedocs.io/en/latest/
  • pew
    https://github.com/berdario/pew
  • tox
    https://tox.readthedocs.io/en/latest/
  • nox
    https://nox.thea.codes/en/stable/
  • pipenv
    https://pipenv.pypa.io/en/latest/advanced/
    package.json처럼 실행환경을 지정할 수 있게 하는게 낫지 않을까? 커스텀 환경을 사용하려면 sh를 별도로 만드는게 나을 것 같다.
  • poetry
    https://python-poetry.org/docs/

실행환경

  • Gunicorn
  • uWSGI
  • Uvicorn(ASGI)
    https://www.uvicorn.org
  • supervisord
    http://supervisord.org/
  • honcho
    https://github.com/nickstenning/honcho
  • forever
  • pm2
  • unicorn

배포환경

  • zappa – aws lambda (반푼이)
  • serverless – aws lambda
  • https://github.com/GoogleCloudPlatform/functions-framework-python
  • https://github.com/tiangolo/uwsgi-nginx-flask-docker
  • https://github.com/tiangolo/uvicorn-gunicorn-fastapi-docker

기타 참고

  • https://dev.to/sm0ke/flask-dashboard-simple-open-source-starters-4noc

프로젝트 용어사전

프로젝트 시작할 때 하는 일

  1. 프로젝트의 목적과 목표 정의
  2. 혼용되서 사용하는 용어 통일
  3. 도메인 모델 설계

이 중에서 1번도 잘 안되는 경우가 많은게 문제인데…
그래서 2번은 엄두도 못 내는…

그래도 최소한 1,2번이 진행되야 제대로 된
완성도 있는 디비설계가 되서
프로젝트가 원활하게 진행된다

기존 프로젝트에 쓰던걸 그대로 가져와서 (은행권이나 공공기관 프로젝트…등등) 들이미는 경우도 많은데.. .
프로젝트마다 특성이 달라서 같은 용어도 다르게 불리는 경우가 많아 그냥 적용하기는 힘들다.

사례를 쓰고싶은데 여백이 부족하다.. 어쨌든 많다

실행방법

나주에

REF

State Machine libray

상태관리

프로그램을 만들다 보면 상태가 중요한 요소일 경우가 많은데
회원의 상태, 프롯스의 상태
상태를 변경하기 위한 동작들
기존 상태 메모리에 로드, 디스크 저장 등등

별도로 관리하지 않고 디비에서 가져와서 한개씩 처리하면서 트랜잭션 거는거도 가능하지만
실수가 잦다

그래서 하나 만들어볼까 하다가 찾아보니 잔뜩 나와서 일단 정리

REF

  • https://statecharts.github.io/
  • https://kentcdodds.com/blog/implementing-a-simple-state-machine-library-in-javascript
  • https://github.com/davidkpiano/xstate
  • https://github.com/Ankzz/easyfsm/
  • https://github.com/hekailiang/squirrel