At some point during the dot-com era, Microsoft toyed with adding an HTTP server to its SQL Server product to enable similar development paradigms. My recollection is that this was a disaster on several fronts, not the least of which was that successfully breaching the HTTP server gave an attacker direct access to the database. This (and other considerations) make a good case for the kind of separation-of-concerns wh…
There was a similar tool developed by Oracle called mod_plsql, which served as an Apache web server module. As far as I remember, it allowed you to configure a mapping from a URL to a stored procedure. These stored procedures could receive HTTP request parameters and return HTML content. I've always felt that this approach is the right way to build applications. Application servers seemed like an unnecessary layer to…
Omnigres: Postgres as a Platform
61–70 of 77 posts
Re: Omnigres: Postgres as a Platform
#62At some point during the dot-com era, Microsoft toyed with adding an HTTP server to its SQL Server product to enable similar development paradigms. My recollection is that this was a disaster on several fronts, not the least of which was that successfully breaching the HTTP server gave an attacker direct access to the database. This (and other considerations) make a good case for the kind of separation-of-concerns wh…
There was a similar tool developed by Oracle called mod_plsql, which served as an Apache web server module. As far as I remember, it allowed you to configure a mapping from a URL to a stored procedure. These stored procedures could receive HTTP request parameters and return HTML content. I've always felt that this approach is the right way to build applications. Application servers seemed like an unnecessary layer to…
Re: Omnigres: Postgres as a Platform
#63This project seems to have a lot of overlap with PostgREST, which I really like. What are the differences in approach/goals?
Re: Omnigres: Postgres as a Platform
#64Couple of questions (with notes): Yes, I'd really like to write code next to the db with more suitable (for task) languages like Python. But at the moment SQL alone is supported..? Could one connect with Jupyter notebook somehow and have a REPL like experience with Omnigres instance? Also, this [1] seems intriguing. How do containers connect to the db? What would the performance differences to the "internal" approach…
We are adding first-class Python support right now. It's already possible to extrsct stored functions from decorated functions and their type hunts and we're working on providing standard Python APIs like DBAPI, WSGI support, etc. We have a branch on which we ran Flask applications inside Postgres. As it matures, it will be merged and documented.
As for the containers, they receive the database credentials over env variables currently. The performance characteristics of such applications aren't as good currently. The intended use case for this is third-party apps and legacy pieces of own applications.
Please keep in mind that this extension hasn't received much updates in the past couple of months but there will be upcoming changes to simplify ot a lot and provide more functionality. We also have a future experimental goal of going all the way through a runtime like crun to remove moving pieces.
Re: Omnigres: Postgres as a Platform
#65Re: Omnigres: Postgres as a Platform
#66Earlier quoted context omitted.
Please elaborate because that sentence make barely no sense for modern SQL engine such as PostgreSQL. A good ressource to start exploring would be this site with compare features between vendors: https://modern-sql.com/
I think they were talking about syntax like INSERT INTO t(a,b,c) VALUES (1,2,3) I agree that something like INSERT INTO t VALUES a=1, b=2, c=3 would be much more readable.
I remember doing an experimental improvement allowing to do FROM where SELECT what syntax.
I agree there's value there. Omnigres is able to intercept query expressions to do the augmentation.
Re: Omnigres: Postgres as a Platform
#67Oh wow, this is great. Congratulations Yurii. So i Tried omnigress to build a simple api that does few db calls a month back to mock real world scenario. And damn, the numbers were quite thought provoking. Comparing those numbers with a similar api built using fastapi and asyncpg, there was if i remember correctly at least 4x to 5x throughput increase. Even though the project is in quite nascent stage, the idea is pr…
> Comparing those numbers with a similar api built using fastapi and asyncpg, there was if i remember correctly at least 4x to 5x throughput increase. I wonder to what extent this improvement comes from not using Python, as opposed to using this alternative solution? For example after Python to Go migrations it’s common to see this kind of speed up I believe.
https://yrashk.com/blog/2023/02/16/what-happens-if-you-put-h...
In the instance of short-living queries, we are able to get this by effectively removing the communication latency.
Re: Omnigres: Postgres as a Platform
#68Earlier quoted context omitted.
> Comparing those numbers with a similar api built using fastapi and asyncpg, there was if i remember correctly at least 4x to 5x throughput increase. I wonder to what extent this improvement comes from not using Python, as opposed to using this alternative solution? For example after Python to Go migrations it’s common to see this kind of speed up I believe.
They might have used Python still - the Omnigres page lists Python support, and PG has had PL/Python for a long time.
An important thing here is that we see Omnigres as a polyglot runtime with a database inside (Postgres) and we want people to use languages they prefer.
Re: Omnigres: Postgres as a Platform
#69Re: Omnigres: Postgres as a Platform
#70This is the sort of thing that gets me really excited. What’s the migration story? Migrations are what always trip me up, especially when there’s dependent logic.
However, we're not quite satisfied with this and working on a more sophisticated system that would allow us to derive incremental changes where possible, lint schema, load application code with the right dependencies on types and other functions where necessary.