1

My company wants to do microservices and has created an outline of their plan (see below) (focused on dealing with files). I am not sure this is really microservices since I thought each microservice would have an individual data store? Also, they seem like one-offs that have no dependency on each other so in the end is this just SOA?

When I think microservices I think about the classic shopping cart/products example where it's a collection of services that truly work together.

  • File Saving
  • Generate MD5
  • Generate Sha1
  • Reduplicate (MD5)
  • File Location Retrieval
  • File Retrieval
  • Delete/Disable/Invisible

Post Processing Services (can be async)

  • Identify File Type
  • Extract Text
    • Extract content
  • Extract Images
  • Extract Metadata
  • Screen Capture File History (Part of every service)
  • Transcoding
  • Thumbnail Generation
  • Image
  • Video
  • Audio generation
  • Descriptor Generation
  • Descriptor Insertion
  • Access Control/Authorization
  • Tagging
  • Caching
  • File Relationship Management
4
  • 1
    I tried to fix the formatting of your outline, but I'm not sure I got it right – please check and edit if necessary.
    – amon
    Commented Feb 8, 2017 at 18:15
  • 3
    The list of things you've written in your question is not an architecture of any kind. What you have here is a list of features. How you implement those features is entirely up to you. Rather than focusing on the specific definition of a word, I think it would be more productive if you focus on which implementation techniques most effectively fulfill this list of features you have created (in whatever ways you define "effective.") Commented Feb 8, 2017 at 19:19
  • 1
    And no, microservices don't necessarily each have their own data store. It's entirely possible (and, in fact, quite common) to write several microservices that all access a single, centralized data repository. Commented Feb 8, 2017 at 19:20
  • 1
    Please use a collision resistant hash (e.g. SHA2/3) for deduplication and not MD5 or SHA1. Commented Feb 8, 2017 at 21:06

1 Answer 1

3

In a microservices architecture each microservice is responsible for its own data. Where that data is physically stored isn't really important. It's fairly common to have a central database for efficiency and to make administration easier. It's when one service writes to a table and a different one reads from or writes to the same table that you're diverging from the microservice architecture. Having one microservice's tables next to another microservice's tables isn't an issue.

5
  • Since in this case that data store is a file system if they microservices all performed work on the same collecting/folder (same table in SQL speak).... Would this be a bad thing ?
    – punkouter
    Commented Feb 9, 2017 at 15:20
  • If you share data stores you cause coupling that invalidates the main advantages of microservices. You are then taking on the extra orchestration complexity of microservices without gaining their huge benefit of encapsulation. Your hybrid would have the worst features of both architectures. Commented Feb 9, 2017 at 16:07
  • For example. They want a FILE SAVE and a FILE DELETE microservice that acts on the SAME file server. Does this make sense ? if not, should all file related methods be all in ONE microservice ? (I'm trying to focus on the examples above to I know what to tell them)
    – punkouter
    Commented Feb 9, 2017 at 18:55
  • I would consider these part of the same service because they have a strong need for coordination. How do they prevent deletion of a file that is in progress of being saved, etc. Commented Feb 9, 2017 at 19:26
  • ok. thanks. I don't think they understand that (they are new to microservices and they seem to be determined to use it) . So you are saying any services that moves files (reads/writes etc.) around on a particular file server should be ONE microservice. right ?
    – punkouter
    Commented Feb 9, 2017 at 19:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.