Forum: Building VoltDB Applications

Post: Doing i/o from inside a procedure

Doing i/o from inside a procedure
tsouza
Oct 30, 2014
Hi,

What if I want to output some data from a procedure execution? For example, a single-partitioned procedure selects a subset of the partition but do not return it, instead it publishes to an external application (i.e. ZMQ). Is this possible?

Thanks,
Thiago Souza
bballard
Oct 30, 2014
In general, this is not recommended for a few reasons:
- It could cause issues with determinism
- i/o will slow the execution of the procedure

It would be better to use export. You could define an export table in your schema and then just insert a record into it within your single-partition procedure rather than publishing to an external application. Then use an export connector to continuously stream the records from the export table to another application such as a queuing system. VoltDB has export connectors for Kafka and RabbitMQ. Would that meet your needs?
tsouza
Oct 30, 2014
Hi,

Thanks for the tip! I'll check the export documentation.

Regards