You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 4, 2019. It is now read-only.
It should be pretty easy to add general support for feathers-batch to batch service calls. A small change that can add a big performance improvement to applications.
Batching can be done manually like:
varapp=feathers('http://todos.feathersjs.com').configure(feathers.jquery());// Set all batching calls to execute in seriesapp.batch('type','series');app.batch.start();todoService.create({text: 'A todo',complete: false},function(error,todo){console.log('Success');});todoService.find(function(error,todos){console.log('Got the following Todos',todos);});app.batch.stop();
Or with a timeout that collects all simultaneous requests sent within a certain interval:
varapp=feathers('http://todos.feathersjs.com').configure(feathers.jquery());app.batch({type: 'series',timeout: 100// batch all request within 100ms});todoService.create({text: 'A todo',complete: false},function(error,todo){console.log('Success');});todoService.find(function(error,todos){console.log('Got the following Todos',todos);});
The text was updated successfully, but these errors were encountered:
I'm going to close this. It will be added when with the final version of the batch plugin when we add a performance and scaling chapter to the documentation.
It should be pretty easy to add general support for feathers-batch to batch service calls. A small change that can add a big performance improvement to applications.
Batching can be done manually like:
Or with a timeout that collects all simultaneous requests sent within a certain interval:
The text was updated successfully, but these errors were encountered: