Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • charlie black 33 posts 106 karma points
    Jul 06, 2018 @ 22:58
    charlie black
    0

    Decoupling Umbraco from your front-end website

    I was investigating taking an existing umbraco 6.1.6 site and re-architecting it, creating a separate (databaseless) front-end and an umbraco back-end; the front end would be a standard azure cloud service and the umbraco back-end could be a azure web site. My question is about the umbraco xml cache file, Umbraco.Config? How do I make the backend's umbraco.config file accessible by the public front-end ? The 2 are completely de-coupled.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 11x admin c-trib
    Jul 07, 2018 @ 07:58
    Jan Skovgaard
    0

    Hi Charlie

    To me it sounds like you should explore the option to make use of Web API to expose your data using different API's and thereby not worrying about how to share the XML cache but serve data using the API's.

    If my memory is correct you should be able to make use of Web API in Umbraco 6 too - You can learn more about it here https://our.umbraco.com/documentation/Reference/Routing/WebApi/

    I'm not sure but you might need to deal with CORS if taking this route, which you can read a bit more about here https://stackoverflow.com/questions/34748039/enable-cors-in-umbraco-6-web-api-2-instance - But I guess that depends on your setup.

    Just my 2 cents - Hope they are useful :-)

    /Jan

  • Nicholas Westby 2054 posts 7103 karma points c-trib
    Jul 07, 2018 @ 16:44
    Nicholas Westby
    0

    Just to toss a crazy idea into the mix, you could convert the XML to JSON with a few lines of code (because JSON is super easy to consume on the backend and frontend): https://www.newtonsoft.com/json/help/html/ConvertXmlToJson.htm

    var doc = new XmlDocument();
    doc.LoadXml(xml);
    var json = JsonConvert.SerializeXmlNode(doc);
    

    Then you'd need some way of passing that to the other server. You could go with Jan's suggestion of creating an API.

    Another idea would be to transfer the JSON as a file to some central location both servers have access to (e.g., Azure blob storage).

  • Phil Atkinson 51 posts 244 karma points
    Jul 09, 2018 @ 09:12
    Phil Atkinson
    0

    sounds like you need umbraco's new headless solution or make your own like we did: https://codegarden18.com/sessions/headless-umbraco-cockroaches-and-aws-a-great-mix-for-our-players/

  • charlie black 33 posts 106 karma points
    Jul 09, 2018 @ 16:08
    charlie black
    0

    Phil- Thanks. I'll take a look!

  • charlie black 33 posts 106 karma points
    Jul 09, 2018 @ 22:53
    charlie black
    0

    Phil- Thanks. I'll take a look!

    UPDATE: I am past halfway in the presentation but there's no mention of the umbraco.config xml cache file. Is that used at all by tombola platform? I've seen the part about the cache and couchbase but that's not about the umbraco.config xml file is it?

  • Phil Atkinson 51 posts 244 karma points
    Jul 13, 2018 @ 14:30
    Phil Atkinson
    0

    umbraco servers all look after their own cache. the cache in our presentation is an extra cache layer in case the umbraco servers go offline, our front end web servers would still work even with no umbraco servers

  • Phil Atkinson 51 posts 244 karma points
    Jul 13, 2018 @ 14:33
    Phil Atkinson
    100

    basically our web servers are "clients" and when you need content we call umbraco via its api endpoints (we built a custom library to handle this and cache the responses in between). the "client" and server (umbraco) are disconnected, no need to interfere with umbraco's xml cache

Please Sign in or register to post replies

Write your reply to:

Draft