huacnlee / Sails
Licence: mit
Create a Thrift Server use like Rails
Stars: ✭ 72
Programming Languages
ruby
36898 projects - #4 most used programming language
Labels
Projects that are alternatives of or similar to Sails
Zys
high performance service framework based on Yaf or Swoole
Stars: ✭ 812 (+1027.78%)
Mutual labels: thrift
Thrift2flow
Converts Thrift specs into Flow JavaScript type definitions
Stars: ✭ 39 (-45.83%)
Mutual labels: thrift
Nettythrift
Thrift on Netty, support TCP/HTTP/WebSocket at same port. support multiple Protocols at same time. multil Simple Clients with Connection Pool.
Stars: ✭ 60 (-16.67%)
Mutual labels: thrift
Impala Java Client
Java client to connect directly to Impala using thrift
Stars: ✭ 26 (-63.89%)
Mutual labels: thrift
Thriftclientpool
a thrift client connection pool & simple thrift use demo by golang
Stars: ✭ 32 (-55.56%)
Mutual labels: thrift
Finagle
A fault tolerant, protocol-agnostic RPC system
Stars: ✭ 8,126 (+11186.11%)
Mutual labels: thrift
Jboot
一个优雅的微服务框架,SpringCloud 之外的另一个选择,已经使用在用户量过亿的商业产品上,有超过1000家公司在使用Jboot做极速开发...
Stars: ✭ 655 (+809.72%)
Mutual labels: thrift
Hs2client
C++ native client for Impala and Hive, with Python / pandas bindings
Stars: ✭ 69 (-4.17%)
Mutual labels: thrift
Spring Thrift Api Gateway
Gateway for Apache Thrift requests processing that is built on Spring Cloud stack
Stars: ✭ 38 (-47.22%)
Mutual labels: thrift
Thrift Connection Pool
Apache Thrift客户端连接池(client connection pool)
Stars: ✭ 59 (-18.06%)
Mutual labels: thrift
Tns
tns provides distributed solutions for thrift, support service discovery, high availability, load balancing, the gray release, horizontal scaling, and so on.
Stars: ✭ 53 (-26.39%)
Mutual labels: thrift
Tchannel
network multiplexing and framing protocol for RPC
Stars: ✭ 1,122 (+1458.33%)
Mutual labels: thrift
Node Server Project
基于 node.js + express 技术栈,采用MVC结构设计、JWT + RESTful API、PM2服务监控的Node服务器端项目框架.
Stars: ✭ 47 (-34.72%)
Mutual labels: thrift
Thriftpy
Thriftpy has been deprecated, please migrate to https://github.com/Thriftpy/thriftpy2
Stars: ✭ 1,156 (+1505.56%)
Mutual labels: thrift
Sails
Sails, create Thrift app server like Rails.
Features
- Rails style Thrift server;
- Nonblocking mode;
- I18n support;
Installation
$ gem install sails
$ sails -h
ENV: development
Commands:
sails help [COMMAND] # Describe available commands or one specific command
sails new APP_NAME # Create a project
sails restart # Restart Thrift server
sails start # Start Thrift server
sails stop # Stop Thrift server
sails version # Show Sails version
Usage
Create new project
$ sails new foo
$ cd foo
$ sails start
Generate Thrift IDL
You can edit Thrift IDL in app_name.thrift
, and then generate it to ruby source code.
$ rake generate
Rake tasks
rake client:ping # client ping test
rake db:create # Creates the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:create:all to create all databases in the config)
rake db:drop # Drops the database from DATABASE_URL or config/database.yml for the current RAILS_ENV (use db:drop:all to drop all databases in the config)
rake db:fixtures:load # Load fixtures into the current environment's database
rake db:migrate # Migrate the database (options: VERSION=x, VERBOSE=false, SCOPE=blog)
rake db:migrate:create # Create new migration file
rake db:migrate:status # Display status of migrations
rake db:rollback # Rolls the schema back to the previous version (specify steps w/ STEP=n)
rake db:schema:cache:clear # Clear a db/schema_cache.dump file
rake db:schema:cache:dump # Create a db/schema_cache.dump file
rake db:schema:dump # Create a db/schema.rb file that is portable against any DB supported by AR
rake db:schema:load # Load a schema.rb file into the database
rake db:seed # Load the seed data from db/seeds.rb
rake db:setup # Create the database, load the schema, and initialize with the seed data (use db:reset to also drop the database first)
rake db:structure:dump # Dump the database structure to db/structure.sql
rake db:structure:load # Recreate the databases from the structure.sql file
rake db:version # Retrieves the current schema version number
rake generate # Generate code from thrift IDL file
Client connect to test
You can write test code in lib/tasks/client.rake
to test your thrift methods.
And then start sails server, and run rake task to test, for example:
sails s --daemon
rake client:ping
Deploy
$ sails s --daemon
$ ps aux
jason 2408 0.1 0.2 2648176 13532 s003 S 12:14下午 0:00.02 you_sails_app
jason 2407 0.0 0.0 2604916 1016 s003 S 12:14下午 0:00.00 you_sails_app [master]
$ sails restart
$ sails stop
API Documents
http://www.rubydoc.info/github/huacnlee/sails
TODO
- [ ] Reload without restart;
- [ ] Scaffold generator;
- [X] Multi processes;
- [ ] Default test case templates;
- [ ] Client rake task to test services;
- [ ] Write more framework test cases.
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].