Code Monkey home page Code Monkey logo

shuffla's Introduction

Performance
-----------

On table with 100MB data (1M elements)
Inserting: 2000 req/sec
Searching: 150-1500 req/sec

Backend
-------

Optimized KD-trees with queue of events. [TODO] More description.

Building
--------
Shuffla requires g++, version >= 4.6; boost, version >= 1.49. For information about installing boost visit:
* windows users: http://www.boost.org/doc/libs/1_49_0/more/getting_started/windows.html
* other OS: http://www.boost.org/doc/libs/1_49_0/more/getting_started/unix-variants.html

After installing boost:
./configure
make
make install

Running Shuffla
---------------

./Shuffla [config_file]

For details about config file, read: [TODO]

Creating table
--------------

You can create table by sending request:
http://0.0.0.0:15942/create_table/<table_name>/?property_name=property_type[&property_name=property_type]*

For example:
http://0.0.0.0:15942/create_table/users/?user_id=int&name=string&age=int

Inserting data
--------------
It is as simple as that:
http://0.0.0.0:15942/insert/<table name>/?property_name=property_value[&property_name=property_value]*

For example
http://0.0.0.0:15942/insert/users/?user_id=7&name=Adam&age=35
http://0.0.0.0:15942/insert/users/?user_id=8&name=Ashley&age=30
http://0.0.0.0:15942/insert/users/?user_id=9&name=Ashley&age=25

Search command
--------------
examples:

query: http://0.0.0.0:15942/search/users/?user_id=7
result:
{
 count: 1,
 results: {
  {user_id: 7, name: Adam, age: 35}
  }
}

query: http://0.0.0.0:15942/search/users/?name=Ashley
result:
{
 count: 2,
 results: {
  {user_id: 8, name: Ashley, age: 30},
  {user_id: 9, name: Ashley, age: 25}
 }
}

query:http://0.0.0.0:15942/search/users/?name=Ashley&OFFSET=1&LIMIT=1
result:
{
 count: 2,
 results: {
  {user_id: 9, name: Ashley, age: 35}
  }
}

query: http://0.0.0.0:15942/search/users/?PREFIX(name)=A&ORDER_BY=age
result:
{
 count: 3,
 results: {
  {user_id: 9, name: Ashley, age: 25},
  {user_id: 8, name: Ashley, age: 30},
  {user_id: 7, name: Adam, age: 35}
 }
}

query: http://0.0.0.0:15942/search/users/?PREFIX(name)=A&SMALLER_OR_EQUAL(age)=34&GREATER_OR_EQUAL(age)=32
result:
{
 count: 0,
 results: {}
}

shuffla's People

Contributors

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