Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: dynamic endpoints based on pre-defined sql queries #370

Open
nitisht opened this issue Apr 20, 2023 · 14 comments · May be fixed by #967
Open

feature: dynamic endpoints based on pre-defined sql queries #370

nitisht opened this issue Apr 20, 2023 · 14 comments · May be fixed by #967

Comments

@nitisht
Copy link
Member

nitisht commented Apr 20, 2023

Implement an endpoint /api/v1/query/dynamic with payload

{
    "query":"Select * from {{stream_name}} order by p_timestamp limit 10",
    "cache-duration":"5m"
}

This API will respond with a unique URL will serves plain JSON response to this query. The data will be refreshed every 5m as configured in the payload.

We'd love to get feedback from the community if they think this is useful. Please add a 👍🏽 in the issue to show your interest.

@sudharsangs
Copy link

@nitisht can I pick this issue?

@nitisht
Copy link
Member Author

nitisht commented Oct 10, 2023

hey @sudharsangs you can, for sure

@mrchypark
Copy link

any update with this issue?

@nitisht
Copy link
Member Author

nitisht commented Mar 7, 2024

Right now there are no plans to work on this @mrchypark . Is this something you think will be useful to you?

@nitisht
Copy link
Member Author

nitisht commented Mar 10, 2024

@mrchypark
Copy link

@nitisht Thank you for the information. I had initially understood this feature as something similar to a materialized view. I thought it would be a useful feature if it could proactively perform calculations and cache the results in advance, although it might also execute upon request depending on the configuration. I appreciate you sharing the details, and I will definitely look into the aspects you mentioned. Thank you for your help and insights.

@nitisht
Copy link
Member Author

nitisht commented Sep 16, 2024

/bounty 300

Copy link

algora-pbc bot commented Sep 16, 2024

💎 $300 bounty • Parseable

Steps to solve:

  1. Start working: Comment /attempt #370 with your implementation plan
  2. Submit work: Create a pull request including /claim #370 in the PR body to claim the bounty
  3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to parseablehq/parseable!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @ssddOnTop Sep 16, 2024, 5:06:42 PM WIP
🟢 @TomBebb Oct 20, 2024, 1:24:12 AM #967

@ssddOnTop
Copy link

ssddOnTop commented Sep 16, 2024

/attempt #370

Algora profile Completed bounties Tech Active attempts Options
@ssddOnTop 76 bounties from 1 project
Rust, Java,
C & more
Cancel attempt

@TomBebb
Copy link

TomBebb commented Oct 20, 2024

/attempt #370

@TomBebb TomBebb linked a pull request Oct 21, 2024 that will close this issue
Copy link

algora-pbc bot commented Oct 21, 2024

💡 @TomBebb submitted a pull request that claims the bounty. You can visit your bounty board to reward.

@davidwlhlm
Copy link

This feature could be valuable for us as well, so it's great to see a PR already in progress!

Below, I’d like to share some feedback from a user perspective.

We use Parseable not only for storing but also for retrieving log data. While response times vary depending on several factors, we wouldn’t describe the responses as instant when querying streams with a high volume of events (we’re already using partitions). With carefully selected start and end dates, the response times are fast enough for internal use cases (up to 10–20 seconds), but this isn’t sufficient when we need to retrieve logs for display to end users, who expect loading times within a few hundred milliseconds to a few seconds at most. For this reason, we currently use Parseable primarily for experimenting with internal features.

A solution to further improve query response times would be fantastic. For our use cases, stale data is an acceptable trade-off for increased speed.

I'm not sure if I understood this PR comment by @nikhilsinhaparseable correctly, but our use case would likely need support for more than 10 dynamic streams at a time. We could potentially have over 100,000 distinct queries, each with varying parameters (e.g., different IDs for filtering logs). Of course, not all of these queries would need to be dynamic/cached - just the most frequent/active ones. So, while I’m not certain this feature would fully meet our needs, it does address a similar concern around improving response times.

@nitisht
Copy link
Member Author

nitisht commented Nov 11, 2024

Thanks for the detailed feedback @davidwlhlm . Just curious if you tried https://www.parseable.com/docs/features/tiering? And if you still see slow responses

@davidwlhlm
Copy link

Thanks for pointing out, we will take a look and run some experiments :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants