GithubHelp home page GithubHelp logo

icyleaf / sidekiq-with-ruby-and-crystal Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 20 KB

演示如何在 Ruby 和 Crystal 两个语言下运行 Sidekiq 并相互执行对方的 worker

Crystal 6.73% Ruby 69.72% JavaScript 3.02% CSS 2.71% HTML 17.82%
sidekiq crystal ruby demo-app

sidekiq-with-ruby-and-crystal's Introduction

打通 Sidekiq 的任督二脉 Ruby 和 Crystal

Sidekiq works in ruby together with Crystal

自己整理博文的演示代码,用于演示如何在 Ruby 和 Crystal 两个语言下运行 Sidekiq 并相互执行对方的 worker。

使用方法

$ git clone https://github.com/icyleaf/sidekiq-with-ruby-and-crystal.git
$ cd sidekiq-with-ruby-and-crystal
$ cd crystal && shards update
$ cd ../ruby_on_rails && bundle install
$ cd ..
$ gem install foreman
$ foreman start

之后的配合我写的博文服用。

文件结构

.
├── Procfile
├── README.md
├── crystal
│   ├── lib
│   ├── shard.lock
│   ├── shard.yml
│   ├── spec
│   └── src
│       ├── crystal_server.cr           # sidekiq server
│       ├── ruby_client.cr              # 调用 ruby 的 worker
│       ├── web.cr                      # web ui,端口 3120
│       └── workers                     # crystal workers
│           ├── ping1_worker.cr
│           └── ping2_worker.cr
└── ruby_on_rails
    ├── Gemfile
    ├── Gemfile.lock
    ├── Rakefile
    ├── app
    │   ├── assets
    │   ├── controllers
    │   ├── helpers
    │   ├── jobs
    │   ├── models
    │   ├── views
    │   └── workers                     # ruby workers
    │       ├── ping1_worker.rb
    │       └── ping2_worker.rb
    ├── bin
    ├── config
    │   ├── application.rb
    │   ├── boot.rb
    │   ├── database.yml
    │   ├── environment.rb
    │   ├── environments
    │   ├── initializers
    │   │   └── sidekiq.rb              # sidekiq 配置文件
    │   ├── locales
    │   ├── puma.rb
    │   ├── routes.rb
    │   ├── secrets.yml
    │   └── spring.rb
    ├── config.ru
    ├── db
    ├── lib
    ├── log
    ├── public
    ├── tmp
    └── vendor

sidekiq-with-ruby-and-crystal's People

Contributors

icyleaf 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.