Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Suggestions on architecture for web based app

Options
  • 17-06-2016 11:50am
    #1
    Registered Users Posts: 872 ✭✭✭


    Hi,

    I'm interested in developing a simple app that is basically a search utility for recipes. It will begin with searching by title and author and then be adapted to include tags for vegetarian, coeliac etc.

    There are about a 1000 recipes.

    I want to create a fast, responsive front-end for searching and displaying results. I'm thinking of Angular and a REST based API for the searches etc (hosted on AWS)

    What i'm unsure about is the database layer. I have experience with relational DB's like mySQL etc. but am hearing lots about Mongo, no SQL etc.

    I imagine my app would involve lots of table joins etc. so would a noSQL solution be suitable for this ?

    Any comments/suggestions on what frameworks/tools might be suitable for my requirements are very welcome.


Comments

  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    grahamor wrote: »
    Hi,

    I'm interested in developing a simple app that is basically a search utility for recipes. It will begin with searching by title and author and then be adapted to include tags for vegetarian, coeliac etc.

    There are about a 1000 recipes.

    I want to create a fast, responsive front-end for searching and displaying results. I'm thinking of Angular and a REST based API for the searches etc (hosted on AWS)

    What i'm unsure about is the database layer. I have experience with relational DB's like mySQL etc. but am hearing lots about Mongo, no SQL etc.

    I imagine my app would involve lots of table joins etc. so would a noSQL solution be suitable for this ?

    Any comments/suggestions on what frameworks/tools might be suitable for my requirements are very welcome.

    Elasticsearch is what I would use for this (and have done, for this exact app).


  • Registered Users Posts: 586 ✭✭✭Aswerty


    For a simple app, plain old SQL should be more than good enough.

    If you're not going to be working at scale or with large amounts of data there really is nothing wrong with using the 'like' keyword for searching titles and authors. Implementing tags would also be very simple with a traditional RDBMS since it'd just involve having a table that lists the tags and a pivot table for relating tags to titles.

    If you want to get a bit more complicated (and much more efficient) than using 'like' you could always go with Full-Text Search which is built into most modern RDBMS and which elastic search makes use of anyways. It's not overly complicated but does have a learning curve.

    Of course if half the reason you're doing this is to learn some of the shinier tech, then go ahead with Mongo, Elasticsearch, etc.

    But I don't think there is an overriding reason to involve these technologies. If you look at the Elasticsearch product page you'll see it's advantages are all targeted towards the like of high scale and distributed systems.
    I imagine my app would involve lots of table joins etc. so would a noSQL solution be suitable for this ?

    Firstly NoSQL is not designed for highly relational data which is what lots of table joins implies. Secondly, from the sounds of it, you're going to have an exceedingly simplistic data structure since it's going to effectively just be a library structure. Due to this a NoSQL database wouldn't be unsuitable.


  • Registered Users Posts: 6,252 ✭✭✭Buford T Justice


    If you're looking at using angular, why not go the whole hog and use the MEAN stack?


  • Registered Users Posts: 403 ✭✭counterpointaud


    Depending on how the recipe content is created, or where it comes from, I would look at an API first CMS like Contentful. Then you have no need of a server, just serve the Angular app from Nginx or whatever. Recipes can be formatted with markdown.


  • Registered Users Posts: 872 ✭✭✭grahamor


    If you're looking at using angular, why not go the whole hog and use the MEAN stack?

    Thanks for the reply. Using MEAN was the original plan.

    I also noticed the AWS API gateway which seems easy to setup, keep secure and tie into other AWS services.


  • Advertisement
  • Registered Users Posts: 6,150 ✭✭✭Talisman


    The initial description outlines a very simple application - it's a single page application that performs a facet search.

    1 - You need to store the documents to be searched.

    MongoDB is a simple data store, it's essentially JSON stored in a binary format. You should be aware that it doesn't guarantee consistency of the data so it might be a good idea to store the data elsewhere as a backup.

    2 - You need a mechanism to search the documents.

    Faceted search would be easy to implement using a Map-Reduce function. Better performance would be achieved using a search engine software package that provides built-in faceted search capabilities. Elasticsearch has previously been suggested but I think it's older cousin, Apache Solr, is a better fit for such a simple use case. Integrating MongoDB and Solr is achieved using Mongo Connector. Faceted search is easy with Solr, this offsets the additional complexity added to the deployment due to having another moving part in the mix.

    3 - You need a light weight presentation layer.

    For the presentation layer you could use any framework you desire. If you want light weight then take a look at Mithril.js, it's very impressive.


  • Registered Users Posts: 767 ✭✭✭EIREHotspur


    The simplest way to do this is use a web based technology like Wordpress and include some native features to keep it 'legal' to pass the Stores....

    Simple = cheap and thats the cheapest way of doing it...most Apps don't use Native features and rely on a data connection anyway...


  • Registered Users Posts: 872 ✭✭✭grahamor


    Giblet wrote: »
    Elasticsearch is what I would use for this (and have done, for this exact app).

    Thanks for the recommendation. Seems to suit my requirements exactly. I'm enjoying how it works and love the REST approach for CRUD operations.

    I have a question regarding linking recipes. Imagine i have a recipe for apple pie. In order to make this i would also need a recipe for pastry. Would it be possible to create an association between the pastry recipe and the original recipe so when it's opened in a UI there would also be tabs or links to the related recipe ?

    I'm still thinking in terms of relational databases so apologies if this is obvious.


  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    grahamor wrote: »
    Thanks for the recommendation. Seems to suit my requirements exactly. I'm enjoying how it works and love the REST approach for CRUD operations.

    I have a question regarding linking recipes. Imagine i have a recipe for apple pie. In order to make this i would also need a recipe for pastry. Would it be possible to create an association between the pastry recipe and the original recipe so when it's opened in a UI there would also be tabs or links to the related recipe ?

    I'm still thinking in terms of relational databases so apologies if this is obvious.

    You would just have an array of recipes ids, links or whatever you need to represent the related recipes attached to your recipe document.


  • Administrators Posts: 53,743 Admin ✭✭✭✭✭awec


    The hosting of Elastic search is pretty expensive is it not for something that I assume is not going to make any money / is just a hobby project?

    Mongo was the same last I checked.


  • Advertisement
  • Registered Users Posts: 11,979 ✭✭✭✭Giblet


    awec wrote: »
    The hosting of Elastic search is pretty expensive is it not for something that I assume is not going to make any money / is just a hobby project?

    Mongo was the same last I checked.

    That's if you use their hosting platform, you can self host if required.


  • Registered Users Posts: 872 ✭✭✭grahamor


    I was planning on using an AWS EC2 instance to host it. It would be very low traffic for the first year.

    It doesn't seem overly complicated to self host but i'm open to any opinions on this.


  • Administrators Posts: 53,743 Admin ✭✭✭✭✭awec


    Giblet wrote: »
    That's if you use their hosting platform, you can self host if required.

    You need a VM to self host it, no? (so you'd be paying for that anyway)


  • Registered Users Posts: 6,150 ✭✭✭Talisman


    grahamor wrote: »
    I was planning on using an AWS EC2 instance to host it. It would be very low traffic for the first year.

    It doesn't seem overly complicated to self host but i'm open to any opinions on this.
    Do you need AWS? There is far better value elsewhere if you're paying for services out of your own pocket.


  • Registered Users Posts: 2,342 ✭✭✭red_bairn


    awec wrote:
    You need a VM to self host it, no? (so you'd be paying for that anyway)


    Unless the OP can avail of the free tier.


  • Registered Users Posts: 872 ✭✭✭grahamor


    red_bairn wrote: »
    Unless the OP can avail of the free tier.

    Thanks. Yes, i should be able to avail of the free tier while i'm getting it up and running.


Advertisement