I think this is super important for the health of the Meteor community. Elixir and Phoenix are popular because the theyāre borrowing ideas from other places. This inspired me to write a blog post (just flipped it to live after reading this) on how Meteor can improve itās quality and cohesiveness by borrowing some of these features.
I'm also finishing up a server side router framework based on Phoenix's 'user experience'. However it's just for restful routes:
[27th comment on this thread](https://forums.meteor.com/t/use-functional-programming-to-simplify-your-meteor-code/9915/27)
I'm also finishing up a solution that will dig me out of an upcoming scaling issue for a client app. I'm bypassing Meteor's oplog issue by using Phoenix to handle realtime needs (albeit my use case is fairly simple so it works out well).
It ends up working like @ccorcos 's any/db package where you can use minimongo as a cache so the client listens to an āon msg:newā event and stores the response.
Itās not quite ready as far as benchmarks and documentation but iāll have that and a blog post soon. The bottleneck in the setup is how fast Meteor can server the html page (which is a better problem to have!)
// upset into minimongo on new message
channel.on("new_msg", doc => {
Chats.upsert(doc._id, doc);
})
channel.join()
// prime minimongo with last 20 chats on join
.receive("ok", resp => {
resp.initialChats.forEach(doc => {
Chats.insert(doc);
});
})
and then only a few lines of code in phoenix (itās only handling publication logic). Pubsub can be authorized with the loginToken and a simple function to retrieve the user doc of that token.
def handle_in("new_msg", payload, socket) do
# run model validations
changeset = Chat.changeset(%Chat{_id: payload["_id"]}, payload)
{status, result} = Repo.insert(changeset);
if status == :ok do
# send to all users sub to lobby
broadcast! socket, "new_msg", result
# don't return anything to browser that 'called'
{:noreply, socket}
else
{:noreply, socket}
end
end
[quote="jacobin, post:3, topic:13519"]
One thing that caught my interest was the 'What's next for Phoenix' video.
In it they discuss how GraphQL is highly parallelizable and a perfect fit for Elixir. :smile:
[/quote]
Itās interesting they have a roadmap and discuss future plans