onyx

FYI: alternative Onyx :onyx: chat is at <https://gitter.im/onyx-platform/onyx> ; log can be found at <https://clojurians-log.clojureverse.org/onyx/index.html>
a.espolov 2018-01-09T11:45:26.000194Z

Guys how can I use Onyx to solve the problem of executing 10 000 requests to APIs?

a.espolov 2018-01-09T11:45:52.000350Z

Do I have to implement my plugin?

a.espolov 2018-01-09T11:46:54.000070Z

or use queue?(This option will have to send the same data to the queue continuously)

mccraigmccraig 2018-01-09T11:52:23.000049Z

@a.espolov we currently do this in two ways (there may be others) - either put a message on kafka for each request and let onyx control the concurrency / flow, or use either onyx batches ( http://www.onyxplatform.org/docs/cheat-sheet/latest/#catalog-entry/:onyx/batch-size ) or implicit batches (each segment contains data for multiple requests) and then dispatch the request batch with async i/o (we use aleph as our http client)

๐Ÿ‘ 2
mccraigmccraig 2018-01-09T11:54:43.000060Z

we commonly have 10k simultaneous api requests which get executed in onyx batches of 1k iirc

a.espolov 2018-01-09T11:56:19.000012Z

one or more server on cluster?

mccraigmccraig 2018-01-09T11:56:59.000248Z

we are currently running 3 onyx instances

a.espolov 2018-01-09T11:57:40.000244Z

summary count cores?)

mccraigmccraig 2018-01-09T12:00:21.000078Z

what do you mean ? how many cores across all onyx processes ?

a.espolov 2018-01-09T12:00:58.000032Z

yes

mccraigmccraig 2018-01-09T12:07:02.000246Z

i'm not sure how useful a metric that is - we aren't cpu bound and there are other processes running on the same instances

mccraigmccraig 2018-01-09T12:07:31.000076Z

the best answer i have off the cuff is that each onyx process is running on an aws m4.xlarge with 4 vcpus, and has 1 cpu share assigned in dc/os...

mccraigmccraig 2018-01-09T12:09:37.000021Z

but i know from monitoring that there are between 100-200 threads (mostly in pools to service async ops) in each onyx process, so we don't have single threads monopolizing hardware threads

a.espolov 2018-01-09T12:11:43.000208Z

thanks

michaeldrogalis 2018-01-09T15:34:46.000672Z

@a.espolov Im not sure that that's necessarily a fit for a streaming problem.

a.espolov 2018-01-09T15:37:15.000952Z

@michaeldrogalis onyx is not suitable for solving the problem periodic polling REST API?

michaeldrogalis 2018-01-09T15:39:56.000024Z

I mean, it could. I'm just saying I'm not sure streaming is the best approach given your initial message.

a.espolov 2018-01-09T15:45:30.000520Z

ok)

dbernal 2018-01-09T15:55:55.000805Z

@michaeldrogalis I found my issue. I needed to add [mysql/mysql-connector-java "5.1.25"] [org.postgresql/postgresql "42.1.1"] to my dependencies. Are only MySQL and PostgreSQL supported for the SQL plugin or would I be able to use something else like SQL Server?

michaeldrogalis 2018-01-09T16:07:34.000598Z

@dbernal Theoretically anything that supports the JDBC interface ought to work

dbernal 2018-01-09T16:18:48.000483Z

@michaeldrogalis ok perfect. Thank you!

michaeldrogalis 2018-01-09T16:18:57.000179Z

Anytime!

lucasbradstreet 2018-01-09T17:36:46.000688Z

@a.espolov @mccraigmccraig http://www.onyxplatform.org/docs/cheat-sheet/latest/#catalog-entry/:onyx/batch-fn-QMARK is also handy if youโ€™re not relying on an output plugin for async batching.

mccraigmccraig 2018-01-09T17:38:05.000357Z

oh, yeah, i should have referenced that too ๐Ÿ˜Š

dbernal 2018-01-09T22:01:37.000585Z

are there any examples available of a job that reads from a SQL table?

michaeldrogalis 2018-01-09T22:05:16.000337Z

@dbernal The tests in onyx-sql are your best bet.

dbernal 2018-01-09T22:12:10.000446Z

@michaeldrogalis ok cool. Thanks!