4 ms·
What's wrong with it? Generally speaking in mathematics isomorphisms are mappings that admit inverses. That seems like a fairly accurate description of what's g
by jdoliner 9y ago
What's wrong with it? Generally speaking in mathematics isomorphisms are mappings that admit inverses. That seems like a fairly accurate description of what's going on in that you can map code from server to client and back again without changing its meaning. What word would you use?
- deleted 9y ago[deleted]
- hyperpallium 9y agoMappings that admit inverses are bijections. An isomorphism is a special kind of bijection in which, if two things have some relationship before the mapping, they have some other relationship after the mapping. e.g. if a*b = c, then ln(a)+ln(b) = ln(c) EDIT The isomorphism is the mapping from x to ln(x); the two things before the mapping are a and b; their relationship before the mapping is that their product is c; the two things after the mapping are ln(a) and ln(b); and their new relationship is that their sum is ln(c). In this example, it's not just "some other relationship" after the mapping, but involves c, also mapped.
- jdoliner 9y agoRight, particularly they're homomorphisms that admit inverses. I confused myself into thinking that the fact that they admit an inverse implies that they're structure preserving but that obviously isn't true. Still I don't see anything here that doesn't basically apply to running the same code on client and server. Since the entire point is that you are preserving structure, Go is supposed to have exactly the same semantics on client and server.
- hyperpallium 9y agoYep. But as others have said, it's not really isomorphism in a mathematical sense. The article defines "Isomorphic web applications" as "where the web server and the web browser (the client), may share all, or some parts of the web application code." Just, "same shape" on both sides. If it was identical code, I would (mathematically) call it an identity (which, to be fair, is an isomorphism). But it's not identical; they transpile go to js ("GopherJS - A compiler from Go to JavaScript"). This compilation itself is arguably an isomorphic mapping, with the same code doing equivalent things on both sides. e.g. equivalent assignments between equivalent variables. Two problems with this interpretation (1) a transpiler doesn't have to be isomorphic (e.g. could use different idioms); (2) that's not really the aspect they're referring to.
- dsacco 9y agoThere are two problems. First, you would not describe a web application as “isomorphic” if it’s an abstraction over a client and a server which both share the same code. The proper way to use this term would be to say that there is an isomorphism between the client and the server (and again, that web application is not the isomorphism), or you could say that the client and server are isomorphic with respect to one another. A thing cannot be isomorphic, it can only be isomorphic with respect to another thing. But it cannot be isomorphic because it is a morphism between two things in an isomorphism. Second, and more importantly, the client and the server do not share an isomorphism under this paradigm. An isomorphism describes two objects which have a mapping between them such that, for all intents and purposes, they are equivalent. “Equivalence” is a specific mathematical term distinct from equality: 5 and 7 are not equal, but under a function that outputs the same number for all odd inputs, 5 and 7 are equivalent. More precisely, you cannot tell two objects apart using only their properties if they are isomorphic to each other. If we were to define a client and a server in a category theoretic sense, the client and the server would have to have all the same properties that can be used to draw morphisms, which means a bijective function could be drawn between them such that they have equivalent outputs when used as the inputs for other functions. In other words, it must be possible for the client to be the server for this web application and vice versa. This is obviously not the case just because they share all the same code, for a variety of examples. Let’s say a client and a server share an isomorphism. Then a web application hosted by the server is also hosted by the client, and all the users of the server could equivalently (in the mathematical sense) log in to, and interface with, the client as if it were the server. Then the client and the server are not equal, but they are equivalent. But this framework does not enable that capability. It’s just not a correct use of the word. I personally don’t mind the use of mathematical terminology in a colloquial sense, but only if that terminology is used in an audience-appropriate and correct way. Here’s an example: in a peer to peer file transfer relationship, two peers share an isomorphism via their peer connection if they both have all the same properties (i.e. same file transfer protocol, same internet speed, same files, etc) germane to a particular morphism (which we’ll in this case define as a function to get a download from a peer). Then Peer A and Peer B are isomorphic with respect to one another; you could drop in Peer A’s IP address to download the same files, at the same speed, etc as if you dropped in Peer B’s IP address.