hrefna,
@hrefna@hachyderm.io avatar

Really what I want in development is more decoupling.

Separate the web interface from the backend.

Separate the API from the processor.

Separate the queue from the cache.

Doing this properly is damned difficult but it is so so much better than what we mostly have today.

sgf,
@sgf@mastodon.xyz avatar

@hrefna Part of building Mastodon on top of Rails is that it doesn't look right for this stuff, so doing it well becomes a significant fight.

At the other end of the scale, AP doesn't seem to architecturally encourage decoupling, while AT decouples a lot at that level, which I like.

I don't think any of this is new to you, just taking the opportunity to vent.

hrefna,
@hrefna@hachyderm.io avatar

@sgf AP is almost designed to make decoupling hard because of what I've been thinking of as the "layer conflation" problem: the munging of the data model, the API, and the API's protocol. Also that it does not scale out of the box except for simple use cases.

ATproto separates this with the separation of components baked into the design (e.g., the app layer) and the explicit declaration of subdialects (lexicons).

manlycoffee,
@manlycoffee@techhub.social avatar

@hrefna

I'm not doubting that the queue is coupled to the cache, but I have a suspicion that there is a specific example you are referring to that I probably am not aware of.

What queue (or part of the queue) is coupled to the cache?

hrefna,
@hrefna@hachyderm.io avatar

@manlycoffee Mastodon uses redis this way.

You can separate them and run separate redis instances, but the default install uses redis for caching, in-flight processing, streaming, and queuing and they require different configurations to be efficient at any of them

Which you can even do and get away with, but it limits your ability to be flexible based on the needs of your project—or set up things for test—because Redis is a "datastore that can be used as a queue" more than it is a queue itself

hrefna,
@hrefna@hachyderm.io avatar

@manlycoffee So to compare what I have in mind, what if you used redis (or memcached) for caching and queuing was communicated over a dedicated queuing protocol with multiple implementations, like STOMP or AMQP?

Now it is easy to configure these separately, spin up a lighter weight queue for test, etc.

It's minor compared to separating the web interface, but it also gives you so much more flexibility for building systems and swapping out pieces basically "out of the box."

  • All
  • Subscribed
  • Moderated
  • Favorites
  • fediverse
  • kavyap
  • thenastyranch
  • cubers
  • ethstaker
  • InstantRegret
  • DreamBathrooms
  • ngwrru68w68
  • magazineikmin
  • everett
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • GTA5RPClips
  • JUstTest
  • khanakhh
  • normalnudes
  • osvaldo12
  • cisconetworking
  • provamag3
  • Durango
  • tacticalgear
  • modclub
  • Leos
  • megavids
  • tester
  • anitta
  • lostlight
  • All magazines