AFAIK Phoenix doesn't tie in with npm packages whatsoever.
You have an `assets/` dir that contains your javascript stuff, and out of the box Webpack is set up there, but besides that it's all your choice, with the exception of the pre-shipped stuff for Channels and LiveView.
It’s not supposed to tie in with NPM packages. Phoenix handles the back end, and can handle the HTML as well. If you want to include any front end JS stuff, just include the scripts or bundles like you would a regular site where you include JS stuff.
The challenge is that there are several ways of doing this depending on your larger architecture. So the definition of "just work" depends on the context of your particular architecture.
For eg: you could hook into your ORM and send change events to Typesense like another commenter pointed out; if you have an event bus, you could hook into those messages and push to Typesense from a listener; you could use something like Maxwell to get a JSON stream from the DB binlogs and write the data you need into Typesense; or you could write a batch script which runs a set of SQL queries on a schedule and batch export + import into Typesense.
Also, typically you'd want to curate the fields that you put in a search index, vs what you store in your transactional database, so there is some level of data transformation that's needed anyway.
So long story short, it depends on your architecture!
For our setup with Typesense we created a mapping, did an initial bulk import and then set up ORM lifecycle events to sync insert/delete/updates from the database to Typesense. We are using Symfony with Doctrine as the ORM.
Keeping an external search system in-sync with the primary DB is certainly a pain point. The biggest problem is that the records in the DB will likely be normalized, while the records in a search store will not be.
You can "poll" for new records for indexing by using a query, but handling deletes/updates is the real deal breaker. You will then have to use both the binlog (atleast for mysql) and querying, at which point it becomes quite complicated to reason about.
That would totally be the dream though. No reindexing. Pg_search is def fast enough for a large swath of use cases.
What I do is I’ve built a real barebones search controller that connects to Postgres. My controller only lets you search on one attribute, and I use it for autocompletes. Anything more involved, I use typesense.
As I posted in another comment [1], the biggest problem is handling updates and deletes. Requires that you do some kind of logical deletion with an `last_updated_at` timestamp to fetch updates from a primary table.
I don't quite follow. For a system reliant entirely on Postgres, you can just fetch the records, and join them in real time, no? It would be much slower than elasticsearch, but still _good enough_ for a lot of use cases.
I was referring to an integration between Postgres and an external search system such that the data sync is automated. That was what the parent comment was asking about (I think).
What I really want is an integration between Instantsearch.js, and Postgres.
Typesense has written a custom adapter for Instantsearch & Typesense. I would love to just hook Instantsearch up to directly to my rails all. You could use pg_search to get 90% of the value, with next to no complexity on the backend.
@alexliu518 do you have an example for a Vue.js + Node.js backend with simple saving and updating? Is this possible or do I need to run the Java backend + services?
There is no Node.js backend for the time being, we are considering plans for more backends in other languages
We have collected the backends of java, .NET and Golang versions provided by the community. Welcome to the community to provide another Node.js version.
While I agree holding your own views and opinions help with doing something novel and different. I do feel like articles like this are mostly used to cover up and excuse hostility, bad work environments and Jobs esque management styles.
You can have groundbreaking ideas without "disrupting" every single part of your work life. Assuming large groups of people can't think for themselves is both short sighted and insulting. Not everyone is in the position to push their views on their environment without repercussions.
I'm pretty sure a janitor or administrator can think for themselves really well. It's their bosses that limit their subordinates, not the employees limiting themselves.
> Assuming large groups of people can't think for themselves is both short sighted and insulting.
But it is mostly true, at least in management positions. Independent-minded people by definition question authority so they are mostly relegated to low status positions. If you don't question authority then you aren't independent-minded. And no, questioning some authority figure just because some other authority figure told you to doesn't count.
It's possible to be independent minded and not question management. You know internally that it's all BS (because of your independent mindedness) but don't vocalize it because you're employing a political strategy to which that would be harmful.
Lets say that your drive to be liked by your manager makes you express X more support for his ideas, or express X less arguments against them. Then the person with a more supportive base line will still appear more supportive even after this motivation adjustment.
You can work around this by just being better than your peers at manipulating feelings, but it is still a handicap.
Why would independed minded person necessary came to conclusion that loudly openly questioning authority is good idea, in situation in which it is predictable that it is going to lead to bad result?
Keeping quiet about things only helps so much. People can feel if you question them or not. I mean, there are two workers, A is always excited about everything his manager suggest and do while B mostly keeps his thoughts to himself. Who is more likely to get promoted?
Everyone starts out as low status, so that scenario is the most important to analyze.
> But yes, having good relationship with manager definitely helps your career. It typically does not require being excited about absolutely everything.
Do you think that questioning your manager doesn't make it harder to have a good relationship with him? As I said keeping quiet about it doesn't work, most people know when you aren't agreeing with them even without telling them.
My point about excitement is that a person will lose a lot of energy and excitement when they do things they feel are wrong. Others can feel that.
> I do feel like articles like this are mostly used to cover up and excuse hostility, bad work environments and Jobs esque management styles.
I don't think so but I definitely dislike the mentioned points as well and probably this should be more unambiguous. At the same time, hostile and toxic work environments tend to encourage aggression towards regular employees with different opinions. Therefore I find the article quite encouraging.
Not any time soon. Apple Silicon implements additional instructions not found on other boards, making software compiled for it potentially (read: probably) incompatible. There's also the presence of the security chips which Apple will likely assume to be present as it's not optional on ARM boards, so you'd need to patch checks and calls to that out.
Even if it does work, there'd be little use in it. Hackintoshes are popular because they offer performance beyond what you can buy for a reasonable price as a consumer. Alternative ARM devices are nowhere near as fast as M1, so that use case disappears completely.
There's also the bootloader issue. On x86 and x64 the boot process has been standardized into either BIOS or UEFI mode. On ARM there are standards comparable to UEFI, but most chip vendors have their own custom bootloader code to boot an OS. Most chipsets are compatible with Android or Linux but there's only one manufacturer who develops bootloaders for the macOS platform.
It's possible to get macOS arm64 working on Arm hardware (except Rosetta on Arm cores that don't implement TSO/SC, or you're stuck with a single core). However, Arm macOS assumes an Armv8.3-A architecture baseline. Patching at runtime from Armv8.3-A to v8.2-A is quite feasible, to 8.0-A like an RPi4 is another matter.
Yes, but Apple has added additional instructions to it. Any app that relies on those Apple-specific additional instructions would crash running on different chips.
Can you provide a source? Everywhere I've looked just shows MRS and MSR instructions, which are standard ARM instructions with platform specific operands/results. It can only be a custom instruction if the disassembly shows it's in the reserved instruction opcode space.