You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Gavin Ray <ra...@gmail.com> on 2022/09/11 21:17:02 UTC

Hosted online Calcite playground

Hi all,

I wrote an am hosting a service that creates session-scoped Calcite schemas
that have the Chinook dataset loaded
This allows people to experiment with Calcite, or check how certain
operations would be planned, without needing to set anything up

The service can be used here:
https://calcite-online.system.gavinray.dev

The code is here:
GavinRay97/calcite-online (github.com)
<https://github.com/GavinRay97/calcite-online>

Currently it is limited to only running SQL queries/explaining them, and
displaying the Calcite schema

Later I would like to add the ability for users to write Java code defining
Calcite UDF's in the browser,
as well as allow you to configure the Calcite instance settings.

Re: Hosted online Calcite playground

Posted by Yogendra Sharma <sy...@live.com>.
Looks like the https certificate has expired.
________________________________
From: Gavin Ray <ra...@gmail.com>
Sent: 13 September 2022 00:22
To: dev@calcite.apache.org <de...@calcite.apache.org>
Subject: Re: Hosted online Calcite playground

Okay, I've appended -XX:+CrashOnOutOfMemory to the JVM opts, and set the
infra to attempt to restart it on failure 5 times
Hopefully that should work?

On Mon, Sep 12, 2022 at 2:34 PM Gavin Ray <ra...@gmail.com> wrote:

> What a delightfully simple idea, yeah that's great -- I'll do that I
> think, thanks
>
> On Mon, Sep 12, 2022 at 12:59 PM Julian Hyde <jh...@gmail.com>
> wrote:
>
>> I’d write a cron job that runs every five minutes, greps the log for
>> OutOfMemoryException, and restarts the server if it finds it.
>>
>> If people want a server that is robust for production (in the face of
>> people who are trying to crash the server for their own amusement) then
>> they’re going to have to pay you for it.
>>
>> Julian
>>
>>
>> > On Sep 12, 2022, at 9:11 AM, Gavin Ray <ra...@gmail.com> wrote:
>> >
>> > Yeah, I probably should have anticipated this =/
>> >
>> > If anyone has ideas on how to reasonably limit the resources I'd love to
>> > hear
>> >
>> > What I can think of so far:
>> > - Use Calcite's query parser, disallow non-SELECT statements
>> > - Configure H2 settings for maximum in-memory row count to some very low
>> > number
>> > - Abort queries that take longer than X seconds
>> >
>> >
>> > On Mon, Sep 12, 2022 at 9:28 AM Michael Mior <mm...@apache.org> wrote:
>> >
>> >> This sounds great!
>> >>
>> >> Unfortunately at the moment, it appears there are memory issues..
>> >>
>> >> java.lang.OutOfMemoryError: Java heap spaceError id
>> >> 17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13
>> >>
>> >> --
>> >> Michael Mior
>> >> mmior@apache.org
>> >>
>> >>
>> >> On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com>
>> wrote:
>> >>
>> >>> Hi all,
>> >>>
>> >>> I wrote an am hosting a service that creates session-scoped Calcite
>> >> schemas
>> >>> that have the Chinook dataset loaded
>> >>> This allows people to experiment with Calcite, or check how certain
>> >>> operations would be planned, without needing to set anything up
>> >>>
>> >>> The service can be used here:
>> >>> https://calcite-online.system.gavinray.dev
>> >>>
>> >>> The code is here:
>> >>> GavinRay97/calcite-online (github.com)
>> >>> <https://github.com/GavinRay97/calcite-online>
>> >>>
>> >>> Currently it is limited to only running SQL queries/explaining them,
>> and
>> >>> displaying the Calcite schema
>> >>>
>> >>> Later I would like to add the ability for users to write Java code
>> >> defining
>> >>> Calcite UDF's in the browser,
>> >>> as well as allow you to configure the Calcite instance settings.
>> >>>
>> >>
>>
>>

Re: Hosted online Calcite playground

Posted by Gavin Ray <ra...@gmail.com>.
Okay, I've appended -XX:+CrashOnOutOfMemory to the JVM opts, and set the
infra to attempt to restart it on failure 5 times
Hopefully that should work?

On Mon, Sep 12, 2022 at 2:34 PM Gavin Ray <ra...@gmail.com> wrote:

> What a delightfully simple idea, yeah that's great -- I'll do that I
> think, thanks
>
> On Mon, Sep 12, 2022 at 12:59 PM Julian Hyde <jh...@gmail.com>
> wrote:
>
>> I’d write a cron job that runs every five minutes, greps the log for
>> OutOfMemoryException, and restarts the server if it finds it.
>>
>> If people want a server that is robust for production (in the face of
>> people who are trying to crash the server for their own amusement) then
>> they’re going to have to pay you for it.
>>
>> Julian
>>
>>
>> > On Sep 12, 2022, at 9:11 AM, Gavin Ray <ra...@gmail.com> wrote:
>> >
>> > Yeah, I probably should have anticipated this =/
>> >
>> > If anyone has ideas on how to reasonably limit the resources I'd love to
>> > hear
>> >
>> > What I can think of so far:
>> > - Use Calcite's query parser, disallow non-SELECT statements
>> > - Configure H2 settings for maximum in-memory row count to some very low
>> > number
>> > - Abort queries that take longer than X seconds
>> >
>> >
>> > On Mon, Sep 12, 2022 at 9:28 AM Michael Mior <mm...@apache.org> wrote:
>> >
>> >> This sounds great!
>> >>
>> >> Unfortunately at the moment, it appears there are memory issues..
>> >>
>> >> java.lang.OutOfMemoryError: Java heap spaceError id
>> >> 17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13
>> >>
>> >> --
>> >> Michael Mior
>> >> mmior@apache.org
>> >>
>> >>
>> >> On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com>
>> wrote:
>> >>
>> >>> Hi all,
>> >>>
>> >>> I wrote an am hosting a service that creates session-scoped Calcite
>> >> schemas
>> >>> that have the Chinook dataset loaded
>> >>> This allows people to experiment with Calcite, or check how certain
>> >>> operations would be planned, without needing to set anything up
>> >>>
>> >>> The service can be used here:
>> >>> https://calcite-online.system.gavinray.dev
>> >>>
>> >>> The code is here:
>> >>> GavinRay97/calcite-online (github.com)
>> >>> <https://github.com/GavinRay97/calcite-online>
>> >>>
>> >>> Currently it is limited to only running SQL queries/explaining them,
>> and
>> >>> displaying the Calcite schema
>> >>>
>> >>> Later I would like to add the ability for users to write Java code
>> >> defining
>> >>> Calcite UDF's in the browser,
>> >>> as well as allow you to configure the Calcite instance settings.
>> >>>
>> >>
>>
>>

Re: Hosted online Calcite playground

Posted by Gavin Ray <ra...@gmail.com>.
What a delightfully simple idea, yeah that's great -- I'll do that I think,
thanks

On Mon, Sep 12, 2022 at 12:59 PM Julian Hyde <jh...@gmail.com> wrote:

> I’d write a cron job that runs every five minutes, greps the log for
> OutOfMemoryException, and restarts the server if it finds it.
>
> If people want a server that is robust for production (in the face of
> people who are trying to crash the server for their own amusement) then
> they’re going to have to pay you for it.
>
> Julian
>
>
> > On Sep 12, 2022, at 9:11 AM, Gavin Ray <ra...@gmail.com> wrote:
> >
> > Yeah, I probably should have anticipated this =/
> >
> > If anyone has ideas on how to reasonably limit the resources I'd love to
> > hear
> >
> > What I can think of so far:
> > - Use Calcite's query parser, disallow non-SELECT statements
> > - Configure H2 settings for maximum in-memory row count to some very low
> > number
> > - Abort queries that take longer than X seconds
> >
> >
> > On Mon, Sep 12, 2022 at 9:28 AM Michael Mior <mm...@apache.org> wrote:
> >
> >> This sounds great!
> >>
> >> Unfortunately at the moment, it appears there are memory issues..
> >>
> >> java.lang.OutOfMemoryError: Java heap spaceError id
> >> 17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13
> >>
> >> --
> >> Michael Mior
> >> mmior@apache.org
> >>
> >>
> >> On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com>
> wrote:
> >>
> >>> Hi all,
> >>>
> >>> I wrote an am hosting a service that creates session-scoped Calcite
> >> schemas
> >>> that have the Chinook dataset loaded
> >>> This allows people to experiment with Calcite, or check how certain
> >>> operations would be planned, without needing to set anything up
> >>>
> >>> The service can be used here:
> >>> https://calcite-online.system.gavinray.dev
> >>>
> >>> The code is here:
> >>> GavinRay97/calcite-online (github.com)
> >>> <https://github.com/GavinRay97/calcite-online>
> >>>
> >>> Currently it is limited to only running SQL queries/explaining them,
> and
> >>> displaying the Calcite schema
> >>>
> >>> Later I would like to add the ability for users to write Java code
> >> defining
> >>> Calcite UDF's in the browser,
> >>> as well as allow you to configure the Calcite instance settings.
> >>>
> >>
>
>

Re: Hosted online Calcite playground

Posted by Julian Hyde <jh...@gmail.com>.
I’d write a cron job that runs every five minutes, greps the log for OutOfMemoryException, and restarts the server if it finds it.

If people want a server that is robust for production (in the face of people who are trying to crash the server for their own amusement) then they’re going to have to pay you for it.

Julian


> On Sep 12, 2022, at 9:11 AM, Gavin Ray <ra...@gmail.com> wrote:
> 
> Yeah, I probably should have anticipated this =/
> 
> If anyone has ideas on how to reasonably limit the resources I'd love to
> hear
> 
> What I can think of so far:
> - Use Calcite's query parser, disallow non-SELECT statements
> - Configure H2 settings for maximum in-memory row count to some very low
> number
> - Abort queries that take longer than X seconds
> 
> 
> On Mon, Sep 12, 2022 at 9:28 AM Michael Mior <mm...@apache.org> wrote:
> 
>> This sounds great!
>> 
>> Unfortunately at the moment, it appears there are memory issues..
>> 
>> java.lang.OutOfMemoryError: Java heap spaceError id
>> 17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13
>> 
>> --
>> Michael Mior
>> mmior@apache.org
>> 
>> 
>> On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com> wrote:
>> 
>>> Hi all,
>>> 
>>> I wrote an am hosting a service that creates session-scoped Calcite
>> schemas
>>> that have the Chinook dataset loaded
>>> This allows people to experiment with Calcite, or check how certain
>>> operations would be planned, without needing to set anything up
>>> 
>>> The service can be used here:
>>> https://calcite-online.system.gavinray.dev
>>> 
>>> The code is here:
>>> GavinRay97/calcite-online (github.com)
>>> <https://github.com/GavinRay97/calcite-online>
>>> 
>>> Currently it is limited to only running SQL queries/explaining them, and
>>> displaying the Calcite schema
>>> 
>>> Later I would like to add the ability for users to write Java code
>> defining
>>> Calcite UDF's in the browser,
>>> as well as allow you to configure the Calcite instance settings.
>>> 
>> 


Re: Hosted online Calcite playground

Posted by Gavin Ray <ra...@gmail.com>.
Yeah, I probably should have anticipated this =/

If anyone has ideas on how to reasonably limit the resources I'd love to
hear

What I can think of so far:
- Use Calcite's query parser, disallow non-SELECT statements
- Configure H2 settings for maximum in-memory row count to some very low
number
- Abort queries that take longer than X seconds


On Mon, Sep 12, 2022 at 9:28 AM Michael Mior <mm...@apache.org> wrote:

> This sounds great!
>
> Unfortunately at the moment, it appears there are memory issues..
>
> java.lang.OutOfMemoryError: Java heap spaceError id
> 17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13
>
> --
> Michael Mior
> mmior@apache.org
>
>
> On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com> wrote:
>
> > Hi all,
> >
> > I wrote an am hosting a service that creates session-scoped Calcite
> schemas
> > that have the Chinook dataset loaded
> > This allows people to experiment with Calcite, or check how certain
> > operations would be planned, without needing to set anything up
> >
> > The service can be used here:
> > https://calcite-online.system.gavinray.dev
> >
> > The code is here:
> > GavinRay97/calcite-online (github.com)
> > <https://github.com/GavinRay97/calcite-online>
> >
> > Currently it is limited to only running SQL queries/explaining them, and
> > displaying the Calcite schema
> >
> > Later I would like to add the ability for users to write Java code
> defining
> > Calcite UDF's in the browser,
> > as well as allow you to configure the Calcite instance settings.
> >
>

Re: Hosted online Calcite playground

Posted by Michael Mior <mm...@apache.org>.
This sounds great!

Unfortunately at the moment, it appears there are memory issues..

java.lang.OutOfMemoryError: Java heap spaceError id
17f4f06f-0ad4-44d2-9fd3-5f9f74762448-13

--
Michael Mior
mmior@apache.org


On Sun, Sep 11, 2022 at 5:17 PM Gavin Ray <ra...@gmail.com> wrote:

> Hi all,
>
> I wrote an am hosting a service that creates session-scoped Calcite schemas
> that have the Chinook dataset loaded
> This allows people to experiment with Calcite, or check how certain
> operations would be planned, without needing to set anything up
>
> The service can be used here:
> https://calcite-online.system.gavinray.dev
>
> The code is here:
> GavinRay97/calcite-online (github.com)
> <https://github.com/GavinRay97/calcite-online>
>
> Currently it is limited to only running SQL queries/explaining them, and
> displaying the Calcite schema
>
> Later I would like to add the ability for users to write Java code defining
> Calcite UDF's in the browser,
> as well as allow you to configure the Calcite instance settings.
>

Re: Hosted online Calcite playground

Posted by Zhengqiang Duan <du...@apache.org>.
This project is awesome and it will be very helpful for beginners of calcite.

Best regards,
Zhengqiang

Gavin Ray <ra...@gmail.com> 于2022年9月12日周一 05:17写道:
>
> Hi all,
>
> I wrote an am hosting a service that creates session-scoped Calcite schemas
> that have the Chinook dataset loaded
> This allows people to experiment with Calcite, or check how certain
> operations would be planned, without needing to set anything up
>
> The service can be used here:
> https://calcite-online.system.gavinray.dev
>
> The code is here:
> GavinRay97/calcite-online (github.com)
> <https://github.com/GavinRay97/calcite-online>
>
> Currently it is limited to only running SQL queries/explaining them, and
> displaying the Calcite schema
>
> Later I would like to add the ability for users to write Java code defining
> Calcite UDF's in the browser,
> as well as allow you to configure the Calcite instance settings.