What are the non-websever golang projects you have worked on?

blov · · 474 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hello, Ive briefly fiddled with golang and really like it so far. I love the simplicity of go routines. I work mostly with large python projects at work and have been thinking of starting to implement go instead. However, most of the projects I read about use go to do web development. I understand that go was designed for that application in mind but have any of you had good experiences implementing go for other kinds of projects (gui apps, utilities, drivers, etc)?</p> <p>I would love to hear about projects outside of web dev that you have used go for. In particular, parallelized programs (not concurrent).</p> <p>Thanks and look forward to hearing from you.</p> <hr/>**评论:**<br/><br/>drjokepu: <pre><p>Lots of backend services. Message is read from the message queue, stuff gets processed, response is written to the message queue. Go feels like a natural fit for this type of workflow.</p></pre>forfunc: <pre><p>This.</p></pre>DeedleFake: <pre><p>There are a bunch of really teeny, sometimes half-finished projects that I&#39;ve done, but here are some of the more interesting and at least mostly finished ones:</p> <ul> <li><a href="https://github.com/DeedleFake/wdte" rel="nofollow">WDTE</a>, an extremely simple, functional-ish, lazily evaluated, embedded programming language designed for scripting. It doesn&#39;t even have a command-line interpreter as it&#39;s designed primarily for use as a library.</li> <li><a href="https://github.com/DeedleFake/sirdsc" rel="nofollow">sirdsc</a>, a simple program for generating single image random dot stereograms. This one&#39;s older and the code is pretty badly structured, but it should still work. I haven&#39;t tested it in a while.</li> <li><a href="https://github.com/DeedleFake/ggigl" rel="nofollow">ggigl</a>, an implementation of the Go game in Go. Because why not? I don&#39;t remember exactly how far I got on this, but I remember it mostly working, I think. I don&#39;t think I&#39;d quite gotten to scoring yet. There&#39;s no AI to play against, either, I think.</li> <li><a href="https://github.com/DeedleFake/graph" rel="nofollow">graph</a>, a package for generating various types of mathematical graphs.</li> <li><a href="https://github.com/DeedleFake/Go-PhysicsFS" rel="nofollow">Go-PhysicsFS</a>, bindings for PhysicsFS, an archive abstraction system based on Quake&#39;s package loading system.</li> </ul> <p>I&#39;ve also done some stuff that I haven&#39;t open-sourced, but I don&#39;t remember most of them that well. The one that I remember the most was a little GTK+ program for displaying Dilbert and XKCD comics.</p></pre>cdoxsey: <pre><p>I wrote some code to splice mp3s: <a href="https://godoc.org/github.com/badgerodon/mp3" rel="nofollow">https://godoc.org/github.com/badgerodon/mp3</a>. Using this you could inject one mp3 into another on the fly.</p> <p>At work I built an application which schedules the evaluation of monitors. Each monitor has a scheduling goroutine that speaks to a pool of evaluation goroutines, who speak to various backend systems, and, if successful, the result is also passed to a writer which hands it to another system. All the communication goes through channels.</p> <p>The stages are pretty easy to understand and test and they actually perform well at scale without any special code. One not-too-big machine easily handles 200k monitors without breaking a sweat.</p> <p>In fact it worked so well I accidentally broke the exp backoff algorithm once so that it basically retried infinitely with no delays (integer overflow :) ), and it barely affected the other monitors. (Yay for random scheduling!) </p> <p>Having worked with a few python apps like this, the default behavior is for an outlier to come in and bring the whole program to its knees, leading the developer to try and introduce some sort of parallelism, only to realize that python doesn&#39;t actually do that well because of the GIL, so they turn to gevent, which proceeds to monkey patch everything, but invariably there&#39;s something somewhere that doesn&#39;t work with gevent (I&#39;m looking at you gRPC), and you&#39;re left scratching your head for a week trying to figure out what the heck is going on, and finally you get something kinda working, only to then discover it still only really uses one core of the machine, and basic operations are way slower than they ought to be, so then you start rewriting chunks of the code in cython, till half your code is this bizarre impossible to understand hybrid-C-Python thing.</p> <p>And then you give up and write some boring Go code.</p></pre>predatorian3: <pre><p>Something small I did for my company was to make a program to send an event from Zabbix to our event management system and chat program. It was my first real go project. I was having issues with Bash taking input with multiple newlines in the message, and I wasn&#39;t able to get Ruby dependencies in that Network. So I used Go and had one binary for which ever system. </p></pre>slowratatoskr: <pre><p><a href="https://wiki.wireshark.org/UCP" rel="nofollow">UCP</a>, <a href="https://en.wikipedia.org/wiki/CIMD" rel="nofollow">CIMD</a>, <a href="https://en.wikipedia.org/wiki/Short_Message_Peer-to-Peer" rel="nofollow">SMPP</a> protocol implementations. </p></pre>Sythe2o0: <pre><ol> <li>Evolutionary computation library: <a href="https://bitbucket.org/StephenPatrick/goevo" rel="nofollow">link</a>. This is sort of parallel. </li> <li>Game engine: (no link, closed source until this weekendish). This is very parallel.</li> <li>Audio engine: <a href="https://github.com/200sc/klangsynthese" rel="nofollow">link</a>. It&#39;s a little too in its infancy to do parallelization optimizing tricks, and it really just wants vectorized SIMD functions for what it&#39;d be doing anyway (this applies to everything here)</li> <li>Computational geometry library: <a href="https://github.com/200sc/go-compgeo" rel="nofollow">link</a></li> </ol></pre>lethalman: <pre><p>I wrote an smtp proxy for my old company . It&#39;s not public.</p></pre>zekjur: <pre><p><a href="https://robustirc.net" rel="nofollow">https://robustirc.net</a> is an IRC network implemented as a distributed system on top of the Raft consensus library.</p> <p><a href="https://gokrazy.org" rel="nofollow">https://gokrazy.org</a> is a Raspberry Pi 3 application platform, implemented purely in Go.</p></pre>mwholt: <pre><p>A few months ago I wrote <a href="https://github.com/mholt/photobak" rel="nofollow">photobak</a> to download my content from Google Photos so I can have local copies of all my pictures and back them up in my own home. It performs downloads in parallel.</p></pre>Gudumba: <pre><p>Any plans on doing an UI for this? I would love to have a tool like this for my parents and family to backup their stuff. </p></pre>chewxy: <pre><p>A deep learning/graph computation library (<a href="https://github.com/chewxy/gorgonia" rel="nofollow">https://github.com/chewxy/gorgonia</a>)</p></pre>2fplus1: <pre><p>Some non web Go stuff I&#39;ve done:</p> <ul> <li><a href="https://github.com/thraxil/cyclo" rel="nofollow">https://github.com/thraxil/cyclo</a> - cyclomatic complexity analyzer (it turns out that Go&#39;s parse tree is really easy to work with)</li> <li><a href="https://github.com/thraxil/mediacheck" rel="nofollow">https://github.com/thraxil/mediacheck</a> - commandline utility that you point at a web page and it checks that all the embedded media (CSS/JS/images) exist, don&#39;t have HTTPS issues, and will all load within a timeout. Runs the checks in parallel.</li> <li><a href="https://github.com/thraxil/mountwatch" rel="nofollow">https://github.com/thraxil/mountwatch</a> - checks the status of mounted drives and logs results to graphite.</li> </ul></pre>gempir: <pre><p>Twitch chat bot. It logs the chat and just writes the logs as files. It works with gzip and stores a lot of chat data efficiently k would think. </p> <p>I also wrote an IRC proxy for twitch, because the ratelimiting of twitch can be annoying when you start a new project and this way I can just use my proxy to avoid that annoyance. </p> <p>These are the projects:</p> <p><a href="https://github.com/gempir/gempbotgo" rel="nofollow">https://github.com/gempir/gempbotgo</a> <a href="https://github.com/gempir/relaybroker" rel="nofollow">https://github.com/gempir/relaybroker</a> </p></pre>ringMyPachelbel: <pre><p>A meme application that takes photos and adds captions, allows pictures to be juxtaposed, and (soon) lets you put a twitter window around the image.</p> <p>I used golang because the image library made it easy to decode images from the internet (you can download through the application) and put them in a format I wanted. Probably my favorite use of golang so far!</p></pre>technicalviking: <pre><p>My very first project in Go was... in all honestly probably not doing justice to the power of the language. I use a windows laptop issued by work, and I got tired of the icons on the desktop constantly getting shuffled around like a tornado had rolled through. So I wrote a little script that would 1) Save the location of the icons when I had them set up the way I like, and then 2) restore the icons to that saved state later on when the tornado hit. </p> <p>Now I&#39;m writing a tool that&#39;ll allow me to define a project by it&#39;s code repos, build environment, container config settings, db migrations, etc... and be able to onboard someone into the project with a single command.</p></pre>ncaio: <pre><p>That&#39;s true. I&#39;m an old school sysadm and I&#39;m coding for pentest stuffs. Smtp servers and etc. </p></pre>dilap: <pre><p>backend of a realtime pvp mobile game; it&#39;s doing stuff like running the game simulation (we want to be server-authoratative to prevent cheating) and communicating w/ clients via udp.</p> <p>various api servers over tcp. small command line utilties, e.g., parsing excel spreadsheets into game configurations.</p> <p>for some really cool open source stuff (not mine!), check out <a href="https://github.com/fogleman" rel="nofollow">https://github.com/fogleman</a></p> <ul> <li>primitive, creates art by recreating photos using simple geometric primitives (available on the appstore)</li> <li>an nes emulator</li> <li>a software opengl implementation</li> <li>lots of other stuff...</li> </ul></pre>hajimehoshi: <pre><ul> <li><a href="https://hajimehoshi.github.io/ebiten/" rel="nofollow">Ebiten</a>: A 2D game engine</li> <li><a href="http://blockbros.net/tsugunai/" rel="nofollow">Clock of Atonement</a>: A mobile game written with Ebiten (not open-source)</li> <li><a href="https://github.com/hajimehoshi/oto" rel="nofollow">Oto</a>: A multi-platform audio playback</li> <li><a href="https://github.com/hajimehoshi/go-mp3" rel="nofollow">go-mp3</a>: An MP3 Decoder</li> </ul></pre>justinisrael: <pre><p>At my studio, besides web based services, we use it for other solutions like environment management process bootstrapping, and image processing and caching. </p></pre>osteele: <pre><p>I just wrote a <a href="https://github.com/osteele/gojekyll" rel="nofollow">clone</a> of the Jekyll blogging engine. This was going to be my weekend project for learning Go, and I got carried away.</p> <p>It was about 6x faster than the Ruby version without parallelism (but without any attempt at optimization either). Parallelizing it was near-trivial, and ended up about 20x faster than Ruby / 3x faster than single-threaded version. (<a href="https://github.com/osteele/gojekyll/blob/master/docs/benchmarks.md" rel="nofollow">Benchmarks here</a>.)</p> <p>In order to get this to work, I ended up <a href="https://github.com/osteele/liquid" rel="nofollow">implementing the Liquid template engine</a> too.</p> <p>This was my first experience with Go. Between the tooling, language, and compile speed, I found it completely pleasant.</p></pre>nadoolau: <pre><p>proxy: <a href="https://github.com/nadoo/glider" rel="nofollow">https://github.com/nadoo/glider</a></p></pre>TheRealHellcat: <pre><p>Chatbot.</p> <p>Or at least the daemon running permanently in the background keeping the connection to the server, handling the IRC protocol and some special functions that are not forwarded to the PHP backend.</p></pre>

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

474 次点击  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传