2016-01-05, 17:51
(2015-12-02, 12:23)da-anda Wrote: The only tricky part to think about is how to generate really complex queries, like with smart playlists, that span accross services/repositories. I don't see any issues with queries that f.e. list all related media by a certain person (like for Jared Leto) as we simply query every asset repository one after another and list the results grouped by type (which makes sense IMO). What we need a solution for are queries against play counts and watched states etc, but I guess we could also prefetch related UUIDs from remote services and use these to filter in the according repo. Might be good if we could do some performance tests with our existing DB (first fetch IDs matchinig play count etc, then do a second query using all aggregated info).
I think we need to have the correct approach to solve the issue. Micro services is excellent when there is little interaction between the services, with Little I mean that the interactions are well defined and with a small data set underlining.
In this way if MicroService B needs an info from MicroService A will perform a MicroService A.getIMBDTitle (moveIMDBCode)
But if you already start to put a GetAllArtists that can return 300 complex records the advantage of micro services is crumbled.
If you have functionalities that may involve all the micro services... (like smart playlists)... at this point you have a major issue and is not working anymore.
To be more precise: you can still design it with micro services but you'll need to build a layer on top of the micro services to join the information from all of them that will be much more complex.