Super minimal golang concurrent gui

Super minimal, rock-solid foundation for concurrent GUI in Go.

摘自https://github.com/faiface/gui这个仓库,gui是一个golang中的gui库。

库官方对并发的解释:

Why concurrent GUI?

GUI is concurrent by nature. Elements like buttons, text fields, or canvases are conceptually independent. Conventional GUI frameworks solve this by implementing huge architectures: the event
loop, call-backs, tickers, you name it.

In a concurrent GUI, the story is different. Each element is actually handled by its own goroutine,
or event multiple ones. Elements communicate with each other via channels.

This has several advantages:

  • Make a new element at any time just by spawning a goroutine.
  • Implement animations using simple for-loops.
  • An intenstive computation in one element won’t block the whole app.
  • Enables decentralized design - since elements communicate via channels, multiple communications
    may be going on at once, without any central entity.

使用docker mongodb

设置数据库

拉取docker image

1
2
3
4
docker pull mongo

ubuntu@primary:~$ docker run -itd --name mongodb -p 27017:27017 mongo --auth
68a051f20dc17927227301c76ebb1addaf70a68bca8001194edd19a51f2dfcf2

golang实现守护进程

守护进程介绍

​ 守护进程(daemon)是一类在后台运行的特殊进程,用于执行特定的系统任务。很多守护进程在系统引导的时候启动,并且一直运行直到系统关闭。另一些只在需要的时候才启动,完成任务后就自动结束。

Wispeeer User Guide

Usage: wispeeer -[gpdhv] [-i <alias>] [-n <title>]

If you are using it for the first time,
first execute the command “wispeeer init <Blog directory>” to initialize the blog.