3 ms·
Ask HN: How would an open-source Salesforce clone work?
Every time I develop on Salesforce I'm impressed how fluid the schema is, yet how it works at scale and has relations.
I'm interested how I would implement something link this myself. Googling around for "salesforce clones" I find nothing. I get that MongoDB et al have relations and fluid schemas, but not the SQL-like query language or (IMO) the ability to support hundreds of users all customising the base schema with extra fields, as Salesforce does.
How would you go about implementing this (albeit at a smaller scale)
A few choice quotes from https://developer.salesforce.com/page/From_SQL_to_SOQL
"In Force.com, every database table corresponds to an object that inherits from the SObject object type. Database fields automatically map to their corresponding language types. There are no tools, configuration or XML files required to create the object-relational mapping – it just happens. If you add a field to a database object, that field can be immediately referenced from workflows and code. What’s more, once you have referenced a database field, Force.com prevents you from deleting that field or changing it to an incompatible data type."
...
"The relationship between objects and tables is so tight that in Force.com we don’t refer to tables at all – we only refer to them as objects"
- ChrisBland 12y agoTake a look at The Sugar Open Source Project, http://www.sugarforge.org/content/open-source/ http://www.sugarforge.org/content/open-source/ - should give you an idea of how you might go about implm it
- mickle00 12y agoI've thought a lot about this as well. I really wish SF would separate out their runtime (and open source it!) & platform.
- brickcap 12y agoI have not developed with salesforce and this is the first time that I am reading about their database. But it looks to me that you can implement what they are doing with orient db. It has fluid schema, "objects" and an sql like query syntax. https://github.com/orientechnologies/orientdb https://github.com/orientechnologies/orientdb All of the good stuff is in the wiki :)