StorX VS embedded-postgres

Compare StorX vs embedded-postgres and see what are their differences.

StorX

PHP library for flat-file data storage (by aaviator42)

embedded-postgres

Java embedded PostgreSQL component for testing (by zonkyio)
InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
StorX embedded-postgres
5 5
14 324
- 1.9%
10.0 6.4
about 2 years ago about 1 month ago
PHP Java
GNU Affero General Public License v3.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

StorX

Posts with mentions or reviews of StorX. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-04-10.
  • PHP in 2024
    3 projects | news.ycombinator.com | 10 Apr 2024
    Apparently it is still common practice to have such "if bla is set, when do blub" everywhere in ones code? No functions with decorators or a similar or alternative concept? I would think there should be some kind of easy to use mechanism in place, that tends to avoid forgetting these ifs.

    There are ... 60 lines of global logic, that is not encapsulated in any function or so?

    Some of the functions are quite long. But I think mostly because they render out HTML.

    At line 107 with the procedure printHeader starting, what I call PHP nightmare starts:

    Switching back and forth between PHP, HTML and HTML with integrated JS (!!!) and CSS. All of course without syntax highlighting, but that is a minor issue. The major issue is treating HTML and JS and CSS as mere strings, instead of structured data, and the very bad readability of having procedures suddenly "end" and spit out some wild HTML, then suddenly continuing again, because some server side logic/decision is required at some place in that stream of unstructured data, whether some part is to be included or not, then the stream continues and then at some point one needs to actually check, that one did not forget to truly end the procedure. This has some of the worst readability. Maybe C code with bit magic is worse.

    One can find this kind of approach in many, if not most, Wordpress plugins. What's more is, that this is also terrible for writing tests. The procedures do not return a value to check against. All is a side effect. Perhaps there is some PHP library that manipulates the PHP system, so that one can at least do string comparisons on the side effects. Like mocking, basically. But still terrible for testing.

    For a comparison of how it should be done instead, check any templating engine, that at least separates template files from PHP code. Better, checkout SXML libraries, that treat HTML as structured data, a tree that can be traversed and pattern matched against, without pulling out arcane string manipulations or regular expressions. And then consider how one could write tests based on such structured data.

    If this "HTML is a string, even on the server side before sending it" kind of approach is how a language treats HTML, then the language is not suitable to be directly used for HTML templating, without any additional library. This alone has caused uncountable security issues in so many projects.

    I realize, that this is probably kind of a "one off script" and may not reflect other kinds of PHP code.

    I did all of those things myself, years ago. And when I already had moved away from such an approach, I had to maintain a project, that was written this way. It had no tests of course. No fun. It has not that much to do with you personally being a good dev or not. I think it has to do with the ecosystem encouraging you to do these things. Outputting HTML like that should be declared illegal and should be impossible.

    https://github.com/aaviator42/StorX/blob/main/StorX.php in comparison looks much better. It seems it does not output things directly. Everything seems wrapped nicely into methods. One obvious footgun seems to be another global state thing, that I really hope is not a thing in PHP itself:

        const THROW_EXCEPTIONS = TRUE;
  • Why you should probably be using SQLite
    8 projects | news.ycombinator.com | 27 Oct 2023
    I'm a huge fan of SQLite! My org's apps use it heavily, often via this simple key-value interface built on sqlite: https://github.com/aaviator42/StorX

    Handles tens of thousands of requests a day very smoothly! :)

  • Show HN: My Single-File Python Script I Used to Replace Splunk in My Startup
    6 projects | news.ycombinator.com | 21 Sep 2023
    My org's apps heavily use this simple key-value interface built on sqlite: https://github.com/aaviator42/StorX

    There's also a bunch of other purpose-built tiny utilities on that GitHub account.

  • SQLite-based databases on the Postgres protocol? Yes we can
    11 projects | news.ycombinator.com | 25 Jan 2023
    I wrote a small PHP library that gives you a key-value storage interface to SQlite files: https://github.com/aaviator42/StorX

    I've been dogfooding for a while by using it in my side projects.

    And there's a basic API too, to use it over a network: https://github.com/aaviator42/StorX-API

  • Soul – A SQLite RESTful Server
    10 projects | news.ycombinator.com | 29 Oct 2022
    This is probably ready to be used in production by others, but I wrote a library that gives you a key-value storage interface to SQlite files: https://github.com/aaviator42/StorX

    And there's an API too, to use it over a network: https://github.com/aaviator42/StorX-API

embedded-postgres

Posts with mentions or reviews of embedded-postgres. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-02-27.
  • Testcontainers
    16 projects | news.ycombinator.com | 27 Feb 2024
  • Why you should probably be using SQLite
    8 projects | news.ycombinator.com | 27 Oct 2023
    Little use if you’re not on the JVM but I’ve had great success with Embedded Postgres:

    https://github.com/zonkyio/embedded-postgres

    Each test just copies a template database so it’s ultra fast and avoids the need for complicated reset logic.

  • Ask HN: What's your favorite software testing framework and why?
    15 projects | news.ycombinator.com | 21 May 2023
    Outside of differences between assertion-based unit tests and property-based tests (both of which are worth doing), I don't think framework makes much difference. But your approach to testing definitely does.

    I think every language having its own testing framework is good, even for things like functional tests which can often be externalised. Tests are an essential part of every project and should be well integrated with the rest of the codebase and the team creating it. Often, the tests are the only good place to go and see what an app actually _does_ and so they form an essential part of the documentation.

    In my experience it's very rare that you can effectively create and maintain something like Cucumber tests owned by anyone but the team implementing the code so there's little benefit to translating from a text DSL like that. But the language used is definitely useful, so what I like to see is code in the implementation language that matches the Given/When/Then structure of those tests, but instead of reusable text steps you just have reusable functions which take parameters. This means you can easily refactor, and use the full functionality of your IDE to suggest and go to definitions etc. No matter what, you should treat your test code the same way you do everything else - abstractions matter, so functional tests at the top level should rarely just be about clicking on things and asserting other things, they should be in the language of the domain.

    Functional tests are worth much more than unit tests. No only do they test the only things of actual business value, they are also more robust in the face of implementation refactorings and so require less rework (unless you're being overly specific with CSS selectors etc). Unit tests are often highly coupled to specific implementations and can be a poor investment, especially early in a project. I believe a good balance is functional and integration tests that explore the various paths through your app and prove everything's hooked up, coupled with property based unit tests for gnarly or repetitive logic that isn't worth endlessly iterating via the UI. All other unit tests are optional and at the discretion of the implementer.

    You should be able to mock out every major articulation point in your code, but it's generally preferable if you can mock _real_ dependencies. That is, instead of mocking out a 'repository' abstraction that looks stuff up and returns canned data, have a real test database against which you look up real data (created by steps in your functional tests). This reduces risk and cognitive overhead (you're not having to encode too many assumptions in your test suite) and doesn't have to be as slow as people like to make out - Embedded Postgres is quite fast, for example:

    https://github.com/zonkyio/embedded-postgres

    Same with network services - it's not slow to chat to localhost and you'll find more issues testing proper round-trips. I have not found "assert that you called X" style testing with mocks useful - you care about outcomes, not implementation details.

    Beyond all that, as long as you can make assertions that generate clear error messages, you're fine.

  • Hctree is an experimental high-concurrency database back end for SQLite
    5 projects | news.ycombinator.com | 18 Jan 2023
    I use an embedded postgres testing library for the JVM that does something along those lines.

    Well no actually it just unpacks the tar file in a temp dir and runs the full postgres, but it mostly feels like what you describe (minus the single file part) and starts surprisingly fast. That would totally work for a little proof of concept (https://github.com/zonkyio/embedded-postgres)

  • Thoughts on Micronaut vs. Quarkus?
    2 projects | /r/java | 21 Aug 2022

What are some alternatives?

When comparing StorX and embedded-postgres you can also consider the following projects:

StorX-API - A REST API for StorX

greenlight - Clojure integration testing framework

sqld - LibSQL with extended capabilities like HTTP protocol, replication, and more.

postgresql-embedded - Embedded PostgreSQL Server

libsql - libSQL is a fork of SQLite that is both Open Source, and Open Contributions.

testy - test helpers for more meaningful, readable, and fluent tests

configinator

php-easycheck - Mirror of http://chriswarbo.net/git/php-easycheck

zfs-autosnap - Minimal viable ZFS autosnapshot tool

ospec - Noiseless testing framework

roapi - Create full-fledged APIs for slowly moving datasets without writing a single line of code.

datadriven - Data-Driven Testing for Go