Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. I need opinions. Give me yours

I need opinions. Give me yours

Scheduled Pinned Locked Moved The Lounge
jsondatabasedata-structuresquestiondiscussion
14 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    honey the codewitch
    wrote on last edited by
    #1

    So I wrote a wrapper for The Movie DB (tmdb.org) so you can easily and efficiently query for tv show and movie data. It wraps pretty much the entire, very mature REST/json API as an object model so it's enormous. Anyway, the neat thing about it is how it caches. The entire object model backs its state on a normalized graph that maps directly to JSON. it queries tmdb.org as necessary to fill in the bits of the graph it doesn't already have. so it keeps the entire cache as one large (normalized) "JSON" object graph. The normalization just means parsing the json into (null),string,bool, int,long,bigint, double, IList and IDictionary types and then nesting those to make the graphs. I say graphs because the way the cache works, everything is connected, and you might have a node connected by more than one "parent" so that data isn't so duplicated. Anyway, that caching and state backing thing could use its own article. But it's a technique, not a separate code library. Should I publish a Tip & Trick entry with just the caching aspect of the TmdbApi explored, or do you have better ideas? Object graph: Simply objects nested inside objects using dictionaries and lists. (Apparently graph databases are a thing. I did not know that.)

    When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

    R T B 3 Replies Last reply
    0
    • H honey the codewitch

      So I wrote a wrapper for The Movie DB (tmdb.org) so you can easily and efficiently query for tv show and movie data. It wraps pretty much the entire, very mature REST/json API as an object model so it's enormous. Anyway, the neat thing about it is how it caches. The entire object model backs its state on a normalized graph that maps directly to JSON. it queries tmdb.org as necessary to fill in the bits of the graph it doesn't already have. so it keeps the entire cache as one large (normalized) "JSON" object graph. The normalization just means parsing the json into (null),string,bool, int,long,bigint, double, IList and IDictionary types and then nesting those to make the graphs. I say graphs because the way the cache works, everything is connected, and you might have a node connected by more than one "parent" so that data isn't so duplicated. Anyway, that caching and state backing thing could use its own article. But it's a technique, not a separate code library. Should I publish a Tip & Trick entry with just the caching aspect of the TmdbApi explored, or do you have better ideas? Object graph: Simply objects nested inside objects using dictionaries and lists. (Apparently graph databases are a thing. I did not know that.)

      When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

      R Offline
      R Offline
      RickZeeland
      wrote on last edited by
      #2

      I think most people here don't even have a clue what a graph database is and probably think it has to do with graphics, so it would be a good thing to explain that first :-\ Here some Graph databases are mentioned: best-graph-databases-suited-for-big-data[^]

      H J 2 Replies Last reply
      0
      • R RickZeeland

        I think most people here don't even have a clue what a graph database is and probably think it has to do with graphics, so it would be a good thing to explain that first :-\ Here some Graph databases are mentioned: best-graph-databases-suited-for-big-data[^]

        H Offline
        H Offline
        honey the codewitch
        wrote on last edited by
        #3

        i didn't know a graph database was a thing as such. i'll edit my comment. i was just talking about an object graph. but i suppose that's what a graph DB would hold.

        When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

        R 1 Reply Last reply
        0
        • R RickZeeland

          I think most people here don't even have a clue what a graph database is and probably think it has to do with graphics, so it would be a good thing to explain that first :-\ Here some Graph databases are mentioned: best-graph-databases-suited-for-big-data[^]

          J Offline
          J Offline
          Jon McKee
          wrote on last edited by
          #4

          I've used neo4j and would recommend it if you use Java. They have a really good intro article to the topic too - What is a Graph Database?[^] :thumbsup:

          H R 2 Replies Last reply
          0
          • H honey the codewitch

            i didn't know a graph database was a thing as such. i'll edit my comment. i was just talking about an object graph. but i suppose that's what a graph DB would hold.

            When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

            R Offline
            R Offline
            RickZeeland
            wrote on last edited by
            #5

            Why is this now playing in my head: Billy Joel - Honesty[^] :-\

            1 Reply Last reply
            0
            • J Jon McKee

              I've used neo4j and would recommend it if you use Java. They have a really good intro article to the topic too - What is a Graph Database?[^] :thumbsup:

              H Offline
              H Offline
              honey the codewitch
              wrote on last edited by
              #6

              this one is all in C#. It's not really a full fledged DB. It's simplistic but good for what i needed it to do. Literally all the "indexers" are are just thinly wrapped Dictionary instances. Each Dictionary is a JSON object. Each List is a JSON array. The scalar values for `object` can be numeric, string, boolean or null, just like JSON, but they can also be more lists and dictionaries. It all maps directly. It's so easy it's stupid, but smart enough to work. When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

              1 Reply Last reply
              0
              • J Jon McKee

                I've used neo4j and would recommend it if you use Java. They have a really good intro article to the topic too - What is a Graph Database?[^] :thumbsup:

                R Offline
                R Offline
                RickZeeland
                wrote on last edited by
                #7

                There is a free Ebook about Neo4j here: Graph Databases, published by O'Reilly Media[^]

                H B 3 Replies Last reply
                0
                • R RickZeeland

                  There is a free Ebook about Neo4j here: Graph Databases, published by O'Reilly Media[^]

                  H Offline
                  H Offline
                  honey the codewitch
                  wrote on last edited by
                  #8

                  I've heard of it, but it's overkill for this. If this was serving json rather than consuming it I'd consider it, but all i need is simple caching.

                  When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                  1 Reply Last reply
                  0
                  • H honey the codewitch

                    So I wrote a wrapper for The Movie DB (tmdb.org) so you can easily and efficiently query for tv show and movie data. It wraps pretty much the entire, very mature REST/json API as an object model so it's enormous. Anyway, the neat thing about it is how it caches. The entire object model backs its state on a normalized graph that maps directly to JSON. it queries tmdb.org as necessary to fill in the bits of the graph it doesn't already have. so it keeps the entire cache as one large (normalized) "JSON" object graph. The normalization just means parsing the json into (null),string,bool, int,long,bigint, double, IList and IDictionary types and then nesting those to make the graphs. I say graphs because the way the cache works, everything is connected, and you might have a node connected by more than one "parent" so that data isn't so duplicated. Anyway, that caching and state backing thing could use its own article. But it's a technique, not a separate code library. Should I publish a Tip & Trick entry with just the caching aspect of the TmdbApi explored, or do you have better ideas? Object graph: Simply objects nested inside objects using dictionaries and lists. (Apparently graph databases are a thing. I did not know that.)

                    When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                    T Offline
                    T Offline
                    Thomas Daniels
                    wrote on last edited by
                    #9

                    honey the codewitch wrote:

                    Anyway, that caching and state backing thing could use its own article. But it's a technique, not a separate code library. Should I publish a Tip & Trick entry with just the caching aspect of the TmdbApi explored, or do you have better ideas?

                    It sounds like it would fit better as an Article than as a Tip (unless I'm overestimating the amount you can write about it). But it doesn't matter that it's a technique instead of a code library... there's no problem whatsoever with writing an article about a technique.

                    1 Reply Last reply
                    0
                    • H honey the codewitch

                      So I wrote a wrapper for The Movie DB (tmdb.org) so you can easily and efficiently query for tv show and movie data. It wraps pretty much the entire, very mature REST/json API as an object model so it's enormous. Anyway, the neat thing about it is how it caches. The entire object model backs its state on a normalized graph that maps directly to JSON. it queries tmdb.org as necessary to fill in the bits of the graph it doesn't already have. so it keeps the entire cache as one large (normalized) "JSON" object graph. The normalization just means parsing the json into (null),string,bool, int,long,bigint, double, IList and IDictionary types and then nesting those to make the graphs. I say graphs because the way the cache works, everything is connected, and you might have a node connected by more than one "parent" so that data isn't so duplicated. Anyway, that caching and state backing thing could use its own article. But it's a technique, not a separate code library. Should I publish a Tip & Trick entry with just the caching aspect of the TmdbApi explored, or do you have better ideas? Object graph: Simply objects nested inside objects using dictionaries and lists. (Apparently graph databases are a thing. I did not know that.)

                      When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                      B Offline
                      B Offline
                      BillWoodruff
                      wrote on last edited by
                      #10

                      This could become a very valuable CP article.

                      «Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

                      H 1 Reply Last reply
                      0
                      • R RickZeeland

                        There is a free Ebook about Neo4j here: Graph Databases, published by O'Reilly Media[^]

                        B Offline
                        B Offline
                        BillWoodruff
                        wrote on last edited by
                        #11

                        Neo4j is quite interesting: it runs on java. The free book is very well-written.

                        «Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

                        1 Reply Last reply
                        0
                        • R RickZeeland

                          There is a free Ebook about Neo4j here: Graph Databases, published by O'Reilly Media[^]

                          B Offline
                          B Offline
                          BillWoodruff
                          wrote on last edited by
                          #12

                          Neo4j is quite interesting: it runs on Java. The free book is very well-written.

                          «Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

                          1 Reply Last reply
                          0
                          • B BillWoodruff

                            This could become a very valuable CP article.

                            «Where is the Life we have lost in living? Where is the wisdom we have lost in knowledge? Where is the knowledge we have lost in information?» T. S. Elliot

                            H Offline
                            H Offline
                            honey the codewitch
                            wrote on last edited by
                            #13

                            I wonder how many services out there expose their APIs as JSON (content-type: application/json) over HTTP REST? If so, I might have a dynamic, (read-only) caching entity framework for querying such a monster. All of the really cool stuff though - like the automatic paging is very service specific regardless.

                            When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                            R 1 Reply Last reply
                            0
                            • H honey the codewitch

                              I wonder how many services out there expose their APIs as JSON (content-type: application/json) over HTTP REST? If so, I might have a dynamic, (read-only) caching entity framework for querying such a monster. All of the really cool stuff though - like the automatic paging is very service specific regardless.

                              When I was growin' up, I was the smartest kid I knew. Maybe that was just because I didn't know that many kids. All I know is now I feel the opposite.

                              R Offline
                              R Offline
                              RickZeeland
                              wrote on last edited by
                              #14

                              This site provides access to lots of API's: https://rapidapi.com/[^]

                              1 Reply Last reply
                              0
                              Reply
                              • Reply as topic
                              Log in to reply
                              • Oldest to Newest
                              • Newest to Oldest
                              • Most Votes


                              • Login

                              • Don't have an account? Register

                              • Login or register to search.
                              • First post
                                Last post
                              0
                              • Categories
                              • Recent
                              • Tags
                              • Popular
                              • World
                              • Users
                              • Groups