I think that it’s more the benefit of offloading that responsibility to others such as Amazon, instead of attempting to roll your own database solution.
It’s the question of „I want to design good software“ or „I need a solution as cheap as possible“
Sorry but of course you can store data in megabytes of json columns and hope that the hardware will be always fast enough to search for it without any care of the database design, what mostly result in software where the user has 10 or more seconds to wait for a result, or I can create a good database design where an old c64 will be fast enough to deliver all needed data in less then 1ms.
But yes, the future is the first solution because it’s cheaper to create bad software from some Indian programmers by merging as many existing open source software matching as possible to nearly fulfill the needs, instead of creating a new good designed software which is fast, performant and does exact what is needed.
“Cloud Delivery Network” – and yes i had to look it up.
do you have a favorite? like firebase perhaps?
Not exactly. It is faster persist flat files of json to a CDN and fetch those files than a database. However, as you have mentioned this does not work great for search.
My professional recommendation for search is https://opensearch.org/. Open Search is the open source predecessor of elastic search offering several new features. Not to plug aws more than I already have but AWS has also replaced their search service with a production grade managed open search solution: https://docs.aws.amazon.com/opensearch-service/. Search is an area though where it is difficult to achieve zero cost. However, I think the pure power of open search out weighs the cost factor which isn’t terribly expensive.
However, if you are seeking a low cost alternative that works well with s3 AWS Athena: https://aws.amazon.com/athena. With Athena you can consume unstructured data in mass quantities and catalog it as structured data. Once cataloged SQL can be used to query the info. The very nice part of this service is it is serverless with a pay for use model instead of time. The amount of free queries and data transfer is probably more than enough for many apps.
These are some other high profile search solutions which I have also really liked.
Again though not incredibly cheap to run a production grade cluster. However, all of these are highly available, auto scaling cloud solutions unlike a single db instance.
Building an application to start with production grade performance, low latency, scalability, robustness, flexibility, and cost is well thought architecture. What is not great is building an application in isolation of these things and just tossing it up on a server. Distributing responsibilities of an application across services specific to use case is responsible well intended design. Slimming down traditional stacks by completely removing servers and databases is environmentally responsible software architecture.
I have dedicated myself to AWS which offers more than enough to achieve just about anything and is a highly coveted skill in the industry. However, I am intrigued by some things firebase offers. I think the aws free tier surpasses all vendors out there. You can do a lot for free in AWS. The free tier does end after a year but that is only for a the account. Nothing stops you from creating another separate account and migrating resources over there. This model effectively creates a lifetime of free tier on aws.
That entire page is actually configurable via an editor.
When saved the page is stored inside s3 as a json file. There is also a partial copy inside open search. The previous page matches routes using open search queries. All this is achieved directly in the browser. No servers except for those running the open search cluster which at the moment is only a single node.
This is a form that collects data and upon clicking save pushes it as a json file to aws s3. The bucket is private and only authenticated users can write to it. Therefore, the request will fail and it will be clearly visible in the network tab.
This is super fast in comparison to a relational database since all that is happening is a file is being written to storage. It doesn’t really matter the complexity of the object since its just json. In contrast to relational tables where as the complexity of objects increase the liklyhood is high that performance will become problematic. Furthermore, unless using an orm of some kind that can easily manage relationships nested objects and arrays that are associations increase all around complexity of the business logic. In this model the “entity” is treated as one single document and merely just pushed as a file of json. Super simple in comparison to persistence of complex domain entities backed by a relational database.
It sounds like though that its currently theoretical between the two, and that actual measurements haven’t been done yet.
While I have not conducted performance tests everything I have read and experienced indicates that writing json files to s3 out performs all rest apis backed by a traditional database that I have used. The write is nearly immediate less than 100 ms for a json file. I’m definitely open to alternatives for json file storage that can be run at no cost in the cloud at production grade scale and availability. That type of write speed on a consistent basis might be achievable using graph without a middle layer api built in php, java, .net, nodejs, etc but this is not something I have explored.
AWS S3 provides a great performance. It automatically scales to high request rates, with a very low latency of 100–200 milliseconds . Your application can achieve at least 3,500 PUT/COPY/POST/DELETE and 5,500 GET/HEAD requests per second per prefix in a bucket
This being said you might have given me a reason to learn k8 to conduct some performance testing of my own.
It would be interesting to compare the performance of say hitting s3 with 3000 writes in parallel compared to a rest api backed by a database. However, I think it would be difficult to achieve a true picture of the performance benefits given all the variables of a traditional rest apis and databases. Though it seems common sense that removing the server and database from the equation and writing directly to object storage would by nature perform much better at scale.
I think a better measure is the average time it takes a post/put rest api built in all top languages to respond. I don’t typically see less than 1 - 2 seconds for your average rest api writing complex objects to a relational database. That number only becomes worse as more traffic hits the database at once.
Also I have found that Observability over time is the best measure of performance. Observing request durations on the production environment provides the best picture of performance. This type of performance monitoring can be combined with ai and machine learning to provide a true picture of how an application is performing in real time.
is MySQL still in existence? it seems to me that MariaDB has all but taken over MySQLs base.
We actually just migrated from MySQL to Mariadb including schema and data level encryption. This is not something offered by MySQL but is part of MariaDB. So if someone hacks our servers the data on them is worthless without the encryption key. We operate in aws gov cloud and have slowly been improving our security implementing schemes and data level encryption was a major step in the right direction not to fall victum easily to hackers. My opinion is to do away with MySQL entirely but that is a monumental effort for an existing application.
when i was first looking at MariaDB, they “advertised” to just do the following:
- install MariadDB
- stop MySQL
- start MariaDB
and that is all that was required. i was very skeptical, but i tried it late Saturday night, and really i could not tell any difference at all.
i dont know if MySQL has incorporated all the NoSQL options that MariadDB has. there is a lot they are doing that i dont have the time to even keep up with.
We have had several hurdles with a database that goes back about half a decade. Much of it was related to degrading performance. Thankfully I work more on the application side and only know about this type of stuff because it’s a small team with scrums each day. So I didn’t really need to work on that. Like I was saying previously managing databases takes a completely separate skill set that can be eliminated from app dev by simply using more modern technology. I prefer to spend as much time as possible on the front end and as little as time as possible moving an app from dev to production grade environment. I have found the cloud combined with mvvm to be a worthy tool in accomplishing that goal. I speak from a perspective of having used relational databases for over a decade. It is so much easier to use NoSQL solutions than it is to reliably implement a performant scalable production grade app with relational databases.
if i knew where you were, i would buy you an expensive dinner and ask you about referential integrity concerns.
for a time there i was playing with CockroachDB and it also looked pretty good, but felt a bit too experimental for me.
And ACID. And the CAP theorem.
hey paul - you may be interested in this: https://blog.bitsrc.io/stop-using-function-parameters-now-d320cf0932df
i could not get the first example to work (found out the example is in typeScript), but it sounds like what you are talking about.
NoSQL databases often make tradeoffs by relaxing some of the ACID properties of relational databases for a more flexible data model that can scale horizontally. This makes NoSQL databases an excellent choice for high throughput, low-latency use cases that need to scale horizontally beyond the limitations of a single instance.
ya, but look at the comments in the article. the author only included the jScript examples after i asked for it. and yet i did not receive any credit whatsoever. (sorry i could not resist that last quip)
This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.