scenario
We are evaluating breeze to adopt for our ionic mobile apps specifically for its offline caching capabilities. These apps will be consuming REST APIs powered by rails.
There currently exists functionality to generate json-schema from the ActiveRecord meta data through json_schema_builder and work is underway to dynamically expose a real-time schema definition. If anyone is keen to get involved please make your intentions known on the github issue since that is not the topic of this conversation.
breeze meta-data and json-schema
Overjoyed to find a page titled Meta Schema, impressed that breeze adopted json-schema to represent their meta-data. Equally disappointed to realize json-schema is only used to describe their own schema definition similar to the way meta schemas are used for describing json-schema itself.
json-schema 2 breeze meta-data
Lets not get into a debate on why we have json-schema defining yet another meta-data definition nor how valuable it would've been to have these efforts it took to accomplish this funneled into getting json-schema if it was found to be inadequate. Instead all I am searching to find is a way to turn existing json-schema into something breeze.js can understand. Google does not produce more on the topic, that I can find anyway, and the breeze project suggests we take it up here.
The documentation explains a way of loading meta-data from script by capturing the metadata from what I can only assume to be MC-CSDL Microsofts contribution to yet another standard defining the same.
Aside from doing it by hand and defeating the purpose of having these resources at our disposal, has anyone tried or know of ways to:
turn json-schema into breeze meta-data
perhaps any support for ActiveRecord reflections
at the very least something to query postgresql for the information
Feel free to correct me if you feel I am mistaken and I apologise in advance for any perceived audacities as it is not my intention to offend or annoy you. Please excuse me if I don't further entertain any complaints. I do however welcome any wisdom, insights and intellectual discourse on this topic and do very much appreciate your valuable time and input.
Thank you!
I appreciate your dilemma. I keep looking at json-schema in hopes that Breeze could join it as a standard. It just doesn't carry the information Breeze needs to manage data on the client.
The json-schema does carry much of the schema data that a Breeze client needs. While it might be inadequate on its own, it should give you a head start in writing Breeze metadata by hand.
Some glorious day I imagine a scenario such as this:
A JavaScript breeze-metadata-builder module that can combine metadata information feeds from multiple sources
A JSON configuration file that identifies those sources
One source is a json-schema feed
Another source returns hand-written "customizations" that fill-in-the-blanks from a Breeze metadata perspective
The breeze-metadata-builder merges the two sources into a single, Breeze metadata-format feed.
Run this process in node as a Grunt task, outputting a json or JavaScript file
Client on launch imports this metadata into a MetadataStore
Who is going to write it and share it with the community? How about you #nicki? I'll happily lend a hand.
Related
I have been using CDH and HDP for a while (both in the pseudo-distributed mode) on a VM as well as installing natively on Ubuntu. Although my question is probably relevant to all Projects within the Apache Hadoop Ecosystem, let me ask this specifically in the context of Avro.
What is the best way to go about figuring out what the different packages and the classes within the packages do. I usually end up referring to the Javadoc for the project (Avro in this case) but the overviews for packages and classes end up being awfully inadequate.
For e.g. Take two of the Avro packages: org.apache.avro.specific and org.apache.avro.generic These are used for creating Specific and Generic Readers and Writers (respectively) but I'm not a 100% sure what these are for. I have used the Specific Package for in cases when I have used Avro Code Generation and the Generic ones when I don't want to use code generation. However, I am not sure if that is the only reason for using one vs. the other.
Another example: The Encoder\Decoder Classes are used for low-level SerDe, the DatumReader\DatumWrite for a "medium-level" Serde while most application layer interactions with Avro will probably use Generic\Specific Readers\Writers. Without having struggled through the pain of using these classes, how is a user to know what to use for what?
Is there a better way to get a good overview of each package (clearly the javadoc is not well documented) and the classes within the package?
PS: I have similar questions for essentially all other Hadoop Projects (Hive, HBASE etc.) - the Javadocs seem to be grossly inadequate overall. I just wonder what other developers end up doing to figure these out.
Any inputs would be great.
I download the source code and skim through it to get the idea what it does. If there is javadoc, I read that too. I tend to concentrate on the interfaces that I need and move on from there, that way I put everything into context and it makes it easier to figure out the usage. I use the call hierarchy and the type hierarchy views a lot.
These are very general guidelines, and ultimately it is the time you spend with the project that will make you understand it.
Hadoop ecosystem is quickly growing and changes are introduced on monthly bases. that's why javadoc is not so good. Another reason is that hadoop software tends to lean towards the infrastructure and not towards the end user. People developing tools will spend time learning the APIs and internals while everybody else is kinda supposed to be blissfully ignorant of all those, and just use some high level domain specific language for the tool.
Mainly, I was wondering what advantages the ontology languages of RDFS/OWL has over using a markup system (such as http://www.schema.org/) for managing and creating metadata?
I'm still very confused about how different concepts of the "Semantic Web" are supposed to fit together in the overall picture... The relation between RDF/RDFS/RDFa? OWL? URIs? and finally, XML and SQL/SPARQL? All the descriptions I've read about so far about them make sense individually, but I'm not sure if I could be able to use them as tools if someone were to tell me to implement and query an ontology, for instance. Or any simple examples that can be provided is greatly appreciated.
So Webster Thesaurus followed ashutosh raina's advice and went to answers.semanticweb.com. To facilitate retrieval of the corresponding question there, here is the link: What's the difference between using RDFS/OWL versus XML?
There should be a script redirecting all questions with the "semantic-web" tag to answers.semanticweb.com ;)
I am writing my own custom persistence instance store for WF4, based on the XmlWorkflowInstanceStore found in the .NET 4 WF and WCF samples. This sample is quite simplistic and the xml is produces is quite verbose. I have issues with how some of the objects are serialized.
I have tried using Red Gate Reflector to understand the Sql implementation used, but it is quite complex and difficult to learn from. The MS documentation for this is rather limited - often giving one sentence descriptions for complex methods.
Please could you point me at other examples of WF4 persistence (or proper documentation) around on the web that are not copy and paste versions of XmlWorkflowInstanceStore? Maybe someone else on StackOverflow has written their own?
You are completely correct that the docs are very much lacking here and the sample is of very limited use. I have started work on a custom instance store using the entity framework but, much like you discovered, found it slow going and am nowhere near anything I could use myself, let alone release onto CodePlex.
I am not aware of any blog posts or other information that help solve this.
You've probably seen this already, but I've found the code quite easy to understand: http://xhinker.com/post/WF4Xml-persistence-store.aspx
Ron Jacobs wrote an in memory persistence store for WF unit testing. Check out http://wf.codeplex.com/releases/view/73842
I'm just getting into the client-server data sync stage of my iPhone app project, and have managed to get my CoreData data model loading on both the iPhone client and my TurboGears server (which is good). I'm now beginning to tackle the problem of sync'ing data between the server and multiple clients, and while I could roll my own, this seems like one of those problems that is quite general and therefore there should be frameworks or libraries out there that provide a good deal of the functionality.
Does anyone know of one that might be applicable to this environment (e.g. Objective-C on iPhone, pyobjc / Python on the server)? If not, does anyone know of a design pattern or generally-agreed upon approach for this stuff that would be a good road to take for a self-implementation? I couldn't find a generally accepted term for this problem beyond "data synchronization" or "remote object persistence", neither of which hit much useful on Google.
I did come across the Funambol framework which looks like it provides this exact type of functionality, however, it is C++ / Java based and therefore seems like it might not be a good fit for the specific languages in my project.
Any help much appreciated.
Since you are using TurboGears already, take a look at the RestController documentation. Using RESTful services has become a widely adopted architecture with many implementations for both clients and servers. Matt Gemmell's MGTwitterEngine is a good example of the client implementation of a specific API, Twitter.
I've been trying to find a good form of RPC to standardize on, but so far I've ran into a ton of walls and was wondering what the stackoverflow communities view was.
My ideal RPC would provide the following:
Somewhat wide support in other languages, in that people shouldn't have to write a custom stack to use our server
Input validation
Ideally, some way to turn the above input validation into some sort of automated documentation to distribute
Clean and maintainable code
I am a fan of the catalyst framework and would prefer to stick to it, but if there is a clearly better alternative for RPC servers I'd be open to that as well.
So far I have looked at the following:
Catalyst::Controller::SOAP
Doesn't appear to support returning of complex data structures, only string('literals'). I could probably serialize data on top of that, but that seems very hacky. It also lets you return a pre-formed XML object, but I couldn't get that to work and it looks like you'd need to re-create a lot of SOAP data structure for it to work.
I do like the idea of WSDLs, but the complexity of the overall spec also makes me wonder how well support for communicating with other languages will be.
Custom POSTing XML based controller
We tried to roll our own by hand in a similar way to how we've seen two other projects do it recently where there is a dispatch url that you post XML to. This lets you have XSD validation/documentation, but required creating a lot more code than we want to maintain at this point.
Catalyst::Plugin::Server::XMLRPC
Gave a warning about using a deprecated method that will be removed in a future version of Catalyst.
No input validation or doc creation, but otherwise the best I've found
JSONRPC
Looks pretty similar to XMLRPC only the module is actually updated. I'll probably go with this next unless someone suggests something better
There also appears to be two different modules for catalyst that do JSONRPC
I realize that REST isn't pure RPC (only a subset), but...
I would recommend the Catalyst::Controller::REST and Catalyst::Action::REST modules. They're frequently updated and the documentation is fairly good. There is also a good (but rather dated) example of using Catalyst::Controller::Rest in the 2006 Catalyst Advent calendar titled Day 9 - Web Services with Catalyst::Action::REST.
FWIW, Catalyst::Controller::SOAP does support returning complex data. Take a look at the documentation http://search.cpan.org/~druoso/Catalyst-Controller-SOAP-1.23/lib/Catalyst/Controller/SOAP.pm, which will show you that you can use a WSDL to describe your service. Also, see http://daniel.ruoso.com/categoria/perl/soap-today.html.en for a more detailed step-by-step process.