kakao / s2graph

This code base is retained for historical interest only, please visit Apache Incubator Repo for latest one
https://github.com/apache/incubator-s2graph
Other
250 stars 32 forks source link

Benchmark with different server framework #194

Open SteamShon opened 8 years ago

SteamShon commented 8 years ago

Currently root project is rest server that get json query and return json result on play framework.

Play framework is great, but simple benchmark when there is no delay from backend(HBase), then finagle shows 2x performance compare to Play.

It would be better to try out different web framework other than Play and list up props and cons.

once we have full list of benchmark and summary of props and cons, then we can decide whether replace Play or not.

SteamShon commented 8 years ago

Here is simple benchmark query.

data

matrix: row(1000000) x col(1)

query

{
    "srcVertices": [
        {
            "serviceName": "s2graph-test",
            "columnName": "item_id_test",
            "ids": [
                %s
            ]
        }
    ],
    "steps": [
        {
            "step": [
                {
                    "label": "insert_test",
                    "direction": "out",
                    "offset": 0,
                    "limit": 1
                }
            ]
        }
    ]
}

test with ids array size with 1. so we are testing just key/value lookup.

result

top: finagle bottom: play

screen shot 2015-12-05 at 11 21 07 am

above test was done by @daewon

discussion

from above numbers, I think it is worthy to try out other choices on server framework.

following is my try-out list. please feel free to list more framework and we can decide which framework we would benchmark.

  1. netty directly
  2. finagle
  3. spray.io

also to make others to work with different framework, root play project need to be refactored. I will open new issue regarding this.