You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@predictionio.apache.org by Jim Miller <je...@gmail.com> on 2016/10/07 20:08:00 UTC
Adding Data to the Event Server
Hi,
I am a little unclear about how the Event Server gets updated. Using the
"Tapster" demo as an example. If a user adds a new Comic into the system so
its added to the PostgreSQL database, when does the event server get
updated? If a cron job has to be used, then the new Comic will not be
available until the Event Server gets updated OR does it happen live?
Thanks in advance for the help,
Jim
Re: Adding Data to the Event Server
Posted by Jim Miller <je...@gmail.com>.
Thanks Chan for the quick reply. I will test this weekend!
Jim
--
Jim Miller
On October 7, 2016 at 7:17:30 PM, Chan Lee (chanlee514@gmail.com) wrote:
Hi Jim,
When you create a new comic, you would send a POST request to
<eventserver-url>/events.json, or use `pio import` to batch import. In the
demo, this would be a '$set' event for 'item'. This would update the
PostgreSQL database, in particular, the table "pio_event_<pio_app_id>", and
the new comic will be available for recommendation. The demo uses
PredictionIO Ruby SDK (
https://github.com/apache/incubator-predictionio-sdk-ruby) to make these
requests.
Chan
On Fri, Oct 7, 2016 at 1:08 PM, Jim Miller <je...@gmail.com> wrote:
> Hi,
>
> I am a little unclear about how the Event Server gets updated. Using the
> "Tapster" demo as an example. If a user adds a new Comic into the system so
> its added to the PostgreSQL database, when does the event server get
> updated? If a cron job has to be used, then the new Comic will not be
> available until the Event Server gets updated OR does it happen live?
>
> Thanks in advance for the help,
>
> Jim
>
Re: Adding Data to the Event Server
Posted by Chan Lee <ch...@gmail.com>.
Hi Jim,
When you create a new comic, you would send a POST request to
<eventserver-url>/events.json, or use `pio import` to batch import. In the
demo, this would be a '$set' event for 'item'. This would update the
PostgreSQL database, in particular, the table "pio_event_<pio_app_id>", and
the new comic will be available for recommendation. The demo uses
PredictionIO Ruby SDK (
https://github.com/apache/incubator-predictionio-sdk-ruby) to make these
requests.
Chan
On Fri, Oct 7, 2016 at 1:08 PM, Jim Miller <je...@gmail.com> wrote:
> Hi,
>
> I am a little unclear about how the Event Server gets updated. Using the
> "Tapster" demo as an example. If a user adds a new Comic into the system so
> its added to the PostgreSQL database, when does the event server get
> updated? If a cron job has to be used, then the new Comic will not be
> available until the Event Server gets updated OR does it happen live?
>
> Thanks in advance for the help,
>
> Jim
>