Coder Social home page Coder Social logo

bigpromotion's Introduction

大促类运营活动的开发套路(本工程用beego+k8做微服务化)
这个工程的主要模块是
1)业务模块
1.1)接入层
1.2)service层
2)初始化模块
2.1)go writehandler()
2.2) go readhandlerZ()
3)持久层
3.1)热数据持久化技术选型redis
3.2)数据一致性,redis做分布式锁
3.3)配置信息持久化技术选型etcd,etcd的优势是不断watch

其中:
1)业务模块的持久层用redis,数据一致性用redis分布式锁
2)业务模块运营活动请求req到reqchan协程的管道
3)初始化模块的writeHandler协程读出reqchan的信息,进行封装,lpush到redis的queue中
4)初始化模块的readhandler协程从queue中取req做逻辑处理,然后放入resultchan管道中
5)业务模块非阻塞的读取resultchan中的返回信号,返回接入层

总结:
本工程的业务主要是做了首页的逻辑,没有把整个大促活动逻辑放到工程里面,主要关注点的是运营活动的处理思路。

bigpromotion's People

Contributors

zengxiaosen avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.