f7u12:具有基于 Apache Cassandra 和 Spark 构建的分析的 2048 克隆
- v1_517309了解作者
- 193.9KB文件大小
- zip文件格式
- 0收藏次数
- VIP专享资源类型
- 0下载次数
- 2022-06-14 19:58上传日期
f7u12
这是一个演示项目,用于生成存储在 Cassandra 中的指标并使用 CQL 和 Spark 进行查询。
2048 的其他开源实现之一说“你会讨厌的最好的游戏”。 这让我想到了愤怒的家伙,所以我们来了。
用法
构建并启动服务器,然后浏览到
go get -u github.com/gocql/gocql
go get -u github.com/gorilla/mux
go get -u github.com/gorilla/websocket
go build
./f7u12 -help
Usage of ./f7u12:
-addr=":9000": IP:PORT or :PORT address to listen on
-cql="127.0.0.1": IP or IP:port of the Cassandra CQL service
-ks=

f7u12-master.zip
内容介绍
f7u12
=====
This is a demo project for generating metrics to store in
Cassandra and query with CQL and Spark.
One of the other open source implementations of 2048 says "The best game you'll ever hate." That made me think of rage guy, so here we are.
Usage
=====
Build & start the server then browse to http://localhost:9000
```
go get -u github.com/gocql/gocql
go get -u github.com/gorilla/mux
go get -u github.com/gorilla/websocket
go build
./f7u12 -help
Usage of ./f7u12:
-addr=":9000": IP:PORT or :PORT address to listen on
-cql="127.0.0.1": IP or IP:port of the Cassandra CQL service
-ks="f7u12": keyspace containing the f7u12 schema
```
Dependencies
============
Only Cassandra has to be running to run and play the game. The
game uses the embedded webserver to serve assets. All UI is static
or generated client-side.
Without the Go app running, the XHRs
will fail but it does not break the game. Libraries are checked in
and referenced locally because conference networks are unreliable.
The Spark job needs Cassandra running and does not contact the Go app.
Docker
======
The Dockerfile included in this repo uses scratch as the base. The
f7u12 app needs to be built statically to work without libc.
Build with CGO\_ENABLED=0 to make sure you get a static binary.
`CGO_ENABLED=0 go build -a`
Components
==========
* Javascript 2048 game widget called f7u12
* Go backend for storing and reading metrics in Cassandra
* Scala job that analyzes all game stats in Cassandra
* Bootstrap 3 / D3.js dashboard(s) to display metrics
Status
======
* Game is playable and sends every move to the Go app immediately.
* Go backend is complete. Moving to a more REST-compliant URL scheme might be nice.
* Spark job processes the move data and stores aggregates in Cassandra (that are readable through the Go app).
* Dashboard was demoed. Lots of ways to expand it.
Security
========
This application is intended as a demo and does not always follow best security practices.
Dependencies
============
Dependencies included in this repo have their own licenses.
* D3
* jQuery TouchSwipe Plugin https://github.com/mattbryson/TouchSwipe-Jquery-Plugin
* uuid.js https://github.com/pnegri/uuid-js
评论



相关推荐
- demo-websocketdemo-websocket
- Jmeterwebsocket插件包最新放在 apache-jmeter-5.1.1/lib/ext 下就可以使用该插件 版本更新,更新部分插件,以防止使用时,还需要继续下载
- netty websocketnetty websocket
- apache-jmeter-4.0 -带websocket插件jmeter测试websocket协议所需要jar包如下,已放到包中直接解压配置相应的环境变量即可用 JMeterWebSocketSampler-1.0.2-SNAPSHOT.jar jetty-http-9.1.2.v20140210.jar jetty-util-9.1.2.v20140210.jar jetty-io-...
- nifi-websocket:Apache NiFi WebSocket侦听器NiFi-WebSocket Work - in - Progress 该项目的目标是启用与NiFi的WebSocket接口,以便外部客户端可以将数据发送到流,而NiFi可以将结果流回客户端(如浏览器)。 为了简化用法,将协议用于客户端/服务器通信。 ...
- websocket例子websocket的长连接,这个例子主要是用的外汇牌价的数据更新上的,
- android webSocketandroid 端webSocket 实现即时通信
- Jmeterwebsocket插件包最新.rar放在 apache-jmeter-5.1.1/lib/ext 下就可以使用该插件 更新了其中一个版本,请注意更新,且更更新后才可继续使用
- WebSocket补丁.rar1、下载后拷贝到jmeter的安装目录,如:…\apache-jmeter-5.3\lib\ext 2、重启jmeter即可使用 插件: JMeterWebSocketSampler-1.0.2-SNAPSHOT.jar jmeter-websocket-samplers-1.1.jar websocket-api-9.1.1.v...
- ESP32-OV7670-WebSocket-Camera:演示使用WebSocket协议从ESP32 + OV7670硬件进行ESP32-OV7670-WebSocket-相机 演示使用WebSocket协议从ESP32 + OV7670硬件进行... #License由于部分代码取自esp-cam-demo,因此受Apache License 2.0许可证的约束。 您会在相应文件的顶部找到注释。 其余代码是公共领域
最新资源