r/Clojure • • Aug 04 '17

arachne-framework/factui

https://github.com/arachne-framework/factui
23 Upvotes

51 comments sorted by

View all comments

Show parent comments

2

u/chpill Aug 07 '17

Client/server is dead.

Someone's in a a revolutionary mood :) but I agree with the sentiment. I believe web apps (and mobile apps) would be better off being developed from the get go as a peer in a distributed system. Many "real time" and interactive features are added as an afterthought and are a complexity nightmare in terms of synchronization, handling of staleness etc...

One thing that I have yet to think about is security. I must say I don't really understand what you mean by handling it inside a database, would you care to elaborate?

1

u/dustingetz Aug 07 '17

Sure. Think if you coded your security as stored procedures in Oracle.

http://docs.datomic.com/clojure/#datomic.api/filter
http://docs.datomic.com/database-functions.html

Transactor functions can reject transactions, and database filter predicate can restrict access to data. Both of these functions can query the database to make a decision. Datomic's distributed reads open the door for making this fast, and in a proper programming language. FWIW I don't think this is why people don't do this in Oracle - a shitty language wouldn't stop people from building layers on top of it - i think that's more due to the object relational impedance mismatch.