[PYTHON] Comparison of Apex and Lamvery

Preface

For a while, I made a tool (OSS) called Lamvery that makes it easy to deploy and manage AWS Lambda, and [Introduced in Qiita](http: / /qiita.com/marcy-terui/items/1617ab4e20e3339d1930) I was allowed to do it, but although it has become quite convenient to use, it has recently appeared Apex. .com / apex / apex) has a very high degree of attention [^ 1] and I was jealous, so I decided to write a comparative article.

Click here for a description of Lamvery. http://qiita.com/marcy-terui/items/1617ab4e20e3339d1930 https://github.com/marcy-terui/lamvery/blob/master/README.md

ʻApex` can get a feel for it by looking at the wiki. https://github.com/apex/apex/wiki

One of them is my own work, so I'd like to be as fair as possible, but please take a look if you're on the Lamvery side. In addition, I will also post explanations and opinions as the author. For your information.

Also, Apex intends to grasp various things from the opposition, but it would be helpful if you could point out any mistakes.

Below is a comparison as of January 29, 2016.

Comparison of basic parts

item Apex Lamvery
Implementation language Go Python
Installation method Binary download PyPi,rpm,deb
Supported runtime(Lambda) Go, Python, Node.js Python, Node.js
Managed Project unit Function unit
Configuration file format JSON YAML + jinja2

Commentary and views

Implementation language

It's a matter of taste.

Installation method

Apex Since the installation method is Go, it is binaryized for each dependency, and is ʻApexstrong just to download and put it? Lamvery You need to set up thePython + pipenvironment. From there, you can usepip` to install all the dependencies with one command. [^ 2] We also provide yum and deb packages that allow you to create a completely independent environment including Python for use in CI environments. https://github.com/marcy-terui/lamvery#installation

Supported runtime (Lambda)

Apex ʻApex is characterized by supporting Golang, which Lambda does not officially support. Besides, it seems that it corresponds to AltJS system such as Babel [^ 3] Lamvery Lamvery does not intend to support Gounless otherwise requested. [^ 4] Node.js is experimental support for now as I am the Python` main. [^ 4]

I think it's not too far away for the official to support Go, but what about? I wonder if everyone wants to use such an informal method ...?

Managed

Apex
ʻApexcan manage multiple Lambda Functions in one Project, and there are a configuration file applied to the Project and a configuration file applied to each Function. Lamvery Lamverycan only be managed on a Function basis. This is where I am thinking about what to do in the future. However, since it is a Function unit, it is limited to Python, but if you install only the library used by that Function in thevirtaulenv [^ 5] virtual environment, it will be automatically collected in consideration of storage efficiency. And I try to upload it. This is because ʻApex only uploads everything under a specific directory, so [Lambda source code capacity is limited](http://ijin.github.io/blog/2016/01/14/monitor -lambda-capacity /) Isn't it a big difference considering that? Only for Python. .. .. [^ 6]

Configuration file format

Apex
It's just JSON. Lamvery
Although it is YAML, it is covered with the template engine jinja2. That is, it supports variable embedding and dynamic writing.

Function comparison

item Apex Lamvery
Deploy
Rollback
Arbitrary Alias settings
Run(Invoke)
Exclusion list
Confidential information delivery
CloudWatch Events(Schedule execution) ☓[^8]
CloudWatch Logs(View execution log)
CloudWatch Metrics(Startup time etc.) ☓ [^7]

Commentary and views

Of the features in both, only the parts that have characteristic differences are listed.

Deploy & Rollback Lambda's special versioning specifications are easy to understand, so I think you should read it ↓ http://dev.classmethod.jp/cloud/aws/lambda-versioning/

Apex
Versioning [^ 9] is required. It is executed by setting Alias called current at the time of deploy and replacing current with the latest previous version at the time of rollback. However, this ʻApex` method breaks down if Alias is replaced by something other than deploy and rollback. That's fine, but even if you repeat deploy and rollback twice, it will break (see below). apex_rollback.png At the end, I want it to return to "2", but I know that it will fail, and it will return to "3". For the time being, there is an option to specify an arbitrary version at Rollback, but I think it is nonsense that humans have to remember the version number.

Lamvery
Due to the above problems, Lamvery uses another method. Simply put, when deploying, add another Alias to the previous version and roll back to it. This is to enable operations such as temporarily rewinding to the previous version two or more.

There is also a function to attach an arbitrary Alias, so you can use it in combination for flexible version control. If you want to use it as simply as Apex, you can just use Deploy and Rollback with versioning enabled. Versioning is required if you use Rollback, but you can turn it off in the config file if you don't. You can also set Alias to be set at the time of deployment. This is also a necessary option based on the Lambda capacity limit mentioned earlier. I think it is. You can turn it off for minor fixes and turn it on when you need it so you can roll back.

Invoke

Apex It is possible to start one-shot and receive input one after another from standard input (Streaming) and execute synchronously continuously [^ 10]. Lamvery Only one-shot execution. Streaming wants to run asynchronously [^ 10] and support ClooodWatch Logs in a tail-like way.

Delivery of confidential information

Apex Specify as an environment variable when deploying. It cannot be included in version control [^ 11]. Looking at the source and Wiki, it seems that Python does not support it ...? Lamvery
You can use KMS to include encrypted confidential information in the configuration file for version control [^ 10]. ~~ Currently, only Python is supported, but I would like to support Node.js in the near future. ~~ Node.js is also supported (2015.02.03)

Impressions and summary

So far, I think there are advantages and disadvantages overall. However, I think that the rollback specifications and CloudWatch Events support are a big difference, so I would appreciate it if you could pay attention not only to ʻApex but also to Lamvery`, considering that Japanese support is possible [^ 12]. :-) [^ 13]

https://github.com/marcy-terui/lamvery

[^ 1]: Number of stars on GitHub, Apex Japanese article and [Lamvery's Qiita article](http://qiita. com / marcy-terui / items / 1617ab4e20e3339d1930) Compare the number of magazines. .. .. [^ 2]: pip is gem in Ruby and npm in Node.js. If you install Python with pyenv, it is included as standard, and if it is a Linux system, it is often installed from the default package manager. [^ 3]: It supports by launching Go binary from Node.js as a child process and exchanging using standard input / output. [^ 4]: I'm worried because there aren't many users. .. .. [^ 5]: Python library that can create an independent Python execution environment that does not share libraries etc. [^ 6]: Because I use it mainly in Python, I would like to respond if someone familiar with Node.js can just give me an idea. [^ 7]: Coming soon [^ 8]: Will it be supported? Under discussion at Issue [^ 9]: publish option for Lambda

Recommended Posts

Comparison of Apex and Lamvery
Comparison of gem, bundler and pip, venv
Comparison of class inheritance and constructor description
Comparison of L1 regularization and Leaky Relu
Speed comparison of murmurhash3, md5 and sha1
Comparison of k-means implementation examples of scikit-learn and pyclustering
Comparison of Python and Ruby (Environment / Grammar / Literal)
Comparison of online classifiers
Comparison of fitting programs
A quick comparison of Python and node.js test libraries
DNN (Deep Learning) Library: Comparison of chainer and TensorFlow (1)
Comparison of Windows Server and Free Linux to Commercial Linux
Comparison table of frequently used processes of Python and Clojure
Comparison of CoffeeScript with JavaScript, Python and Ruby grammar
Mechanism of pyenv and virtualenv
Pre-processing and post-processing of pytest
Combination of recursion and generator
Combination of anyenv and direnv
[Reinforcement learning] Explanation and implementation of Ape-X in Keras (failure)
Explanation and implementation of SocialFoceModel
Differentiation of sort and generalization of sort
Comparison of 4 Python web frameworks
Coexistence of pyenv and autojump
Comparison of how to use higher-order functions in Python 2 and 3
Use and integration of "Shodan"
Problems of liars and honesty
Comparison of Hungarian law and general-purpose solver for allocation problems
Occurrence and resolution of tensorflow.python.framework.errors_impl.FailedPreconditionError
Python 3 sorted and comparison functions
Source installation and installation of Python
Introduction and tips of mlflow.Tracking
Speed comparison of Wiktionary full text processing with F # and Python
Comparison of time series data predictions between SARIMA and Prophet models
Story of speed comparison of sort of numerical value and character string (unfinished))
Summary of differences between Python and PHP (comparison table of main items)
[Python] Basic pattern and usage of if statement (comparison operator and Boolean operator)
Environment construction of python and opencv
Various of Tweepy. Ma ♡ and ♡ me ♡
Basic knowledge of Linux and basic commands
Order of arguments of RegularGridInterpolator and interp2d
The story of Python and the story of NaN
Introduction and Implementation of JoCoR-Loss (CVPR2020)
Java and Python basic grammar comparison
Explanation and implementation of ESIM algorithm
Danger of mixing! ndarray and matrix
Installation of SciPy and matplotlib (Python)
Significance of machine learning and mini-batch learning
Introduction and implementation of activation function
Memorandum of saving and loading model
Explanation and implementation of simple perceptron
Calculation of homebrew class and existing class
This and that of python properties
Speed comparison between CPython and PyPy
Installation and easy usage of pytest
Clash of Clans and image analysis (3)
Speed comparison of Python XML parsing
Comparison of 2020 Standalone DB Migration Tools
Features of symbolic and hard links
Coexistence of Python2 and 3 with CircleCI (1.0)
Summary of Python indexes and slices
Aggregation and visualization of accumulated numbers