4 ms·
I don't get it: why does moving to microservices mean ditching Django? Couldn't you take your Django monolith and break it into separate (still-Django) microse
by drbryanadams 12y ago
I don't get it: why does moving to microservices mean ditching Django? Couldn't you take your Django monolith and break it into separate (still-Django) microservices? I get that Django is seen as "too heavyweight" to do such a thing, though there are literally books (http://shop.oreilly.com/product/0636920032502.do http://shop.oreilly.com/product/0636920032502.do) written about how to slim down Django.
I get that monolith to microservice is all the rage these days, I just don't understand (and the article doesn't really say) why you have to "ditch Django" to do that.
- artursapek 12y agoHe listed one of the benefits of microservices as freedom to use whichever languages/frameworks developers prefer.
- drbryanadams 12y agoSure, but the title says "ditching Django" ... presumably if they have a Django monolith, at least some of the devs might choose Django for some of the microservices? Maybe they are still using Django in some capacity and the title is just slightly overstated ... not sure, but would appreciate an author comment in this regard.
- tmwatson100 12y agoYes you're right it is slightly overstated. We still use our Django monolith to compensate for not re-writing every single part of our codebase. However overtime I would imagine we would move away from Django as with small enough services it would be overkill as a solution. Saying that, if it makes sense at the time then why not. With this architecture you have the flexibility to do that.
- drbryanadams 12y agoSure -- not looking to nitpick. I just wanted to understand if there was something about Django that you found incompatible w/ microservices, and it sounds like there isn't. An overstated headline isn't the worst crime on the planet (though, I would say that Google has already carried the headline far and wide already ... sigh).
- huxley 12y agoI could see that freedom becoming technical debt if the project is big enough and poorly documented. I keep picturing the legendary missing Novell server that was buried behind drywall at the University of North Carolina: http://arstechnica.com/civis/viewtopic.php?f=2&t=1824 http://arstechnica.com/civis/viewtopic.php?f=2&t=1824
- eliben 12y agoSeconding this. Could someone clarify? I thought Django and "microservices" are orthogonal. Can't Django be used to create any service, even a micro service? I certainly used Django in the past just as a REST server, without any "web site" to speak of. It just reduces some boiler plate.
- raverbashing 12y agoOf course Django can be used for microservices I don't recommend it, but you can use it I would prefer to use Django mainly for CMS kind of things
- mbrameld 12y agoWhy?
- kstrauser 12y agoMy own reasons: because Django is awesome as long as you want to do everything the Django way. For example, as soon as you want to upgrade to SQLAlchemy because every other business unit is already using it, you're in for pain. You can unwire some of those low-level decisions and plug your own code it, but with all the difficulty that usually brings, what's the point of using Django in the first place? Django was born as a CMS and it really excels there, but it's modeled as a complete end-to-end stack. That's great if you love every single component of that stack, but not so great if you'd prefer alternatives.
- adambratt 12y agoUsing Django Rest Framework is practically the EASIEST tool for building microservices I've ever used. It's incredible how awesome it is for building APIs. We were recently looking at building out some new services in Flask or Express. We compared the advantages of each to DRF and quickly concluded that it wasn't worth it. DRF has so much commonly used stuff done for you and it sets up one of the best standards for REST API's I've ever seen.
- 12y ago