Git Product home page Git Product logo

backtalk's Introduction

Backtalk: API Web Server
Build Status Crate Info Documentation

Backtalk is a web framework for Rust. Much is subject to change and it's not ready for writing production sites, but the structure is there, and I'm glad to answer questions/help out if the documentation isn't enough.

  • Asynchronous – use Futures for everything, handle thousands of concurrent connections.
  • Realtime – expose a streaming API, and push live events to clients.
  • Simple – only a couple hundred lines of code.
  • Opinionated – exclusively for JSON-based RESTful APIs.
  • Magicless – no macros, no unsafe, runs on stable Rust.

A simple server example:

let mut server = Server::new();
let database = memory::MemoryAdapter::new();
server.resource("/cats", move |req: Request| {
  database.handle(req)
});
server.listen("127.0.0.1:3000");

You can look in the examples directory for more information, or the blog post walking through the examples.

Inspiration

  • Feathers.js
  • Phoenix
  • Rocket.rs

backtalk's People

Contributors

lord avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

backtalk's Issues

Websocket support

Just curious to know, if you're planning to support websockets instead of (or in addition to) SSE?

Misc task list

  • should adapters accept a serializable object instead? Wait for default types in Rust maybe.
  • make Sender be able to resend missed messages with the LastId header or whatever it's called
  • server should maybe double check that the request is valid?
  • better and faster routing than hash matching
  • is_eventsource in server should only work for GET? 403 otherwise? better spec compliance
  • combine std_error throughout into one function
  • better and actually spec compliant Accept header matching, should throw error if can't return either eventsource or json
  • add route to Server for a Req->Resp closure that doesn't bind to all the additional other URLs?
  • namespacing, so you can mount at company/<comp_id>/messages and have comp_id become part of the params object, maybe under params.path.comp_id
  • multithreaded servers, refine performance — see https://blog.guillaume-gomez.fr/articles/2017-02-22+Rust+asynchronous+HTTP+server+with+tokio+and+hyper

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.