News for hackers. Stuff that matters.
Re:The Death of Microservice Madness in 2018 by dvt on Sunday January 21, 2018 @06:34PM (#16200756)
A side effect is by definition some mutation that's out of the scope of the function -- if the purpose of the microservice is to put stuff in a database, then (by definition) it's not a side effect. Switching a flag on top of doing some work, on the other hand (e.g. flip "processed" to true in a global database) is a side effect.
Re:The Death of Microservice Madness in 2018 by friendly_chap on Sunday January 21, 2018 @06:45PM (#16200801)
Modifying data in a database is a side effect. Since you brought up the wikipedia definition, here it is:

> In computer science, a function or expression is said to have a side effect if it modifies some state outside its scope or has an observable interaction with its calling functions or the outside world besides returning a value. For example, a particular function might modify a global variable or static variable, modify one of its arguments, raise an exception, write data to a display or file, read data, or call other side-effecting functions.

Note "write data to a display or file". I think we agree that writing to a database falls under this definition, hence using terms like "side effecting" when talking about microservices is misleading.

Re:The Death of Microservice Madness in 2018 by dvt on Sunday January 21, 2018 @06:55PM (#16200831)
Yeah, I stand corrected. I am indeed conflating scope with purpose. Should've been clearer in my OP.
Re:The Death of Microservice Madness in 2018 by Retric on Sunday January 21, 2018 @08:48PM (#16201322)
Technically it depends on if anything outside the service can see the database and if the state is saved after the service returns. It might seem useless to call a DB if you're not going to save state, but a Rube Goldberg architecture could do so for the lulz.
Re:The Death of Microservice Madness in 2018 by brucephillips on Sunday January 21, 2018 @06:40PM (#16200782)
If a function writes to a DB, yes, that's a side effect. I think you're conflating "scope" and "purpose".
Re:The Death of Microservice Madness in 2018 by dvt on Sunday January 21, 2018 @06:55PM (#16200834)
Correct, my bad.