程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python full stack series 145 Mongo operation service

編輯:Python

explain

I did before mongo Action object , But it's not practical enough ( Reuse ), So this time it is rewritten as a micro service , As part of the standard microservice system .

There are some benefits to using interface services :

  • 1 It is flexible to modify
  • 2 Can write corresponding documents , It will be more convenient to reuse
  • 3 It can be on the Internet ( Computing network ) Share on

Content

1 mongo Stored content

Storage can json data

mongo It has many functions , Generally speaking, it can be used :

  • 1 Log data (log):mongo The performance is fairly good , There is no problem storing logs .
  • 2 Master data (master): Of course, you can also change the log data into primary data ( The only merger in time and space ).
  • 3 Quasi static data (static): For example, some data may be loaded when a service starts , Such visits are not frequent , Data with little change .
  • 4 Metadata (meta): A summary of some tasks , Or some information generated by the algorithm in the process .

It is agreed that each library for different purposes should be suffixed with the table name , for example db_meta Indicates that this is a storage db Metadata Library .

stay DataMill There is also in the concept DM and DNWS, There are also parts that store data . But the main storage is can pkl data , Used in python Object persistence . Generally speaking , Each data can be relatively large (<=2GB).

Capacity design :


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved