Earlier quoted context omitted.
What's it like using stored procedures with Ecto?
surprisingly easy. 1. if I'm calling directly, I can just use a raw sql query 2. views can be backed with a read only ecto model 3. triggers can be set to run without your ecto code even being aware of it. 4. for custom errors, you can add overides for the error handling in ecto to transform things like deadlocks to 400 errors
Write libraries instead of services, where possible
211–220 of 328 posts
Re: Write libraries instead of services, where possible
#212Earlier quoted context omitted.
You're right. The fact that people can make outsize rewards from subscription services are the reason that even small single use tools are now 'services'. I have a piece of software that removes the background from my video feed. It's a subscription, and it regularly phones home. I have a piece of software that lets me visually combine, rotate and reorder pdfs. It's a subscription. Even the simplest things, like a 't…
> It's miserable fighting off a million people who want to help me for 'less than the daily price of your coffee'. Is it also miserable "fighting off" a million companies who want to sell you stuff for the daily price of a coffee? Stuff like T-Shirts, books, newspapers, candy, etc? You seem to have a patronizing attitude towards software products/services. You seem to think that they are so simple, that they should b…
Re: Write libraries instead of services, where possible
#213Earlier quoted context omitted.
You're right. The fact that people can make outsize rewards from subscription services are the reason that even small single use tools are now 'services'. I have a piece of software that removes the background from my video feed. It's a subscription, and it regularly phones home. I have a piece of software that lets me visually combine, rotate and reorder pdfs. It's a subscription. Even the simplest things, like a 't…
> Even the simplest things, like a 'torch' are ad-supported on android these days. This has a built-in feature on every smartphone for years now. These apps are a scam.
Hardly the most challenging app in the world, but it was worth the $.99 I paid for it. I probably could have written it myself, and while I personally would likely have made it free, I felt ok giving somebody a tiny tip for it.
Re: Write libraries instead of services, where possible
#214Phoenix is practically built with this idea in mind. My startup is built out of a single phoenix monolith. Only external dependency is postgres. Despite this, I've managed to completely avoid all the typical scaling issues of a monolith. Need a service or background worker? I juts make a Genserver or Oban worker and mount it in the supervision tree. The Beam takes care of maintaining the process, pubsub to said servi…
> And all the advantages of microservices without the associated costs. (orchestration, management etc) Really curious about this! What’s the deployment experience? What environment do you use for your production? How do you run/maintain the erlang VM and deploy your service?
One of the big differences we had to make was allocating one node per machine as the beam likes to have access to all resources. in practice this isn't a problem because its internal scheduler is way more efficient and performant than anything managing OS level processes.
That said, a more complex deployemnt story is defiantly one of the downsides. But the good news is that once setup, its pretty damn resilient.
Now of course, our deployment setup is more complex specifically to take advantage of beam such as distributed pubsub and shared memory between the cluster. If you don't need that, you could use dokku or heroku.
Re: Write libraries instead of services, where possible
#215Earlier quoted context omitted.
You're right. The fact that people can make outsize rewards from subscription services are the reason that even small single use tools are now 'services'. I have a piece of software that removes the background from my video feed. It's a subscription, and it regularly phones home. I have a piece of software that lets me visually combine, rotate and reorder pdfs. It's a subscription. Even the simplest things, like a 't…
MS Office is a great example of this because they squeeze money out of folks when it seems the features added are minimal. The only interesting aspect is cloud-collaboration, but that could be P2P instead. I'm willing to wager most folks still use the same subset of office functionality: page layouts and fonts and such have been around for a while; financial formulas rarely change; etc. But yet, they are charged an a…
Re: Write libraries instead of services, where possible
#216Earlier quoted context omitted.
You're correct that obfuscation of Java libraries has nothing to do with Java stack inspection/JVM security... but the latter is what the article talks about and what is cited above, so not sure why you have just now brought up decompiling obfuscated Java libraries, which is, as you say, totally unrelated...
What it says is "Java-style stack inspection can restrict user or library code to deny access at runtime to unauthorized methods.", which doesn't seem true to me, if the user has access to the library binaries. It's very possible for the user to just patch the library and use it however they want. It's possible (although I'm not especially convinced) that you can prevent the user from reflectively doing this at runti…
Re: Write libraries instead of services, where possible
#217I have a hard disagree here. Though, I suspect it is a matter of what your code is doing. First, my objection, though. Pushing this "to the users" is in no way easier to support. It is easier to abandon, but support is a different thing. You will have support contacts. And, due to the distributed nature of the deployment, you will have a much harder time isolating your code from the environment it is in. With a servi…
This quote looks like it was written by someone who has never had to support users. I've had that pleasure, and, these slow to upgrade users will become the bane of your existence. You'll spend an inordinate amount of time trying to support the "If only this f*ing user would upgrade!" customer.
Re: Write libraries instead of services, where possible
#218Earlier quoted context omitted.
What's it like using stored procedures with Ecto?
surprisingly easy. 1. if I'm calling directly, I can just use a raw sql query 2. views can be backed with a read only ecto model 3. triggers can be set to run without your ecto code even being aware of it. 4. for custom errors, you can add overides for the error handling in ecto to transform things like deadlocks to 400 errors
Re: Write libraries instead of services, where possible
#219Earlier quoted context omitted.
surprisingly easy. 1. if I'm calling directly, I can just use a raw sql query 2. views can be backed with a read only ecto model 3. triggers can be set to run without your ecto code even being aware of it. 4. for custom errors, you can add overides for the error handling in ecto to transform things like deadlocks to 400 errors
Cool. What language do you write the stored procedures in?
Re: Write libraries instead of services, where possible
#220Curious what people's experiences are wrt library development within an enterprise. I've been at organizations where basically everything was done via services and there was very little library usage, and I always thought that was suboptimal. Now I'm at a place where we utilize lots of libraries and they seem to pose pretty significant costs of their own. A typical example is if we need to do something that the libra…