

Ask HN: How would an open-source Salesforce clone work? - porker

Every time I develop on Salesforce I&#x27;m impressed how fluid the schema is, yet how it works at scale and has relations.<p>I&#x27;m interested how I would implement something link this myself. Googling around for &quot;salesforce clones&quot; 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.<p>How would you go about implementing this (albeit at a smaller scale)<p>A few choice quotes from https:&#x2F;&#x2F;developer.salesforce.com&#x2F;page&#x2F;From_SQL_to_SOQL<p>&quot;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.&quot;
...
&quot;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&quot;
======
brickcap
I 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 :)

------
ChrisBland
Take 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
I've thought a lot about this as well. I really wish SF would separate out
their runtime (and open source it!) & platform.

